*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.

Table of Contents

### Review of Definitions

#### Show the review

#### Hide the review

- 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.

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 begins decreasing; 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, meaning the slope is zero.

### 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.\]

### 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.

#### Show the proof

#### Hide the proof

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 point^{*} 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\).

^{*}Any point other than the endpoints

- 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 we 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. Theorem 1 is again 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}<x_{1}\) and \(f(x_{0})>f(x_{1})\), but \( x_{1}<x_{2}\) and \( f(x_{1})<0<f(x_{2})\) |
(b) Graph of \(y=g(x)\). \(g\) is not monotonic on its domain because (according to this figure) \(x_{0}<x_{1}\) and $g(x_{0})<g(x_{1})$, but \(x_{1}<x_{2}\) and \(g(x_{1})>g(x_{2})\) |

Figure 9. |

### A More Advanced Topic

#### Show the more advanced topic

#### Hide the more advanced topic

**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 from Section 4.4 that \(\lim_{x\to0}x\sin\frac{1}{x}=0\)]
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\).