The sign of the derivative indicates if a function is increasing, decreasing, or constant.

In Section 2.14, the concepts of increasing and decreasing functions were introduced. In this section, we learn how to use differentiation to determine where a function is increasing and where it is decreasing.

Before anything else, let’s review the concepts of increasing and decreasing functions.

### Review of Definitions

• A function is said to be increasing when its value increases as the independent variable increases and decreases as the independent variable decreases. In other words, the function is increasing if as we move along the curve from left to right the curve is rising
• A function is said to be decreasing when it decreases as the independent variable increases and increases as the independent variable decreases. In other words, the function is decreasing if as we move along the curve from left to right, the curve is falling.

Mathematically speaking, a function $$f$$ is increasing on an interval $$I$$ if
$f(x_{1})<f(x_{2})\quad\text{whenever}\quad x_{1}<x_{2}\text{ in }I$ and it is decreasing on $$I$$ if
$f(x_{1})>f(x_{2})\quad\text{whenever}\quad x_{1}<x_{2}\text{ in }I.$ We say $$f$$ is constant on $$I$$ if
$f(x_{1})=f(x_{2})\quad\text{for all points }x_{1}\text{ and }x_{2}\text{ in }I.$

• The graph of a function indicates plainly whether it is increasing or decreasing. Graphs of increasing, decreasing, and constant functions are illustrated in Figure 1.
• A function that is increasing or decreasing is called monotonic.

A function may be sometimes increasing and sometimes decreasing (or neither). For example, the graph of $$f(x)=2x^{3}-12x^{2}+18x-2$$ is illustrated in Figure 2. Figure 2. Graph of $$f(x)=x^{3}-12x^{2}+18x-2$$.

As we move along the curve from left to right, the curve rises until we reach the point $$A$$, then it falls between $$x=1$$ and $$x=3$$, and to the right of $$B$$ it is always rising. Hence,

• The function is increasing when $$-\infty<x\leq1$$
• The function is decreasing when $$1\leq x\leq3$$
• The function is increasing when $$3\leq x<\infty$$

Evidently $$A$$ and $$B$$ are turning points. At $$x=1$$ the function ceases to increase and commences to decreases; at $$x=3$$, the reverse is true. At $$x=1$$ and $$x=3$$ the tangent to the curve is evidently parallel to the $$x$$-axis and therefore the slope is zero.

### Tests for Determining When a Function Is Increasing and When Decreasing

Assume $$f$$ is an increasing function. Let $$y_{0}=f(x_{0})$$ and $$y_{1}=f(x_{1})$$.
$\begin{cases} x_{0}<x_{1}\Rightarrow y_{0}<y_{1} & (\text{or }\Delta x>0\Rightarrow\Delta y>0)\\ x_{0}>x_{1}\Rightarrow y_{0}>y_{1} & (\text{of }\Delta x<0\Rightarrow\Delta y<0) \end{cases}$ where $$\Delta x=x_{1}-x_{0}$$ and $$\Delta y=y_{1}-y_{0}$$. Either $$x_{0}<x_{1}$$ or $$x_{0}>x_{1}$$, we have $\frac{\Delta y}{\Delta x}>0.$ From this argument, we learn that we can verify a differentiable function is increasing where its derivative $f'(x)=\frac{dy}{dx}=\lim_{\Delta x\to0}\frac{\Delta y}{\Delta x}>0.$
Analogously, we can verify that a differentiable function is decreasing where $\frac{dy}{dx}=\lim_{\Delta x\to0}\frac{\Delta y}{\Delta x}<0.$ The precise proof will be given in this section.

### Slope of Graph and Increasing and Decreasing Functions

It is evident from Figure 3 that on the interval where a function $$f(x)$$ is increasing, the tangent line makes a positive acute angle $$\theta$$ with the positive $$x$$-axis; hence
$\text{slope}=\tan\theta=f'(x)>0$ and on the interval where the function is decreasing, the tangent line makes an obtuse angle $$\theta$$ with the positive$$x$$-axis; hence
$\text{slope}=\tan\theta=f'(x)<0.$ Figure 3. The tangent line makes a positive acute angle with the positive $$x$$-axis wherever the function is increasing and makes an obtuse angle wherever the function is decreasing.

### Theorem

These observations lead us to the following theorem:

Theorem 1. Increasing/Decreasing Test. Assume$$f$$ is continuous on the closed interval $$[a,b]$$ and is differentiable on the open interval $$(a,b)$$.

(a) If $$f'(x)>0$$ for every $$x$$ in $$(a,b)$$, then $$f$$ is increasing on $$[a,b]$$.

(b) If $$f'(x)<0$$ for every $$x$$ in $$(a,b)$$, then $$f$$ is decreasing on $$[a,b]$$.

(c) If $$f'(x)=0$$ for every $$x$$ in $$(a,b)$$, then $$f$$ is constant on $$I$$.

• Recall: We say a function is differentiable on an interval if it has a derivative at every point of that interval.

Suppose $$x_{1}$$ and $$x_{2}$$ are any two numbers in $$[a,b]$$ with $$x_{1}<x_{2}$$. To prove (a), we must show that $f(x_{1})<f(x_{2}).$ If we apply the Mean Value Theorem on the interval $$[x_{1},x_{2}]$$, we obtain $f(x_{2})-f(x_{1})=f'(c)(x_{2}-x_{1})$ for some $$c$$ between $$x_{1}$$ and $$x_{2}$$. Because $$f'(c)>0$$ by the hypothesis and $$x_{2}-x_{1}>0$$, the right hand side of the above equation is positive, and so is the left hand side:
$f'(c)>0,\ (x_{2}-x_{1})>0\Rightarrow f(x_{2})-f(x_{1})>0.$
Therefore $$f(x_{2})>f(x_{1})$$, as asserted. The proofs of parts (b) and (c) are similar.

• Although stated for closed intervals, after minor changes we can apply the above theorem to any (finite or infinite) interval $$I$$:

Assume $$f$$ is continuous on an interval $$I$$ and has a (finite or infinite) derivative at every interior point1 of $$I$$. Then
(a) if $$f'(x)>0$$ for every interior point of $$I$$, $$f$$ is increasing on $$I$$
(b) if $$f'(x)<0$$ for every interior point of $$I$$, $$f$$ is decreasing on $$I$$.

Example 1
Determine the intervals on which the following functions are increasing and the intervals on which they are decreasing.
(a) $$f(x)=2x^{2}-5x-7$$
(b) $$f(x)=x^{3}$$
Solution

(a)
$f(x)=2x^{2}-5x-7\Rightarrow f'(x)=4x-5=4\left(x-\frac{5}{4}\right)$

$$-\infty$$ $$\frac{5}{4}$$ $$+\infty$$
sign of $$f'(x)$$ $$- – – –$$ $$0$$ $$++++$$
I/D $$f(x)$$ $$\searrow$$ $$\nearrow$$

$$f'(x)<0$$ when $$-\infty<x<5/4$$ $$\stackrel{\text{I/D test}}{\Rightarrow}$$$$f(x)$$ is decreasing $$\searrow$$ on $$(-\infty,5/4]$$
$$f'(x)>0$$ when $$5/4<x<+\infty$$ $$\stackrel{\text{I/D test}}{\Rightarrow}$$$$f(x)$$ is increasing $$\nearrow$$ on $$[5/4,\infty)$$.
Graph of $$y=f(x)$$ shows us that our conclusion is correct. Figure 4. Graph of $$y=2x^{2}-5x-7$$

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

$$-\infty$$ $$0$$ $$+\infty$$
sign of $$f'(x)$$ $$+++++$$ $$0$$ $$+++++$$
I/D $$f(x)$$ $$\nearrow$$ $$\nearrow$$

$$f'(x)<0$$ when $$-\infty<x<0$$ $$\stackrel{\text{I/D test}}{\Rightarrow}$$$$f(x)$$ is increasing $$\nearrow$$ on $$(-\infty,0]$$
$$f'(x)>0$$ when $$0<x<+\infty$$ $$\stackrel{\text{I/D test}}{\Rightarrow}$$$$f(x)$$ is increasing $$\nearrow$$ on $$[0,\infty)$$.
Therefore, $$f$$ is always increasing. Graph of $$y=f(x)$$ shows us that our conclusion is correct. Figure 5. Graph of $$y=x^{3}$$
Example 2
Find where the function $f(x)=x^{3}-3x^{2}+1$ is increasing and where it is decreasing.
Solution
$f(x)=x^{3}-3x^{2}+1\Rightarrow f'(x)=3x^{2}-6x=3x(x-2)$

$$-\infty$$ 0 2 $$+\infty$$
sign of $$x$$ $$- – – -$$ $$0$$ $$++++$$ $$+$$ $$++++$$
sign of $$x-2$$ $$- – – –$$ $$-$$ $$- – – -$$ $$0$$ $$++++$$
$$\therefore$$sign of $$f'(x)$$ $$++++$$ $$0$$ $$- – – –$$ $$0$$ $$++++$$
I/D $$f(x)$$ $$\nearrow$$ $$\searrow$$ $$\nearrow$$

This table shows that $$f(x)$$ is increasing $$\nearrow$$ on $$(-\infty,0]\cup[2,+\infty)$$ (because $$f'(x)>0$$) and is decreasing $$\searrow$$ on $$[0,2]$$ (because
$$f'(x)<0$$). Graph of $$f$$ is shown in the following figure. Figure 6. Graph of $$y=x^{3}-3x^{2}+1$$
Example 3
Determine where $$f(x)=x^{2}e^{-x}$$ is increasing and where it is decreasing.
Solution
$f(x)=x^{2}e^{-x}\Rightarrow f'(x)=2xe^{-x}-x^{2}e^{-x}=e^{-x}(2x-x^{2})$
Because $$e^{-x}>0$$, the sign of $$f'(x)$$ is solely determined by $$2x-x^{2}=x(2-x).$$

$$-\infty$$ 0 2 $$+\infty$$
sign of $$x$$ $$- – – -$$ $$0$$ $$+++++$$ $$+$$ $$++++$$
sign of $$2-x$$ $$++++$$ $$+$$ $$++++$$ $$0$$ $$- – – -$$
$$\therefore$$sign of $$f'(x)$$ $$- – – -$$ $$0$$ $$++++$$ $$0$$ $$- – – -$$
I/D $$f(x)$$ $$\searrow$$ $$\nearrow$$ $$\searrow$$

This table shows that $$f(x)$$ is decreasing $$\searrow$$ on $$(-\infty,0]\cup[2,+\infty)$$ (because $$f'(x)<0$$) and is increasing $$\nearrow$$ on $$[0,2]$$ (because $$f'(x)>0$$). Graph of $$f$$ is shown in the following figure. Figure 7. Graph of $$y=x^{2}e^{-x}$$. This graph shows that this function is decreasing on $$(-\infty,0]$$ and $$[2,+\infty)$$ and is increasing on $$[0,2]$$.
Example 4
Determine where $$f(x)=\sqrt{x}(x-2)$$ is increasing and where it is decreasing.
Solution
To differentiate $$f$$, it is easier to rewrite $$f(x)$$ as

$f(x)=x^{1/3}(x-2)=x^{4/3}-2x^{1/3}$
\begin{align} \Rightarrow f'(x) & =\frac{4}{3}x^{1/3}-\frac{2}{3}x^{-2/3}\\ & =\frac{2}{3}x^{-2/3}(2x-1)\\ & =\frac{2(2x-1)}{x^{2/3}}\end{align} So $$f'(1/2)=0$$ and $$f'(0)$$ does not exist. Because $$x^{2/3}\geq0$$, the sign of $$f'(x)$$ is determined by $$2x-1$$.

$$-\infty$$ 0 $$1/2$$ $$+\infty$$
sign of $$2x-1$$ $$- – – -$$ $$-$$ $$- – – -$$ $$0$$ $$++++$$
sign of $$x^{2/3}$$ $$++++$$ $$0$$ $$++++$$ $$+$$ $$++++$$
$$\therefore$$sign of $$f'(x)$$ $$- – – -$$ $$-\infty$$ $$– – -$$ $$0$$ $$++++$$
I/D $$f(x)$$ $$\searrow$$ $$\searrow$$ $$\nearrow$$

The function is decreasing on $$(-\infty,0]$$ and $$[0,1/2]$$ (we have included the point 0 in these intervals because $$f$$ is continuous at $$x=0$$) and thus is decreasing on the union of these intervals $$(-\infty,1/2]$$. The function is increasing on $$[1/2,+\infty)$$. Graph of $$f$$ is shown in the following figure. Figure 8. Graph of $$y=x^{1/3}(x-2)$$. This graph shows that this function is decreasing on $$(-\infty,1/2]$$ and is increasing on $$[1/2,+\infty)$$.

Theorem 1 may fail, if $$f$$ is not continuous at all points of $$I$$. For example, let $$f(x)=1/x$$. Although $$f'(x)=-1/x^{2}<0$$, $$f$$ is NOT decreasing on $$(-\infty,\infty)$$ (See Figure 9(a)). In fact, in this case, because $$f$$ is not continuous at $$x=0$$, Theorem 1 is not applicable. However, if consider $$I=(-\infty,0)$$ or $$I=(0,\infty)$$, we can say $$f$$ is decreasing on $$I$$ because $$f’$$ exists and is negative at every point of $$I$$. As another example, consider the function $$g$$ whose graph is shown in Figure 9(b). Although $$g'(x)>0$$ (except at the point of discontinuity where $$g'(x)$$ does not exist), $$g$$ is not an increasing function on its entire domain. Again Theorem 1 is not applicable because $$g$$ is discontinuous at a point. (a) Graph of $$y=f(x)=\frac{1}{x}$$. $$f$$ is not monotonic on $$(-\infty,+\infty)$$ because (according to this figure) $$x_{0}f(x_{1})$$ but $$x_{1}g(x_{2})$$ Figure 9.

Q: If $$f'(x_{0})>0$$, is $$f$$ increasing on some neighborhood of $$x_{0}$$?
A: If $$f’$$ is continuous at $$x_{0}$$, then $$f'(x)$$ is positive in some neighborhood of $$x_{0}$$,2 and hence the function is increasing in that neighborhood. This is the case in almost all problems that we deal with in elementary calculus. However, if $$f’$$ is not continuous at $$x_{0}$$, $$f'(x_{0})>0$$ does not imply that $$f$$ is an increasing function on some interval containing $$x_{0}$$. For example, consider the following function $f(x)=\begin{cases} x+2x^{2}\sin\frac{1}{x} & \text{if }x\neq0\\ 0 & \text{if }x=0 \end{cases}$ Using the definition of the derivative, we can show $$f'(0)=1>0$$ \begin{align} f'(0) & =\lim_{h\to0}\frac{f(0+h)-f(0)}{h}\\ & =\lim_{h\to0}\frac{h+2h^{2}\sin\frac{1}{h}}{h}\\ & =\lim_{h\to0}\left(1+2h\sin\frac{1}{h}\right)\\ & =\lim_{h\to0}1+2\lim_{h\to0}h\sin\frac{1}{h}\\ & =1+0\\ & =1\end{align} [Recall that $$\lim_{x\to0}x\sin\frac{1}{x}=0$$. See Section 4.4] and thus
$f'(x)=\begin{cases} 1-2\cos\frac{1}{x}+4x\sin\frac{1}{x} & \text{if }x\neq0\\ 1 & \text{if }x=0 \end{cases}$ $$f'(x)$$ assumes both positive and negative values in every neighborhood of $$0$$ (See Figure 10
). Therefore, $$f$$ is neither increasing nor decreasing on any interval containing $$0$$. Figure 10. Graph of $$y=f'(x)=1-2\cos\frac{1}{x}+4x\sin\frac{1}{x}$$.