$\newenvironment {prompt}{}{} \newcommand {\ungraded }{} \newcommand {\todo }{} \newcommand {\oiint }{{\large \bigcirc }\kern -1.56em\iint } \newcommand {\mooculus }{\textsf {\textbf {MOOC}\textnormal {\textsf {ULUS}}}} \newcommand {\npnoround }{\nprounddigits {-1}} \newcommand {\npnoroundexp }{\nproundexpdigits {-1}} \newcommand {\npunitcommand }{\ensuremath {\mathrm {#1}}} \newcommand {\RR }{\mathbb R} \newcommand {\R }{\mathbb R} \newcommand {\N }{\mathbb N} \newcommand {\Z }{\mathbb Z} \newcommand {\sagemath }{\textsf {SageMath}} \newcommand {\d }{\mathop {}\!d} \newcommand {\l }{\ell } \newcommand {\ddx }{\frac {d}{\d x}} \newcommand {\zeroOverZero }{\ensuremath {\boldsymbol {\tfrac {0}{0}}}} \newcommand {\inftyOverInfty }{\ensuremath {\boldsymbol {\tfrac {\infty }{\infty }}}} \newcommand {\zeroOverInfty }{\ensuremath {\boldsymbol {\tfrac {0}{\infty }}}} \newcommand {\zeroTimesInfty }{\ensuremath {\small \boldsymbol {0\cdot \infty }}} \newcommand {\inftyMinusInfty }{\ensuremath {\small \boldsymbol {\infty -\infty }}} \newcommand {\oneToInfty }{\ensuremath {\boldsymbol {1^\infty }}} \newcommand {\zeroToZero }{\ensuremath {\boldsymbol {0^0}}} \newcommand {\inftyToZero }{\ensuremath {\boldsymbol {\infty ^0}}} \newcommand {\numOverZero }{\ensuremath {\boldsymbol {\tfrac {\#}{0}}}} \newcommand {\dfn }{\textbf } \newcommand {\unit }{\mathop {}\!\mathrm } \newcommand {\eval }{\bigg [ #1 \bigg ]} \newcommand {\seq }{\left ( #1 \right )} \newcommand {\epsilon }{\varepsilon } \newcommand {\phi }{\varphi } \newcommand {\iff }{\Leftrightarrow } \DeclareMathOperator {\arccot }{arccot} \DeclareMathOperator {\arcsec }{arcsec} \DeclareMathOperator {\arccsc }{arccsc} \DeclareMathOperator {\si }{Si} \DeclareMathOperator {\scal }{scal} \DeclareMathOperator {\sign }{sign} \newcommand {\arrowvec }{{\overset {\rightharpoonup }{#1}}} \newcommand {\vec }{{\overset {\boldsymbol {\rightharpoonup }}{\mathbf {#1}}}\hspace {0in}} \newcommand {\point }{\left (#1\right )} \newcommand {\pt }{\mathbf {#1}} \newcommand {\Lim }{\lim _{\point {#1} \to \point {#2}}} \DeclareMathOperator {\proj }{\mathbf {proj}} \newcommand {\veci }{{\boldsymbol {\hat {\imath }}}} \newcommand {\vecj }{{\boldsymbol {\hat {\jmath }}}} \newcommand {\veck }{{\boldsymbol {\hat {k}}}} \newcommand {\vecl }{\vec {\boldsymbol {\l }}} \newcommand {\uvec }{\mathbf {\hat {#1}}} \newcommand {\utan }{\mathbf {\hat {t}}} \newcommand {\unormal }{\mathbf {\hat {n}}} \newcommand {\ubinormal }{\mathbf {\hat {b}}} \newcommand {\dotp }{\bullet } \newcommand {\cross }{\boldsymbol \times } \newcommand {\grad }{\boldsymbol \nabla } \newcommand {\divergence }{\grad \dotp } \newcommand {\curl }{\grad \cross } \newcommand {\lto }{\mathop {\longrightarrow \,}\limits } \newcommand {\bar }{\overline } \newcommand {\surfaceColor }{violet} \newcommand {\surfaceColorTwo }{redyellow} \newcommand {\sliceColor }{greenyellow} \newcommand {\vector }{\left \langle #1\right \rangle } \newcommand {\sectionOutcomes }{} \newcommand {\HyperFirstAtBeginDocument }{\AtBeginDocument }$

We use derivatives to help locate extrema.

Whether we are interested in a function as a purely mathematical object or in connection with some application to the real world, it is often useful to know what the graph of the function looks like. We can obtain a good picture of the graph using certain crucial information provided by derivatives of the function.

### Extrema

A local extremum of a function $f$ is a point $(a,f(a))$ on the graph of $f$ where the $y$-coordinate is larger (or smaller) than all other $y$-coordinates of points on the graph whose $x$-coordinates are “close to” $a$.

In our next example, we clarify the definition of a local minimum.

Local maximum and minimum points are quite distinctive on the graph of a function, and are, therefore, useful in understanding the shape of the graph. Many problems in real world and in different scientific fields turn out to be about finding the smallest (or largest) value that a function achieves (for example, we might want to find the minimum cost at which some task can be performed).

### Critical points

Consider the graph of the function $f$.

The function $f$ has four local extremums: at $x=-4$, $x=-2$, $x=0$ and $x=4$. Notice that the function $f$ is not differentiable at $x=-4$ and $x=-2$. Notice that $f'(0)=0$ and $f'(4)=0$.

After this example, the following theorem should not come as a surprise.

Does Fermat’s Theorem say that if $f'(a) = 0$, then $f$ has a local extrema at $x=a$?
yes no

Fermat’s Theorem says that the only points at which a function can have a local maximum or minimum are points at which the derivative is zero or the derivative is undefined. As an illustration of the first scenario, consider the plots of $f(x) = x^3-4.5x^2+6x$ and $f'(x) = 3x^2-9x+6$.

Make a correct choice that completes the sentence below.

At the point $(1,f(1))$, the function $f$ has

a local maximum a local minimum no local extremum
Select the correct statement.
$f'(1)$ is undefined $f'(1)>0$ $f'(1)=0$ $f'(1)<0$
Make a correct choice that completes the sentence below.

At the point $(1.5,f(1.5))$, the function $f$ has

a local maximum a local minimum no local extremum
Select the correct statement.
$f'(1.5)$ is undefined $f'(1.5)>0$ $f'(1.5)=0$ $f'(1.5)<0$
Make a correct choice that completes the sentence below.

At the point $(2,f(2))$, the function $f$ has

a local maximum a local minimum no local extremum
Select the correct statement.
$f'(2)$ is undefined $f'(2)>0$ $f'(2)=0$ $f'(2)<0$
As an illustration of the second scenario, consider the plots of $f(x) = x^{2/3}$ and $f'(x) = \frac {2}{3x^{1/3}}$:
Make a correct choice that completes the sentence below.

At the point $(-2,f(-2))$, the function $f$ has

a local maximum a local minimum no local extremum
Select the correct statement.
$f'(-2)$ is undefined $f'(-2)>0$ $f'(-2)=0$ $f'(-2)<0$
Make a correct choice that completes the sentence below.

At the point $(0,0)$, the function $f$ has

a local maximum a local minimum no local extremum
Select the correct statement.
$f'(0)$ is undefined $f'(0)>0$ $f'(0)=0$ $f'(0)<0$

This brings us to our next definition.

Since both local maximum and local minimum occur at a critical point, when we locate a critical point, we need to determine which, if either, actually occurs.

### The first derivative test

We will further explore and refine the method of the previous section for deciding whether there is a local maximum or minimum at a critical point. Recall that

• If $f'(x) >0$ on an interval, then $f$ is increasing on that interval.
• If $f'(x) <0$ on an interval, then $f$ is decreasing on that interval.

So how exactly does the derivative tell us whether there is a maximum, minimum, or neither at a point? Use the first derivative test.

Hence we have seen that if $f'$ is zero at a point and increasing on an interval containing that point, then $f$ has a local minimum at the point. If $f'$ is zero at a point and decreasing on an interval containing that point, then $f$ has a local maximum at the point. Thus, we see that we can gain information about $f$ by studying how $f'$ changes. This leads us to our next section.

### Inflection points

If we are trying to understand the shape of the graph of a function, knowing where it is concave up and concave down helps us get a more accurate picture. It is worth summarizing what we have already seen into a single theorem.

Of particular interest are points at which the concavity changes from up to down or down to up.

It is instructive to see some examples of inflection points:

It is also instructive to see some nonexamples of inflection points:

We identify inflection points by first finding $x$ such that $f''(x)$ is zero or undefined and then checking to see whether $f''(x)$ does in fact go from positive to negative or negative to positive at these points.

Note that we need to compute and analyze the second derivative to understand concavity, so we may as well try to use the second derivative test for maxima and minima. If for some reason this fails we can then try one of the other tests.

### The second derivative test

Recall the first derivative test:

• If $f'(x)>0$ for all $x$ that are near and to the left of $a$ and $f'(x)<0$ for all $x$ that are near and to the right of $a$, then the function $f$ has a local maximum at $a$.
• If $f'(x)<0$ for all $x$ that are near and to the left of $a$ and $f'(x)>0$ for all $x$ that are near and to the right of $a$, then the function $f$ has a local minimum at $a$.

Assume that a function $f$ has a critical point at $a$ and that $f'(a)=0$. If $f'$ happens to be decreasing on some interval containing $a$, then it changes from positive to negative at $a$. Therefore, if $f''$ is negative on some interval that contains $a$, then $f'$ is definitely decreasing, so there is a local maximum at the point in question. On the other hand, if $f'$ is increasing, then it changes from negative to positive at $a$. Therefore, if $f''$ is positive on an interval that contains $a$, then $f'$ is definitely increasing, so there is a local minimum at the point in question. We summarize this as the second derivative test.

The second derivative test is often the easiest way to identify local maximum and minimum points. Sometimes the test fails and sometimes the second derivative is quite difficult to evaluate. In such cases we must fall back on one of the previous tests.

If $f''(a)=0$, what does the second derivative test tell us?
The function has a local extremum at $x=a$. The function does not have a local extremum at $x=a$. It gives no information on whether the function has a local extremum at $x=a$.