6.3 Maxima and Minima: Local Extrema and Derivative Tests
Peaks and valleys of a graph happen where the graph stops rising and starts falling, or the reverse. Find the critical points, then let the sign of $f'$ — or the sign of $f''$ — tell you which is which.
The trek from the base village to the top of a Himalayan pass rarely climbs steadily: the trail rises to a ridge, dips to a stream, then climbs again. A trekker's altitude log has high points and low points along the way, and none of them need be the highest or lowest point of the whole trek — each is only the highest or lowest point nearby. The same happens with a company's quarterly profit, the water level of a river in a week of patchy rain, or the voltage in an electric circuit.
In this section we make "highest point nearby" precise as a local maximum (and "lowest point nearby" as a local minimum), show that for a smooth function such points can only occur where $f'(x)=0$, and learn two tests that classify each candidate: the first derivative test, which watches the sign of $f'$ change, and the second derivative test, which reads the sign of $f''$. Section 6.4 then hunts for the overall highest and lowest values.
Local Maxima, Local Minima and Critical Points
- $c$ is a point of local maximum of $f$ if there is an $h\gt0$ such that $f(c)\ge f(x)$ for all $x$ in $(c-h,c+h)$; the value $f(c)$ is then a local maximum value of $f$;
- $c$ is a point of local minimum of $f$ if there is an $h\gt0$ such that $f(c)\le f(x)$ for all $x$ in $(c-h,c+h)$; the value $f(c)$ is then a local minimum value of $f$.
"Local" means we compare $f(c)$ only with values at points close to $c$. A function can have several local maxima of different heights, and a local maximum value can even be smaller than a local minimum value elsewhere (you will meet such an $f$ in the exercises).
Now picture a smooth graph at the top of a hill. Just before the top it is climbing ($f'\ge0$); just after, it is descending ($f'\le0$). At the very top the slope must be exactly zero. The next theorem makes this precise.
Proof (for a local maximum; a minimum is similar). For all small $h\ne0$, $f(c+h)\le f(c)$, i.e. $f(c+h)-f(c)\le0$. If $h\gt0$, then $\dfrac{f(c+h)-f(c)}{h}\le0$, so the right-hand limit gives $f'(c)\le0$. If $h\lt0$, dividing by the negative $h$ reverses the inequality: $\dfrac{f(c+h)-f(c)}{h}\ge0$, so the left-hand limit gives $f'(c)\ge0$. Both limits equal $f'(c)$, which is therefore $0$. $\square$
Two warnings are built into the hypotheses. The converse is false: $f(x)=x^3$ has $f'(0)=0$ but no extremum at $0$ (it is strictly increasing). And a function may have an extremum where it is not differentiable: $|x|$ has a local minimum at $0$, a sharp corner where $f'(0)$ does not exist. So the candidates are exactly the following points.
By Theorem 6.3, every local extremum of $f$ at an interior point of its domain occurs at a critical point. But not every critical point is a local extremum — so we need tests.
The First Derivative Test
Section 6.2 told us that the sign of $f'$ decides whether $f$ rises or falls. Rising then falling makes a peak; falling then rising makes a valley; rising then rising again (or falling then falling) makes neither.
- if $f'(x)\gt0$ to the left of $c$ and $f'(x)\lt0$ to the right of $c$ ($f'$ changes sign from $+$ to $-$), then $c$ is a point of local maximum;
- if $f'(x)\lt0$ to the left and $f'(x)\gt0$ to the right ($-$ to $+$), then $c$ is a point of local minimum;
- if $f'(x)$ has the same sign on both sides of $c$, then $c$ is neither a point of local maximum nor of local minimum. If moreover $f'(c)=0$, such a point is called a point of inflection.
Why. In case 1, Theorem 6.2 says $f$ is strictly increasing on an interval $(c-h,c]$ and strictly decreasing on $[c,c+h)$; so every $x$ near $c$ has $f(x)\lt f(c)$. Case 2 is the mirror image, and in case 3 $f$ is strictly monotonic through $c$, so there are smaller values on one side and larger on the other.
- Find $f'(x)$ and factorise it. List the critical points: solutions of $f'(x)=0$, and points of the domain where $f'$ does not exist.
- Make the sign chart of $f'$ (Section 6.2).
- At each critical point read the sign change: $+\to-$ local max; $-\to+$ local min; no change: neither.
- Find the local extreme values by substituting into $f$ (not into $f'$).
The Second Derivative Test
Making a full sign chart can be slow, especially for trigonometric functions. There is a quicker test at a stationary point. At the bottom of a valley the slope goes from negative to positive, so the slope is increasing there — that is, $f''(c)\gt0$. At the top of a hill the slope is decreasing: $f''(c)\lt0$. Think of a cup ($f''\gt0$, holds water, bottom is a minimum) and a cap ($f''\lt0$, top is a maximum).
- If $f''(c)\lt0$, then $c$ is a point of local maximum and $f(c)$ is a local maximum value.
- If $f''(c)\gt0$, then $c$ is a point of local minimum and $f(c)$ is a local minimum value.
- If $f''(c)=0$, the test fails: it gives no information, and we go back to the first derivative test.
Why. Suppose $f''(c)\gt0$. Since $f'(c)=0$, $$f''(c)=\lim_{h\to0}\frac{f'(c+h)-f'(c)}{h}=\lim_{h\to0}\frac{f'(c+h)}{h}\gt0.$$ So for small $h\ne0$ the quotient $\dfrac{f'(c+h)}{h}$ is positive: $f'(c+h)\lt0$ when $h\lt0$ and $f'(c+h)\gt0$ when $h\gt0$. That is the sign change $-\to+$, and Theorem 6.4 gives a local minimum. The case $f''(c)\lt0$ is the same with signs reversed.
Case 3 really does tell us nothing: $x^4$, $-x^4$ and $x^3$ all have $f'(0)=f''(0)=0$, yet $0$ is a local minimum of the first, a local maximum of the second, and neither for the third. Interactive 2 shows all three.
1. "$f'(c)=0$, so there is a maximum or minimum." Not necessarily — check the sign change ($x^3$ at $0$).
2. Concluding from $f''(c)=0$. When $f''(c)=0$ the second derivative test is silent. Do not write "point of inflection" or "neither" without the first derivative test.
3. Missing corners. Critical points include points where $f'$ does not exist, such as $x=-1$ for $2-|x+1|$. The second derivative test cannot be used there; the first derivative test can.
4. Reporting the point instead of the value. "The local maximum value" is $f(c)$; "the point of local maximum" is $c$. Read the question.
5. Mixing up the signs. $f''\lt0$ means maximum (a cap, $\frown$). If you forget, test on $f(x)=-x^2$: $f''=-2\lt0$ and $0$ is clearly a maximum.
Exercises
- 1 $f(x)=(2x-1)^2+3$
- 2 $f(x)=10-(x-1)^2$
- 3 $f(x)=|x+2|-1$
- 4 $f(x)=x^3+1$
- 5 $f(x)=x^3-3x$
- 6 $f(x)=x^4-4x^3+4x^2$
- 7 $f(x)=xe^x$
- 8 $f(x)=x^{2/3}(x-5)$
- 1 $f(x)=x^3-12x+5$
- 2 $f(x)=2x^3-21x^2+36x-20$
- 3 $f(x)=x+\dfrac1x$, $x\ne0$
- 4 $f(x)=\sin x+\cos x$, $0\lt x\lt\tfrac\pi2$
- 5 $f(x)=x\sqrt{1-x}$, $x\lt1$
- 6 $f(x)=x^2e^{-x}$
- 7 $f(x)=\dfrac{\log x}{x}$, $x\gt0$
- 8 $f(x)=x^5$
- 1 $f(x)=x^3+ax^2+bx+1$ has local extrema at $x=1$ and $x=2$. Find $a$ and $b$, and say which point is the local maximum.
- 2 Find $a$ so that $f(x)=x^2+\dfrac ax$ has a local minimum at $x=2$. Confirm it is a minimum.
- 3 Show that $f(x)=e^x$ has no local extrema.
- 4 Show that $f(x)=x^3-3x^2+3x+5$ has no local extremum, although $f'(1)=0$.
- 5 Show that $f(x)=ax^2+bx+c$ $(a\ne0)$ has exactly one local extremum, at $x=-\dfrac b{2a}$, and that it is a minimum if $a\gt0$ and a maximum if $a\lt0$.
- 6 Without calculation, sketch a continuous function on $\mathbb R$ with local maxima at $x=-2$ and $x=2$, a local minimum at $x=0$, and no other critical points. Draw the sign chart of its derivative.
- 1 Cricket. A ball hit straight up has height $h(t)=2+24.5t-4.9t^2$ metres after $t$ seconds. Find its greatest height and when it is reached; confirm with the second derivative test.
- 2 Reservoir. The water level of a reservoir over a month is modelled by $L(t)=t^3-18t^2+81t+100$ centimetres above a mark, $0\le t\le12$ (days). Find the local maximum and minimum levels and the days on which they occur.
- 3 Medicine. For $C(t)=50te^{-0.5t}$ mg/L (Section 6.2, Exercise IV 3), find the peak concentration and when it occurs.
- 4 Production. A firm's profit, in thousands of rupees, from $x$ hundred units is $P(x)=-x^3+30x^2-225x+50$ for $0\le x\le20$. Find and classify the critical points of $P$ in $(0,20)$ and the local maximum profit.
How this is examined: Board papers ask for local maximum and minimum values "using the first derivative test" or "using the second derivative test" (3 marks — use the test named!), plus MCQs on critical points and Assertion–Reason on $f'(c)=0$. JEE asks you to recover constants from given extrema and to count or add extreme values of a polynomial.
E1. Board · 1 mark The local minimum value of $f(x)=x^2-4x+7$ is (A) $3$ (B) $2$ (C) $7$ (D) $-3$
E2. Board · 1 mark Assertion–Reason. Assertion (A): $f(x)=x^3$ has a local extremum at $x=0$. Reason (R): $f'(0)=0$. (A) Both A and R are true and R is the correct explanation of A (B) Both A and R are true but R is not the correct explanation of A (C) A is true but R is false (D) A is false but R is true
E3. Board · 3 marks Using the second derivative test, find the local maximum and local minimum values of $f(x)=x^3-6x^2+9x-8$.
E4. Board · Case study A section of a roller-coaster track has height $h(x)=0.01x^3-0.6x^2+9x+10$ metres at horizontal distance $x$ metres from the start, $0\le x\le40$. (i) Find the critical points of $h$ in $(0,40)$. [1 mark] (ii) Use the second derivative test to classify them. [2 marks] (iii) Find the heights of the hill-top and the valley. [1 mark]
E5. JEE Main If $f(x)=x^3+ax^2+bx$ has a local maximum at $x=1$ and a local minimum at $x=3$, then $f(1)-f(3)$ equals (A) $4$ (B) $0$ (C) $8$ (D) $-4$
E6. JEE Advanced (Numerical answer.) Let $f(x)=x^4-8x^3+22x^2-24x+5$. If $m$ is the number of points of local extremum of $f$ and $S$ is the sum of all its local extreme values (maximum and minimum), find $m-S$.
Research question. Where are the local highs and lows of a real walk or cycle ride, and does a smooth model with calculus find them where the measured data say they are?
Why it matters. Route planners for trekking, cycling races and road building need the peaks and dips of an elevation profile: where a climb ends, where water will collect, where a road needs a culvert. Engineers fit smooth curves to surveyed points and locate the turning points by setting the derivative to zero, exactly as in this section.
What to do.
- Record an elevation profile: use a free phone app that logs altitude along a walk, or read about $15$ points (distance, height) off an online elevation profile of a hill road or trekking route near you.
- Enter the data in a spreadsheet and fit a polynomial trend line of degree $3$ or $4$ to a stretch containing one or two hills; display its equation.
- Differentiate the fitted polynomial by hand, find its critical points, and classify them with the first or second derivative test.
- Compare the model's local maxima and minima (position and height) with the highest and lowest recorded points nearby. How far apart are they?
Tools: Phone altimeter or GPS-logging app, or an online map elevation profile; spreadsheet with polynomial trend lines.
Hand in: The data, the fitted polynomial, your derivative and its sign chart, a table comparing model and measured extrema, and a short comment on when a polynomial model is (and is not) trustworthy.
Going further. Fit degree $2$, $3$, $4$ and $6$ polynomials to the same data. Does a higher degree always give better turning points? What happens near the ends of the data?
🧪 Self-check quiz
Q1. A critical point of $f$ is a point $c$ of its domain where
Q2. As $x$ increases through $c$, $f'(x)$ changes sign from negative to positive. Then $c$ is a point of
Q3. If $f'(c)=0$ and $f''(c)=0$, then
Q4. The local maximum value of $f(x)=-x^2+4x+1$ is
Q5. For $f(x)=|x|$, the point $x=0$ is