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

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

### The First Derivative and the Shape of a Function f

This section examines some of the interplay between the shape of the graph of $\mathrm{f}$ and the behavior of $\mathrm{f}^{\prime}$. If we have a graph of $\mathrm{f}$, we will see what we can conclude about the values of $\mathrm{f}^{\prime}$. If we know values of $\mathrm{f}^{\prime}$, we will see what we can conclude about the graph of $\mathrm{f}$.

Definitions: The function $\mathrm{f}$ is increasing on $(a,b)$ if $\mathrm{a} < \mathrm{x}_{1} < \mathrm{x}_{2} < \mathrm{b}$ implies $\mathrm{f}\left(\mathrm{x}_{1}\right) < \mathrm{f}\left(\mathrm{x}_{2}\right)$.
The function $f$ is decreasing on $(a, b)$ if $a < x_{1} < x_{2} < b$ implies $f\left(x_{1}\right) > f\left(x_{2}\right)$.
$\mathrm{f}$ is monotonic on $(\mathrm{a}, \mathbf{b})$ if $\mathrm{f}$ is increasing on $(\mathrm{a}, \mathrm{b})$ or if $\mathrm{f}$ is decreasing on $(\mathrm{a}, \mathrm{b})$.

Graphically, $\mathrm{f}$ is increasing (decreasing) if, as we move from left to right along the graph of $\mathrm{f}$, the height of the graph increases (decreases).

These same ideas make sense if we consider $\mathrm{h}(\mathrm{t})$ to be the height (in feet) of a rocket at time $\mathrm{t}$ seconds. We naturally say that the rocket is rising or that its height is increasing if the height $\mathrm{h}(\mathrm{t})$ increases over a period of time, as $\mathrm{t}$ increases.

Example 1: List the intervals on which the function given in Fig. 1 is increasing or decreasing.

Fig. 1

Solution: $\mathrm{f}$ is increasing on the intervals $[0,1],[2,3]$ and $[4,6]$. $\mathrm{f}$ is decreasing on $[1,2]$ and $[6,8]$. On the interval $[3,4]$ the function is not increasing or decreasing, it is constant. It is also valid to say that $\mathrm{f}$ is increasing on the intervals $[0.3,0.8]$ and $(0.2,0.5)$ as well as many others, but we usually talk about the longest intervals on which $\mathrm{f}$ is monotonic.

Practice 1: List the intervals on which the function given in Fig. 2 is increasing or decreasing.

Fig. 2

If we have an accurate graph of a function, then it is relatively easy to determine where $\mathrm{f}$ is monotonic, but if the function is defined by an equation, then a little more work is required. The next two theorems relate the values of the derivative of $f$ to the monotonicity of $f$. The first theorem says that if we know where $f$ is monotonic, then we also know something about the values of $f^{\prime}$. The second theorem says that if we know about the values of $\mathrm{f}^{\prime}$ then we can draw conclusions about where $\mathrm{f}$ is monotonic.

First Shape Theorem

For a function $\mathrm{f}$ which is differentiable on an interval $(\mathrm{a}, \mathrm{b})$;
(i) if $f$ is increasing on $(a, b)$, then $f^{\prime}(x) \geq 0$ for all $x$ in $(a, b)$
(ii) if $\mathrm{f}$ is decreasing on $(\mathrm{a}, \mathrm{b})$, then $\mathrm{f}^{\prime}(\mathrm{x}) \leq 0$ for all $\mathrm{x}$ in $(\mathrm{a}, \mathrm{b})$
(iii) if $f$ is constant on $(a, b)$, then $f^{\prime}(x)=0$ for all $x$ in $(a, b)$.

Proof: Most people find a picture such as Fig. 3 to be a convincing justification of this theorem: if the graph of $f$ increases near a point $(x, f(x))$, then the tangent line is also increasing, and the slope of the tangent line is positive (or perhaps zero at a few places). A more precise proof, however, requires that we use the definitions of the derivative of $f$ and of "increasing".

Fig. 3

(i) Assume that $\mathrm{f}$ is increasing on $(a, b)$. We know that $\mathrm{f}$ is differentiable, so if $x$ is any number in the interval $(a, b)$ then $\mathrm{f}^{\prime}(\mathrm{x})=\lim _{h \rightarrow 0} \frac{f(x+h)-f(x)}{h}$, and this limit exists and is a finite value.

If $h$ is any small enough positive number so that $x+h$ is also in the interval $(a, b)$, then $x < x+h$ and $f(x) < f(x+h)$. We know that the numerator, $f(x+h)-f(x)$, and the denominator, $h$, are both positive so the limiting value, $f^{\prime}(x)$, must be positive or zero: $f^{\prime}(x) \geq 0$.

(ii) Assume that $f$ is decreasing on $(a, b)$: The proof of this part is very similar to part (i). If $x < x+h$, then $f(x) > f(x+h)$ since $f$ is decreasing on $(a, b)$. Then the numerator of the limit, $f(x+h)-f(x)$, will be negative and the denominator, $\mathrm{h}$, will still be positive, so the limiting value, $\mathrm{f}^{\prime}(\mathrm{x})$, must be negative or zero: $f^{\prime}(x) \leq 0$.

(iii) The derivative of a constant is zero, so if $\mathrm{f}$ is constant on $(\mathrm{a}, \mathrm{b})$ then $\mathrm{f}^{\prime}(\mathrm{x})=0$ for all $\mathrm{x}$ in $(\mathrm{a}, \mathrm{b})$.

The previous theorem is easy to understand, but you need to pay attention to exactly what it says and what it does not say. It is possible for a differentiable function which is increasing on an interval to have horizontal tangent lines at some places in the interval (Fig 4).

Fig. 4

It is also possible for a continuous function which is increasing on an interval to have an undefined derivative at some places in the interval (Fig. 4).

Finally, it is possible for a function which is increasing on an interval to fail to be continuous at some places in the interval (Fig. 5).

Fig. 5

The First Shape Theorem has a natural interpretation in terms of the height $\mathrm{h}(\mathrm{t})$ and upward velocity $\mathrm{h}^{\prime}(\mathrm{t})$ of a helicopter at time $t$. If the height of the helicopter is increasing ( $\mathrm{h}(\mathrm{t})$ is increasing ), then the helicopter has a positive or zero upward velocity: $h^{\prime}(t) \geq 0$. If the height of the helicopter is not changing, then its upward velocity is $0: \mathrm{h}^{\prime}(\mathrm{t})=0$.

Example 2: Fig. 6 shows the height of a helicopter during a period of time. Sketch the graph of the upward velocity of the helicopter, $\mathrm{dh} / \mathrm{dt}$.

Fig. 6

Solution: The graph of $\mathrm{v}(\mathrm{t})=\mathrm{dh} / \mathrm{dt}$ is shown in Fig.7. Notice that the $\mathrm{h}(\mathrm{t})$ has a local maximum when $\mathrm{t}=2$ and $\mathrm{t}=5$, and $\mathrm{v}(2)=0$ and $\mathrm{v}(5)=0$. Similarly, $\mathrm{h}(\mathrm{t})$ has a local minimum when $t=3$, and $v(3)=0$. When $h$ is increasing, $v$ is positive. When $\mathrm{h}$ is decreasing, $\mathrm{v}$ is negative.

Fig. 7

Practice 2: Fig. 8 shows the population of rabbits on an island during 6 years. Sketch the graph of the rate of population change, $\mathrm{dR} / \mathrm{dt}$, during those years.

Fig. 8

Example 3: The graph of $\mathrm{f}$ is shown in Fig. 9. Sketch the graph of $\mathrm{f}^{\prime}$.

Fig. 9

Solution: It is a good idea to look first for the points where $f^{\prime}(x)=0$ or where $f$ is not differentiable, the critical points of $f$. These locations are usually easy to spot, and they naturally break the problem into several smaller pieces. The only numbers at which $f^{\prime}(x)=0$ are $x=-1$ and $x=2$, so the only places the graph of $f^{\prime}(x)$ will cross the $x$-axis are at $x=-1$ and $x=2$, and we can plot the point $(-1,0)$ and $(2,0)$ on the graph of $f'$. The only place that $f$ is not differentiable is at the "corner" above $x=5$, so the graph of $f^{\prime}$ will not have a point for $x=5$. The rest of the graph of $f$ is relatively easy:

if $x < -1$ then $f(x)$ is decreasing so $f^{\prime}(x)$ is negative,

if $-1 < x < 2$ then $f(x)$ is increasing so $f^{\prime}(x)$ is positive,

if $2 < x < 5$ then $f(x)$ is decreasing so $f^{\prime}(x)$ is negative, and

if $5 < x$ then $f(x)$ is decreasing so $f^{\prime}(x)$ is negative.

The graph of $\mathrm{f}'$ is shown in Fig. 10. $\mathrm{f}(\mathrm{x})$ is continuous at $\mathrm{x}=5$, but $\mathrm{f}$ is not differentiable at $\mathrm{x}=5$, as is indicated by the "hole" in the graph.

Fig. 10

Practice 3: The graph of $\mathrm{f}$ is shown in Fig. 11. Sketch the graph of $\mathrm{f}^{\prime}$. (The graph of $\mathrm{f}$ has a "corner" at $\mathrm{x}=5$.)

Fig. 11

The next theorem is almost the converse of the First Shape Theorem and explains the relationship between the values of the derivative and the graph of a function from a different perspective. It says that if we know something about the values of $\mathrm{f}^{\prime}$, then we can draw some conclusions about the shape of the graph of $\mathrm{f}$.

Second Shape Theorem

For a function $f$ which is differentiable on an interval I;
(i) if $\mathrm{f}^{\prime}(\mathrm{x}) > 0$ for all $\mathrm{x}$ in the interval $\mathrm{I}$, then $\mathrm{f}$ is increasing on $\mathrm{I}$,
(ii) if $\mathrm{f}^{\prime}(\mathrm{x}) < 0$ for all $\mathrm{x}$ in the interval $\mathrm{I}$, then $\mathrm{f}$ is decreasing on $\mathrm{I}$,
(iii) if $\mathrm{f}^{\prime}(\mathrm{x})=0$ for all $\mathrm{x}$ in the interval $\mathrm{I}$, then $\mathrm{f}$ is constant on $\mathrm{I}$.

Proof: This theorem follows directly from the Mean Value Theorem, and part (c) is just a restatement of the First Corollary of the Mean Value Theorem.

(a) Assume that $\mathrm{f}^{\prime}(\mathrm{x}) > 0$ for all $\mathrm{x}$ in $\mathrm{I}$ and pick any points a and $\mathrm{b}$ in $\mathrm{I}$ with $\mathrm{a} < \mathrm{b}$. Then, by the Mean Value Theorem, there is a point $c$ between $a$ and $b$ so that $\frac{f(b)-f(a)}{b-a}=f^{\prime}(c) > 0$, and we can conclude that $\mathrm{f}(\mathrm{b})-\mathrm{f}(\mathrm{a}) > 0$ and $\mathrm{f}(\mathrm{b}) > \mathrm{f}(\mathrm{a})$. Since $\mathrm{a} < \mathrm{b}$ implies that $\mathrm{f}(\mathrm{a}) < \mathrm{f}(\mathrm{b})$, we know that $\mathrm{f}$ is increasing on $I$.

(b) Assume that $\mathrm{f}^{\prime}(\mathrm{x}) < 0$ for all $\mathrm{x}$ in $\mathrm{I}$ and pick any points $a$ and $\mathrm{b}$ in $\mathrm{I}$ with $\mathrm{a} < \mathrm{b}$. Then there is a point $c$ between $a$ and $b$ so that $\frac{f(b)-f(a)}{b-a}=f^{\prime}(c) < 0$, and we can conclude that $\mathrm{f}(\mathrm{b})-\mathrm{f}(\mathrm{a})=(\mathrm{b}-\mathrm{a}) \mathrm{f}^{\prime}(\mathrm{c}) < 0$ so $\mathrm{f}(\mathrm{b}) < \mathrm{f}(\mathrm{a})$. Since $\mathrm{a} < \mathrm{b}$ implies that $\mathrm{f}(\mathrm{a}) > \mathrm{f}(\mathrm{b})$, we know $\mathrm{f}$ is decreasing on $\mathrm{I}$.

Practice 4: Rewrite the Second Shape Theorem as a statement about the height $\mathrm{h}(\mathrm{t})$ and upward velocity $\mathrm{h}^{\prime}(\mathrm{t})$ of a helicopter at time $\mathrm{t}$ seconds.

The value of the function at a number $x$ tells us the height of the graph of $f$ above or below the point $x$ on the $x$-axis. The value of $f^{\prime}$ at a number $x$ tells us whether the graph of $f$ is increasing or decreasing (or neither) as the graph passes through the point $(x, f(x))$ on the graph of $f$. If $f(x)$ is positive, it is possible for $\mathrm{f}^{\prime}(\mathrm{x})$ to be positive, negative, zero or undefined: the value of $\mathrm{f}(\mathrm{x})$ has absolutely nothing to do with the value of $\mathrm{f}^{\prime}$. Fig. 12 illustrates some of the combinations of values for $\mathrm{f}$ and $\mathrm{f}'$.

Fig. 12

Practice 5: Graph a continuous function which satisfies the conditions on $\mathrm{f}$ and $\mathrm{f}'$ given below

$\begin{array}{l|c|c|c|c|c|c}\mathrm{x} & -2 & -1 & 0 & 1 & 2 & 3 \\\hline \mathrm{f}(\mathrm{x}) & 1 & -1 & -2 & -1 & 0 & 2 \\\hline \mathrm{f}^{\prime}(\mathrm{x}) & -1 & 0 & 1 & 2 & -1 & 1\end{array}$

The Second Shape Theorem is particularly useful if we need to graph a function $\mathrm{f}$ which is defined by an equation. Between any two consecutive critical numbers of $\mathrm{f}$, the graph of $\mathrm{f}$ is monotonic (why?). If we can find all of the critical numbers of $f$, then the domain of $\mathrm{f}$ will be naturally broken into a number of pieces on which $\mathrm{f}$ will be monotonic.

Example 4: Use information about the values of $\mathrm{f}'$ to help graph $f(\mathrm{x})=\mathrm{x}^{3}-6 \mathrm{x}^{2}+9 \mathrm{x}+1$.

Solution: $\mathrm{f}^{\prime}(\mathrm{x})=3 \mathrm{x}^{2}-12 \mathrm{x}+9=3(\mathrm{x}-1)(\mathrm{x}-3)$ so $\mathrm{f}^{\prime}(\mathrm{x})=0$ only when $\mathrm{x}=1$ or $\mathrm{x}=$. $\mathrm{f}^{\prime}$ is a polynomial so it is always defined. The only critical numbers for $\mathrm{f}$ are $\mathrm{x}=1$ and $\mathrm{x}=3$, and they divide the real number line into three pieces on which $\mathrm{f}$ is monotonic: $(-\infty, 1),(1,3)$ and $(3, \infty)$.

If $x < 1$, then $f^{\prime}(x)=3$ (negative number)(negative number) $> 0$ so $f$ is increasing.
If $1 < x < 3$, then $f^{\prime}(x)=3$ (positive number)(negative number) $< 0$ so $f$ is decreasing.
If $3 < x$, then $f^{\prime}(x)=3$ (positive number)(positive number) $> 0$ so $f$ is increasing.

Even though we don't know the value of $f$ anywhere yet, we do know a lot about the shape of the graph of $\mathrm{f}$: as we move from left to right along the $x$-axis, the graph of $f$ increases until $x=1$, then the graph decreases until $\mathrm{x}=3$, and then the graph increases again (Fig. 13) The graph of $\mathrm{f}$ makes "turns" when $\mathrm{x}=1$ and $\mathrm{x}=3$.

Fig. 13

To plot the graph of $\mathrm{f}$, we still need to evaluate $\mathrm{f}$ at a few values of $x$, but only at a very few values. $f(1)=5$, and $(1,5)$ is a local maximum of $f$. $f(3)=1$, and $(3,1)$ is a local minimum of $f$. The graph of $f$ is shown in Fig. 14.

Fig. 14

Practice 6: Use information about the values of $\mathrm{f}^{\prime}$ to help graph $\mathrm{f}(\mathrm{x})=\mathrm{x}^{3}-3 \mathrm{x}^{2}-24 \mathrm{x}+5$.

Example 5: Use the graph of $\mathrm{f}'$ in Fig. 15 to sketch the shape of the graph of $\mathrm{f}$. Why isn't the graph of $\mathrm{f}'$ enough to completely determine the graph of $\mathrm{f}$?

Fig. 15

Solution: Several functions which have the derivative we want are given in Fig. 16 , and each of them is a correct answer. By the Second Corollary to the Mean Value Theorem, we know there is a whole family of parallel functions which have the derivative we want, and each of these functions is a correct answer. If we had additional information about the function such as a point it went through, then only one member of the family would satisfy the extra condition and that function would be the only correct answer.

Fig. 16

Practice 7: Use the graph of $\mathrm{g}'$ in Fig. 17 to sketch the shape of a graph of $\mathrm{g}$.

Fig. 17

Practice 8: A weather balloon is released from the ground and sends back its upward velocity measurements (Fig. 18). Sketch a graph of the height of the balloon. When was the balloon highest?

Fig. 18