The sign of the second derivative shows which way the graph of a function bends.

### Definition of Concavity and Concavity Test

Although the sign of the derivative provides information about whether a function is increasing or decreasing, it does not tell us which way the graph of the function bends. The graphs of two increasing functions are shown in Figure 1. The graph on the left bends upward as the point that traces it moves from left to right. In this case, we say the function is concave upward. The graph of the right bends downward, and we say that this function is concave downward.

• Unofficially, we can say a function is concave up on an interval $$I$$ if its graph over $$I$$ “holds water” and is concave down if the graph “spills water.”

In Figure 2, the graph of the function is concave upward. It is clear from this figure that in passing along the graph from left to right, the slope of the tangent line (which is $$f'(x)$$) increases (before $$P$$ the slope is negative, and after $$P$$ slope is positive; thus the tangent lines have increasing slopes).

In Figure 3, the graph of the function is concave downward; in passing along the graph from left to right, the slope of the tangent line (or $$f'(x)$$) decreases.

Definition 1. Assume $$f$$ is a differentiable function on an interval $$I$$.
(a) The (graph of the) function is “concave up” if $$f’$$ is increasing on $$I$$
(b) The (graph of the) function is “concave down” if $$f’$$ is decreasing on $$I$$.

• There are alternative and more general definitions for concavity but the above definition is good enough for this course.
• Because $$f^{\prime\prime}$$ is the derivative of $$f’$$, it follows from the Increasing/Decreasing Test  that $$f’$$ is increasing on an interval $$I$$ if $$f^{\prime\prime}(x)>0$$ for each $$x$$ in $$I$$ and $$f’$$ is decreasing on $$I$$ if $$f^{\prime\prime}(x)<0$$ for each $$x$$ in $$I$$. Therefore, we have the following theorem.

Theorem 1. Concavity Test. Let $$f$$ be a function whose second derivative exists at each point of an interval $$I$$.
(a) If $$f^{\prime\prime}(x)>0$$ for every $$x$$ in $$I$$, then the graph of $$f$$ is concave up on $$I$$.
(b) If $$f^{\prime\prime}(x)<0$$ for every $$x$$ in $$I$$, then the graph of $$f$$ is concave down on $$I$$.

Example 1
Determine where the following functions are concave up and where they are concave down.
(a) $$f(x)=2x^{2}-5x-7$$
(b) $$f(x)=x^{3}$$
(c) $$f(x)=x^{3}-3x^{2}+1$$
Solution
(a) $f(x)=2x^{2}-5x-7\Rightarrow f'(x)=4x-5$ $f^{\prime\prime}(x)=4$
Because $$f^{\prime\prime}(x)>0$$ for all $$x$$, it follows from the Concavity Test (Theorem 1) that $$f$$ is concave up on $$(-\infty,+\infty)$$ (Figure 4).

(b) $f(x)=x^{3}\Rightarrow f'(x)=3x^{2}\Rightarrow f^{\prime\prime}(x)=6x$

The above table shows that $$f$$ is concave down on $$(-\infty,0)$$ and is concave up on $$(0,+\infty)$$ (Figure 5).

(c) e

Therefore, $$f$$ is concave down on $$(-\infty,1)$$ and is concave up on $$(1,+\infty)$$. Graph of $$f$$ clearly agrees with our calculations (Figure 6).

Example 2
Determine where $$y=e^{-x^{2}}$$ is concave up and where it is concave up.
Solution
Let $$u=-x^{2}$$

$y=e^{-x^{2}}=e^{u}$
$\Rightarrow y’=e^{u}\frac{du}{dt}=e^{-x^{2}}(-2x)$
$y’=\underbrace{-2x}_{v}\underbrace{e^{-x^{2}}}_{w}$
\begin{align} \Rightarrow y” & =v’w+vw’\\ & =(-2)e^{-x^{2}}+(-2x)\left(\frac{d}{dx}e^{-x^{2}}\right)\\ & =-2e^{-x^{2}}+(-2x)\left(-2xe^{-x^{2}}\right)\\ & =-2e^{-x^{2}}+4x^{2}e^{-x^{2}}\\ & =4e^{-x^{2}}\left(x^{2}-\frac{1}{2}\right)\end{align}
Because $$e^{-x^{2}}>0$$ for all $$x$$, the sign of $$y^{\prime\prime}$$ is solely determined by $$(x^{2}-1/2)$$. We write
\begin{align} x^{2}-\frac{1}{2} & =x^{2}-\left(\frac{1}{\sqrt{2}}\right)^{2}\\ & =\left(x-\frac{1}{\sqrt{2}}\right)\left(x+\frac{1}{\sqrt{2}}\right)\end{align}
[Recall $$A^{2}-B^{2}=(A-B)(A+B)$$]. Therefore, we have the following sign table.

The graph of this function is concave down on the interval $$(-1/\sqrt{2},1/\sqrt{2})$$ and is concave up on $$(-\infty,-1/\sqrt{2})\cup(1/\sqrt{2},+\infty)$$. The graph of this function is shown in Figure 7.

### Concavity and Tangent Lines

From Figures 2 and 3, we observe that if a function is concave up on an interval, its graph lies above all of its tangent on that interval and if it is concave down, its graph lies below all of its tangent lines. We can prove this observation is true (see the following example).

Example 3
Let $$f$$ be a differentiable function on an open interval $$I$$ and $$x_{0}$$ be an arbitrary point of $$I$$. Show that if $$f$$ is concave up on $$I$$, the curve $$y=f(x)$$ lies above the tangent line to this curve at $$(x_{0},f(x_{0}))$$.
Spoiler title
The tangent to the curve $$y=f(x)$$ is the line $$y=L(x)=f'(x_{0})(x-a)+f(x_{0})$$. We need to show that for all $$x(\neq x_{0})$$ in $$I$$, we have $f(x)>L(x).$ Assume $$x>x_{0}$$. Because $$f$$ is continuous on the closed interval $$[x_{0},x]$$ and is differentiable on the open interval $$(x_{0},x)$$, it follows from the Mean-Value Theorem that there is some $$c$$ in the interval $$(x_{0},x)$$ such that $\frac{f(x)-f(x_{0})}{x-x_{0}}=f'(c)$ Because $$f$$ is concave up, $$f’$$ is an increasing function and $x_{0}<c\Rightarrow f'(x_{0})<f'(c),$ thus $f'(x_{0})<\frac{f(x)-f(x_{0})}{x-x_{0}}=f'(c).$ Multiplying both sides by $$x-x_{0}>0$$, we obtain $f'(x_{0})(x-x_{0})<f(x)-f(x_{0})$ or $\underbrace{f(x_{0})+f'(x_{0})(x-x_{0})}_{=L(x)}<f(x).$ In a similar way, we can show that if $$x<x_{0}$$, we also have $L(x)<f(x).$ This is what we wanted to prove.

### Inflection Points

Most curves are concave up on some interval and concave down on some others. A point where the direction of concavity changes is called an “inflection1 point.”

Definition 2. We say $$(x_{0},f(x_{0}))$$ is an inflection point of the graph of $$f$$ or simply $$f$$ has an inflection point at $$x_{0}$$ if:
(a) The graph of $$f$$ has a tangent line at $$(x_{0},f(x_{0}))$$, and
(b) The direction of concavity of $$f$$ changes (from upward to downward or from downward to upward) at $$x_{0}$$.

• In other words, an inflection point is where the rate of change (the slopes of the tangent lines) changes from increasing to decreasing or from decreasing to increasing.
• We mentioned that if a function is concave up on an interval, its graph lies above the tangents (see Example 3) and if it is concave down, its graph lies below the tangent. If $$P(x_{0},f(x_{0}))$$ is an inflection point of the graph of $$f$$, the direction of concavity changes and hence the graph crosses one side of the tangent to the other at $$P$$.
• Because a tangent line exists at an inflection point, either
$$f'(x_{0})$$ must be a finite number, or in the case of a vertical tangent $$f'(x_{0})$$ must be $$+\infty$$ or $$-\infty$$.

### How to Find Inflection Points

Example 4
Find the inflection points of the following functions:
(a) $$f(x)=2x^{2}-5x-7$$
(b) $$f(x)=x^{3}$$
(c) $$f(x)=x^{3}-3x^{2}+1$$
Solution
(a) In Example 1, we saw $$f$$ is concave up on $$(-\infty,+\infty)$$. Because the direction of concavity does not change the graph of $$f$$ does not have an inflection point.

(b) In Example 1, we saw that $$f$$ is concave down on $$(-\infty,0)$$ and concave up on $$(0,\infty).$$ Therefore, at $$x=0$$, the direction of concavity changes. Furthermore, $$f'(0)=\left.3x^{2}\right|_{x=0}=0$$ exists, so the graph of $$f$$ has a tangent. Therefore, both conditions (a) and (b) in Definition 2 are satisfied,  and$$(0,f(0))=(0,0)$$ is an inflection point of the graph of $$f$$.

(c) In Example 1, we saw that the direction of concavity changes at $$x=1$$. Because $$f'(0)$$ exists, $(1,f(1))=(1,1^{3}-3(1)^{2}+1)=(1,-1)$ is an inflection point of the graph of $$f$$.

Example 5
Find the inflection points of $$f(x)=\sqrt[3]{x}$$.
Solution
First, let’s find where $$f$$ is concave up and where it is concave down. To do so, we need to calculate $$f^{\prime\prime}(x)$$.
$f(x)=\sqrt[3]{x}=x^{1/3}\Rightarrow f'(x)=\frac{1}{3}x^{1/3-1}=\frac{1}{3}x^{-2/3}$ $\Rightarrow f^{\prime\prime}(x)=\frac{1}{3}\left(-\frac{2}{3}\right)x^{-2/3-1}=-\frac{2}{9}x^{-5/3}$ or $f^{\prime\prime}(x)=-\frac{2}{9\sqrt[3]{x^{5}}}$ Although $$f^{\prime\prime}(0)$$ does not exist, $$f^{\prime\prime}(x)$$ is positive for $$x<0$$ and is negative for $$x>0$$ [if it is not clear from the formula of $$f^{\prime\prime}$$, we can test two numbers at each side that are close to 0. For example, $$1$$ and $$-1$$:
$f^{\prime\prime}(-1)=\left.-\frac{2}{9\sqrt[3]{x^{5}}}\right|_{x=-1}=-\frac{2}{9\sqrt[3]{(-1)^{5}}}=-\frac{2}{9\sqrt[3]{-1}}=\frac{2}{9}>0$ $f^{\prime\prime}(1)=\left.-\frac{2}{9\sqrt[3]{x^{5}}}\right|_{x=1}=-\frac{2}{9\sqrt[3]{1^{5}}}=-\frac{2}{9}<0]$

Therefore, the direction of concavity changes at $$(0,\sqrt[3]{0})=(0,0)$$, and condition (b) in Definition 2 for $$(0,0)$$ to be an inflection point is satisfied. Although $$f'(0)$$ does not exist (in fact, $$f'(0)=+\infty$$), because the vertical line $$x=0$$ is the tangent to the graph of $$y=\sqrt[3]{x}$$, condition (a) is also satisfied. Hence, the graph $$y=\sqrt[3]{x}$$ has a point of inflection at the origin.

Example 6
Find the inflection point of
$f(x)=\begin{cases} x^{2} & \text{if }x\geq0\\ -x^{2} & \text{if }x\le0 \end{cases}$
Solution
Let’s calculate the first and second derivatives
$f'(x)=\begin{cases} 2x & \text{if }x\geq0\\ -2x & \text{if }x\le0 \end{cases}$ $f^{\prime\prime}(x)=\begin{cases} 2 & \text{if }x\geq0\\ -2 & \text{if }x\le0 \end{cases}$ We can see that $$f$$ is concave down on $$(-\infty,0)$$ and is concave up on $$(0,+\infty)$$. Thus the direction of concavity changes at $$x=0$$. Because $$f$$ has a tangent at $$x=0$$ (the line $$y=0$$ is the tangent line), both conditions of Definition 2 are satisfied and $$(0,0)$$ is an inflection point of the graph of $$f$$ (see Figure 14).

Theorem 2. If $$(x_{0},f(x_{0}))$$ is an inflection point of the graph of $$f$$, either $$f^{\prime\prime}(x_{0})=0$$ or $$f^{\prime\prime}(x_{0})$$ does not exist.

• The above theorem states that if $$f$$ has an inflection point at $$x_{0}$$, then $$x_{0}$$ is a critical point of the derivative $$f’$$.
• Even if $$f^{\prime\prime}(x_{0})=0$$, the point $$(x_{0},f(x_{0}))$$ is not necessarily an inflection point. For instance, see the following example.
Example 7
Determine the inflection points of the graph of $$f(x)=x^{4}$$.
Solution
$f(x)=x^{4}\Rightarrow f'(x)=4x^{3}\Rightarrow f^{\prime\prime}(x)=12x^{2}$ Because $$f^{\prime\prime}$$ is always non-negative, the concavity of $$f$$ does not change. So even if $$f^{\prime\prime}(0)=0$$, the point $$(0,f(0))=(0,0)$$ is not an inflection point.

1 Oxford Dictionary: from Latin inflectere, from in- ‘into’ + flectere ‘to bend’.