# The Second Derivative and the Shape of a Function f(x)

 Site: Saylor Academy Course: MA005: Calculus I Book: The Second Derivative and the Shape of a Function f(x)
 Printed by: Guest user Date: Tuesday, August 6, 2024, 12:33 PM

## Description

Read this section to learn how the second derivative is used to determine the shape of functions. Work through practice problems 1-9.

## Introduction

The first derivative of a function gives information about the shape of the function, so the second derivative of a function gives information about the shape of the first derivative and about the shape of the function. In this section we investigate how to use the second derivative and the shape of the first derivative to reach conclusions about the shape of the function. The first derivative tells us whether the graph of $\mathrm{f}$ is increasing or decreasing. The second derivative will tell us about the "concavity" of $\mathrm{f}$, whether $\mathrm{f}$ is curving upward or downward.

## Concavity

Graphically, a function is concave up if its graph is curved with the opening upward (Fig. 1a). Similarly, a function is concave down if its graph opens downward (Fig. 1b). The concavity of a function can be important in applied problems and can even affect billion-dollar decisions.

Fig. 1

An Epidemic: Suppose an epidemic has started, and you, as a member of congress, must decide whether the current methods are effectively fighting the spread of the disease or whether more drastic measures and more money are needed. In Fig. 2, $\mathrm{f}(\mathrm{x})$ is the number of people who have the disease at time $\mathrm{x}$, and two different situations are shown. In both $(a)$ and $(b)$, the number of people with the disease, $f$ now), and the rate at which new people are getting sick, $f'$ (now), are the same. The difference in the two situations is the concavity of $\mathrm{f}$, and that difference in concavity might have a big effect on your decision. In $(a)$, $f$ is concave down at "now", and it appears that the current methods are starting to bring the epidemic under control. In $(b)$, $\mathrm{f}$ is concave up, and it appears that the epidemic is still out of control.

Fig. 2

Usually it is easy to determine the concavity of a function by examining its graph, but we also need a definition which does not require that we have a graph of the function, a definition we can apply to a function described by a formula without having to graph the function.

Definition: Let $\mathrm{f}$ be a differentiable function.

$\mathrm{f}$ is concave up at a if the graph of $\mathrm{f}$ is above the tangent line $\mathrm{L}$ to $\mathrm{f}$ for all $\mathrm{x}$ close

to $a$ (but not equal to $a$): $\mathbf{f}(\mathbf{x}) > \mathbf{L}(\mathbf{x})=\mathrm{f}(\mathrm{a})+\mathrm{f}^{\prime}(\mathrm{a})(\mathrm{x}-\mathrm{a})$

$\mathrm{f}$ is concave down at $a$ if the graph of $\mathrm{f}$ is below the tangent line $\mathrm{L}$ to $\mathrm{f}$ for all $\mathrm{x}$ close

to $a$ (but not equal to $a$): $\mathbf{f}(\mathbf{x}) < \mathrm{L}(\mathbf{x})=\mathrm{f}(\mathrm{a})+\mathrm{f}^{\prime}(\mathrm{a})(\mathrm{x}-\mathrm{a})$.

Fig. 3 shows the concavity of a function at several points. The next theorem gives an easily applied test for the concavity of a function given by a formula.

Fig. 3

The Second Derivative Condition for Concavity
(a) If $\mathrm{f}^{\prime \prime}(\mathrm{x}) > 0$ on an interval $I$, then $\mathrm{f}^{\prime}(\mathrm{x})$ is increasing on $\mathrm{I}$ and $\mathrm{f}$ is concave up on $\mathrm{I}$.
(b) If $\mathrm{f}^{\prime \prime}(\mathrm{x}) < 0$ on an interval $I$, then $\mathrm{f}^{\prime}(\mathrm{x})$ is decreasing on $\mathrm{I}$ and $\mathrm{f}$ is concave down on $\mathrm{I}$.
(c) If $\mathrm{f}^{\prime \prime}(\mathrm{a})=0$, then $\mathrm{f}(\mathrm{x})$ may be concave up or concave down or neither at $a$.

Proof: (a) Assume that $\mathrm{f}^{\prime \prime}(\mathrm{x}) > 0$ for all $\mathrm{x}$ in $\mathrm{I}$, and let a be any point in $\mathrm{I}$. We want to show that $\mathrm{f}$ is concave up at $a$ so we need to prove that the graph of $f$ (Fig. 4) is above the tangent line to $\mathrm{f}$ at $a$: $\mathrm{f}(\mathrm{x}) > \mathrm{L}(\mathrm{x})=\mathrm{f}(\mathrm{a})+\mathrm{f}^{\prime}(\mathrm{a})(\mathrm{x}-\mathrm{a})$ for $\mathrm{x}$ close to $a$.

Fig. 4

Assume that $\mathrm{x}$ is in $\mathrm{I}$, and apply the Mean Value Theorem to $\mathrm{f}$ on the interval from $a$ to $\mathrm{x}$. Then there is a number $\mathrm{c}$ between $a$ and $\mathrm{x}$ so that $\mathrm{f}^{\prime}(\mathrm{c})=\frac{\mathrm{f}(\mathrm{x})-\mathrm{f}(\mathrm{a})}{\mathrm{x}-\mathrm{a}} \text { and } \mathrm{f}(\mathrm{x})=\mathrm{f}(\mathrm{a})+\mathrm{f}^{\prime}(\mathrm{c})(\mathrm{x}-\mathrm{a})$

Since $\mathrm{f} " > 0$ between $a$ and $\mathrm{x}$, we know from the Second Shape Theorem that $\mathrm{f}^{\prime}$ is increasing between $a$ and $\mathrm{x}$. We will consider two cases: $\mathrm{x} > \mathrm{a}$ and $\mathrm{x} < \mathrm{a}$.

If $x > a$, then $x-a > 0$ and $c$ is in the interval $[a, x]$ so $a < c$. Since $f^{\prime}$ is increasing, $a < c$ implies that $\mathrm{f}^{\prime}(\mathrm{a}) < \mathrm{f}^{\prime}(\mathrm{c})$. Multiplying each side of the inequality $\mathrm{f}^{\prime}(\mathrm{a}) < \mathrm{f}^{\prime}(\mathrm{c})$ by the positive amount $\mathrm{x}-\mathrm{a}$, we get that $\mathrm{f}^{\prime}(\mathrm{a})(\mathrm{x}-\mathrm{a}) < \mathrm{f}^{\prime}(\mathrm{c})(\mathrm{x}-\mathrm{a})$. Adding $\mathrm{f}(\mathrm{a})$ to each side of this last inequality, we have $\mathrm{L}(\mathrm{x}) = \mathrm{f}(\mathrm{a})+\mathrm{f}^{\prime}(\mathrm{a})(\mathrm{x}-\mathrm{a}) < \mathrm{f}(\mathrm{a})+\mathrm{f}^{\prime}(\mathrm{c})(\mathrm{x}-\mathrm{a})=\mathrm{f}(\mathrm{x})$.

If $x < a$, then $x-a < 0$ and $c$ is in the interval $[x, a]$ so $c < a$. Since $f^{\prime}$ is increasing, $c <$ a implies that $\mathrm{f}^{\prime}(\mathrm{c}) < \mathrm{f}^{\prime}(\mathrm{a})$. Multiplying each side of the inequality $\mathrm{f}^{\prime}(\mathrm{c}) < \mathrm{f}^{\prime}(\mathrm{a})$ by the negative amount $\mathrm{x}-\mathrm{a}$, we get that $\mathrm{f}^{\prime}(\mathrm{c})(\mathrm{x}-\mathrm{a})>\mathrm{f}^{\prime}(\mathrm{a})(\mathrm{x}-\mathrm{a})$ and $\mathrm{f}(\mathrm{x})=\mathrm{f}(\mathrm{a})+\mathrm{f}^{\prime}(\mathrm{c})(\mathrm{x}-\mathrm{a}) > \mathrm{f}(\mathrm{a})+\mathrm{f}^{\prime}(\mathrm{a})(\mathrm{x}-\mathrm{a})=\mathrm{L}(\mathrm{x})$.

In each case we get that the function $\mathrm{f}(\mathrm{x})$ is above the tangent line $\mathrm{L}(\mathrm{x})$. The proof of $(b)$ is similar.

(c) Let $(x)=x^{4}, g(x)=-x^{4}$, and $h(x)=x^{3}$ (Fig.5). The second derivative of each of these functions is zero at $a=0$, and at $(0,0)$ they all have the same tangent line: $L(x)=0$, the $x$-axis. However, at $(0,0)$ they all have different concavity: $\mathrm{f}$ is concave up, $g$ is concave down, and $\mathrm{h}$ is neither concave up nor down.

Fig. 5

Practice 1: Use the graph of $\mathrm{f}$ in Fig. 6 to finish filling in the table with "$+$" for positive, "$-$" for negative" $,$ or "$0$".

$\begin{array}{l|c|c|c|c}\mathrm{x} & \mathrm{f}(\mathrm{x}) & \mathrm{f}^{\prime}(\mathrm{x}) & \mathrm{f} "(\mathrm{x}) & \text { Concavity (up or down) } \\\hline 1 & + & + & - & \text { down } \\2 & + & & & \\3 & - & & & \\4 & & & &\end{array}$

Fig. 6

## Feeling the Second Derivative

Earlier we saw that if a function $\mathrm{f}(\mathrm{t})$ represents the position of a car at time $\mathrm{t}$, then $\mathrm{f}^{\prime}(\mathrm{t})$ is the velocity and $f'' (\mathrm{t})$ is the acceleration of the car at the instant $\mathrm{t}$.

If we are driving along a straight, smooth road, then what we feel is the acceleration of the car:

a large positive acceleration feels like a "push" toward the back of the car,
a large negative acceleration (a deceleration) feels like a "push" toward the front of the car, and an acceleration of $0$ for a period of time means the velocity is constant and we do not feel pushed in either direction.

On a moving vehicle it is possible to measure these "pushes", the acceleration, and from that information to Ä‘etermine the velocity of the vehicle, and from the velocity information to determine the position. Inertial guidance systems in airplanes use this tactic: they measure front-back, left-right and up-down acceleration several times a second and then calculate the position of the plane. They also use computers to keep track of time and the rotation of the earth under the plane. After all, in 6 hours the earth has made a quarter of a revolution, and Dallas has rotated more than 5000 miles!

Example 1: The upward acceleration of a rocket was $\mathrm{a}(\mathrm{t})=30 \mathrm{~m} / \mathrm{s}^{2}$ for the first 6 seconds of flight, $0 \leq \mathrm{t} \leq 6$. The velocity of the rocket at $\mathrm{t}=0$ was $0 \mathrm{~m} / \mathrm{s}$ and the height of the rocket above the ground at $\mathrm{t}=0$ was $25 \mathrm{~m}$. Find a formula for the height of the rocket at time $\mathrm{t}$ and determine the height at $\mathrm{t}=6$ seconds.

Solution: $\mathrm{v}^{\prime}(\mathrm{t})=\mathrm{a}(\mathrm{t})=30$ so $\mathrm{v}(\mathrm{t})=30 \mathrm{t}+\mathrm{K}$ for some constant $\mathrm{K}$. We also know $\mathrm{v}(\mathbf{0})=0$ so $30(0)+K=0$ and $K=0$. Therefore, $v(t)=30 t$
Similarly, $h^{\prime}(t)=v(t)=30 t$ so $h(t)=15 t^{2}+C$ for some constant $C$. We know that $h(0)=25$ so $15(0)^{2}+C=25$ and $\mathrm{C}=25$. Then $\mathrm{h}(\mathrm{t})=15 \mathrm{t}^{2}+25$. $\mathrm{h}(6)=15(6)^{2}+25=565 \mathrm{~m}$

## f'' and Extreme Values

The concavity of a function can also help us determine whether a critical point is a maximum or minimum or neither. For example, if a point is at the bottom of a concave up function (Fig. 7), then the point is a minimum.

Fig. 7

The Second Derivative Test for Extremes:
(a) If $\mathrm{f}^{\prime}(\mathrm{c})=0$ and $\mathrm{f}^{\prime \prime}(\mathrm{c}) < 0$ then $\mathrm{f}$ is concave down and has a local maximum at $\mathrm{x}=\mathrm{c}$.
(b) If $\mathrm{f}^{\prime}(\mathrm{c})=0$ and $\mathrm{f}^{\prime \prime}(\mathrm{c}) > 0$ then $\mathrm{f}$ is concave up and has a local minimum at $\mathrm{x}=\mathrm{c}$.
(c) If $f^{\prime}(c)=0$ and $f^{\prime \prime}(c)=0$ then $f$ may have a local maximum, a minimum or neither at $x=c$.

Proof: (a) Assume that $\mathrm{f}^{\prime}(\mathrm{c})=0$. If $\mathrm{f}^{\prime \prime}(\mathrm{c}) < 0$ then $\mathrm{f}$ is concave down at $\mathrm{x}=\mathrm{c}$ so the graph of $\mathrm{f}$ will be below the tangent line $L(x)$ for values of $x$ near $c$. The tangent line, however, is given by $L(x)=f(c)+f^{\prime}(c)(x-c)=f(c)+0(x-c)=f(c)$, so if $x$ is close to $c$ then $f(x) < L(x)=f(c)$ and $f$ has a local maximum at $\mathrm{x}=\mathrm{c}$. The proof of (b) for a local minimum of $\mathrm{f}$ is similar.

(c) If $\mathrm{f}^{\prime}(\mathrm{c})=0$ and $\mathrm{f}^{\prime \prime}(\mathrm{c})=0$, then we cannot immediately conclude anything about local maximums or minimums of $f$ at $x=c$. The functions $f(x)=x^{4}, g(x)=-x^{4}$, and $h(x)=x^{3}$ all have their first and second derivatives equal to zero at $x=0$, but $f$ has a local minimum at $0, g$ has a local maximum at $0$, and $\mathrm{h}$ has neither a local maximum nor a local minimum at $\mathrm{x}=0$.

The Second Derivative Test for Extremes is very useful when $\mathrm{f}^{\prime \prime}$ is easy to calculate and evaluate. Sometimes, however, the First Derivative Test or simply a graph of the function is an easier way to determine if we have a local maximum or a local minimum â€“ it depends on the function and on which tools you have available to help you.

Practice 2: $\mathrm{f}(\mathrm{x})=2 \mathrm{x}^{3}-15 \mathrm{x}^{2}+24 \mathrm{x}-7$ has critical numbers $\mathrm{x}=1$ and $4$. Use the Second Derivative Test for Extremes to determine whether $\mathrm{f}(1)$ and $\mathrm{f}(4)$ are maximums or minimums or neither.

## Inflection Points

Definition: An inflection point is a point on the graph of a function where the concavity of the function changes, from concave up to down or from concave down to up.

Practice 3: Which of the labelled points in Fig. 8 are inflection points?

Fig. 8

To find the inflection points of a function we can use the second derivative of the function. If $f^{\prime \prime}(x) > 0$, then the graph of $f$ is concave up at the point $(x, f(x))$ so $(x, f(x))$ is not an inflection point. Similarly, if $f^{\prime \prime}(x) < 0$, then the graph of $\mathrm{f}$ is concave down at the point $(\mathrm{x}, \mathrm{f}(\mathrm{x}))$ and the point is not an inflection point. The only points left which can possibly be inflection points are the places where $\mathrm{f}^{\prime \prime}(\mathrm{x})$ is $0$ or undefined ($f'$ is not differentiable). To find the inflection points of a function we only need to check the points where $\mathrm{f}^{\prime \prime}(\mathrm{x})$ is $0$ or undefined. If $\mathrm{f}^{\prime \prime}(\mathrm{c})=0$ or is undefined, then the point $(\mathrm{c}, \mathrm{f}(\mathrm{c}))$ may or may not be an inflection point â€“ we would need to check the concavity of $\mathrm{f}$ on each side of $\mathrm{x}=\mathrm{c}$. The functions in the next example illustrate what can happen.

Example 2: Let $f(x)=x^{3}, g(x)=x^{4}$ and $h(x)=x^{1 / 3}$ (Fig. 9). For which of these functions is the point $(0,0)$ an inflection point?

Fig. 9

Solution: Graphically, it is clear that the concavity of $f(x)=x^{3}$ and $\mathrm{h}(\mathrm{x})=\mathrm{x}^{1 / 3}$ changes at $(0,0)$, so $(0,0)$ is an inflection point for $\mathrm{f}$ and $\mathrm{h}$. The function $\mathrm{g}(\mathrm{x})=\mathrm{x}^{4}$ is concave up everywhere so $(0,0)$ is not an inflection point of $\mathrm{g}$.

If $f(x)=x^{3}$, then $f^{\prime}(x)=3 x^{2}$ and $f^{\prime \prime}(x)=6 x$. The only point at which $f^{\prime \prime}(x)=0$ or is undefined ($f'$ is not differentiable) is at $x=0$. If $x < 0$, then $f^{\prime \prime}(x) < 0$ so $f$ is concave down. If $x > 0$, then $\mathrm{f}^{\prime \prime}(\mathrm{x}) > 0$ so $\mathrm{f}$ is concave up. At $\mathrm{x}=0$ the concavity changes so the point $(0, \mathrm{f}(0))=(0,0)$ is an inflection point of $\mathrm{x}^{3}$.

If $\mathrm{g}(\mathrm{x})=\mathrm{x}^{4}$, then $\mathrm{g}^{\prime}(\mathrm{x})=4 \mathrm{x}^{3}$ and $\mathrm{g}^{\prime \prime}(\mathrm{x})=12 \mathrm{x}^{2}$. The only point at which $\mathrm{g}^{\prime \prime}(\mathrm{x})=0$ or is undefined is at $x=0$. If $x < 0$, then $g^{\prime \prime}(x) > 0$ so $g$ is concave up. If $x > 0$, then $g^{\prime \prime}(x) > 0$ so $g$ is also concave up. At $x=0$ the concavity does not change so the point $(0, g(0))=(0,0)$ is not an inflection point of $x^{4}$.

If $\mathrm{h}(\mathrm{x})=\mathrm{x}^{1 / 3}$, then $\mathrm{h}^{\prime}(\mathrm{x})=\frac{1}{3} \mathrm{x}^{-2 / 3}$ and $\mathrm{h}^{\prime \prime} (\mathrm{x})=-\frac{2}{9} \mathrm{x}^{-5 / 3} \cdot \mathrm{h}^{\prime \prime}$ is not defined if $\mathrm{x}=0$, but $\mathrm{h}^{\prime \prime}$ (negative number) $> 0$ and $\mathrm{h}^{\prime \prime}$ (positive number) $< 0$ so $\mathrm{h}$ changes concavity at $(0,0)$ and $(0,0)$ is an inflection point of $\mathrm{h}$.

Practice 4: Find the inflection points of $f(x)=x^{4}-12 x^{3}+30 x^{2}+5 x-7$.

Example 3: Sketch graph of a function with $f(2)=3, f^{\prime}(2)=1$, and an inflection point at $(2,3)$. Solution: Two solutions are given in Fig. 10.

Fig. 10

Practice 1: See Fig. 6.

$\begin{array}{l|c|c|c|l}x & f(x) & f^{\prime}(x) & f^{\prime \prime}(x) & \text { Concavity (up or down) } \\\hline 1 & + & + & - & \text { down } \\2 & + & - & - & \text { down } \\3 & - & - & + & \text { up } \\4 & - & 0 & - & \text { down }\end{array}$

Fig. 6

Practice 2: $f(x)=2 x^{3}-15 x^{2}+24 x-7$.

$\mathrm{f}^{\prime}(\mathrm{x})=6 \mathrm{x}^{2}-30 \mathrm{x}+24$ which is defined for all $\mathrm{x}$.

$\mathrm{f}^{\prime}(\mathrm{x})=0$ if $\mathrm{x}=1,4$ (critical values).

$\mathrm{f}^{\prime \prime}(\mathrm{x})=12 \mathrm{x}-30$.

$\mathrm{f}^{\prime \prime}(1)=-18$ so $\mathrm{f}$ is concave down at the critical value $\mathrm{x}=1$ so $(1, \mathrm{f}(1))=(1,4)$ is a rel. max.

$\mathrm{f}^{\prime \prime}(4)=+18$ so $\mathrm{f}$ is concave up at the critical value $x=4$ so $(4, f(4))=(4,-23)$ is a rel. min.

Fig. 18 shows the graph of $f$.

Fig. 18

Practice 3: The points labeled $(b)$ and $(g)$ in Fig. 8 are inflection points.

Practice 4:

\begin{aligned}&f(x)=x^{4}-12 x^{3}+30 x^{2}+5 x-7 . f^{\prime}(x)=4 x^{3}-36 x^{2}+60 x+5 \\&f^{\prime \prime}(x)=12 x^{2}-72 x+60=12\left(x^{2}-6 x+5\right)=12(x-1)(x-5)\end{aligned}

The only candidates to be Inflection Points are $x=1$ and $x=5$.

If $x < 1$, then $f^{\prime \prime}(x)=12(x-1)(x-5)=12$ (neg)(neg) is positive.
If $1 < x < 5$, then $f^{\prime \prime}(x)=12(x-1)(x-5)=12$ (pos )(neg) is negative.
If $5 < x$, then $f^{\prime \prime}(x)=12(x-1)(x-5)=12$ (pos)(pos) is positive.

$f$ changes concavity at $x=1$ and $x=5$ so $x=1$ and $x=5$ are Inflection Points.

Fig. 19 shows the graph of $f$.

Fig. 19