Local and absolute extrema
Picture a hill road. The top of each hill is the highest point near it, even if a taller hill comes later. That is a local maximum. The highest point on the whole road is the absolute maximum. Valleys give local and absolute minima in the same way.
In symbols, \(f\) has a local maximum at \(c\) if \(f(c) \ge f(x)\) for every \(x\) close to \(c\). It has an absolute maximum at \(c\) on a set if \(f(c) \ge f(x)\) for every \(x\) in that set. Flip the inequality for minima. The word extremum (plural extrema) covers both.
If \(f\) has a local maximum or minimum at an interior point \(c\), then \(f'(c) = 0\) or \(f'(c)\) does not exist. Such a point is called a critical point.
Why? At the top of a smooth hill the tangent is flat. If the slope there were positive, a step to the right would take you higher; if it were negative, a step to the left would. Only a zero slope, or a sharp corner like \(|x|\) at \(0\), lets a point be a peak or a dip.
The reverse is not true. \(f(x) = x^3\) has \(f'(0) = 0\), yet the graph keeps climbing through the origin. A critical point is only a candidate. A test decides what it is.
The first and second derivative tests
First derivative test. Check the sign of \(f'(x)\) just to the left and just to the right of the critical point \(c\). This is the same sign work you do for increasing and decreasing functions.
| Sign of \(f'\), left to right | The graph | At \(c\) |
|---|---|---|
| \(+\) then \(-\) | rises, then falls | local maximum |
| \(-\) then \(+\) | falls, then rises | local minimum |
| no change | keeps rising or keeps falling | neither |
Second derivative test. Suppose \(f'(c) = 0\). The sign of \(f''(c)\) tells you which way the curve bends.
\(f''(c) < 0\): the curve bends downwards, so \(c\) is a local maximum.
\(f''(c) > 0\): the curve bends upwards, so \(c\) is a local minimum.
\(f''(c) = 0\): the test gives no answer.
When \(f''(c) = 0\). "No answer" does not mean "no extremum". Go back to the first derivative test, which always works. Or keep differentiating until some derivative at \(c\) is not zero. If that first non-zero derivative has even order, \(c\) is an extremum: a maximum if it is negative, a minimum if it is positive. If it has odd order, \(c\) is neither.
For \(f(x) = x^4\) at \(0\): \(f''(0) = f'''(0) = 0\) and \(f^{(4)}(0) = 24 > 0\), even order, so \(0\) is a minimum. For \(f(x) = x^3\): \(f'''(0) = 6\), odd order, so \(0\) is not an extremum.
Absolute maximum and minimum on a closed interval
A continuous function on a closed interval \([a, b]\) always reaches a greatest and a least value. Each one happens either at a critical point inside the interval or at an end point. That gives a short method:
- Find \(f'(x)\) and the critical points that lie inside \((a, b)\).
- Work out \(f\) at each of those points and at both end points \(a\) and \(b\).
- The largest of these numbers is the absolute maximum; the smallest is the absolute minimum.
You don't need the second derivative test here. Comparing values is enough. The end points are where marks get lost, as Example 3 shows.
Word problems in five steps
- Draw a figure and name the lengths with letters.
- Write the quantity to be made largest or smallest (area, volume, cost, distance).
- Use the given condition (fixed perimeter, fixed volume, a point on a curve) to write it in terms of one variable.
- Write the allowed range of that variable. A length can't be negative.
- Differentiate, solve \(f'(x) = 0\), confirm the max or min with a test, and answer the question that was asked, with units.
If the problem has two independent variables, like \(f(x, y)\) with no condition linking them, you need maxima and minima of two variables instead.
Solved examples
Example 1: Second derivative test
EasyFind the local maximum and minimum values of \(f(x) = x^3 - 3x\).
- \(f'(x) = 3x^2 - 3 = 3(x - 1)(x + 1)\), so the critical points are \(x = -1\) and \(x = 1\).
- \(f''(x) = 6x\). At \(x = -1\): \(f''(-1) = -6 < 0\), a local maximum, value \(f(-1) = -1 + 3 = 2\).
- At \(x = 1\): \(f''(1) = 6 > 0\), a local minimum, value \(f(1) = 1 - 3 = -2\).
AnswerLocal maximum \(2\) at \(x = -1\); local minimum \(-2\) at \(x = 1\)
Example 2: When f'' = 0
MediumFind and classify the critical points of \(f(x) = x^4 - 4x^3\).
- \(f'(x) = 4x^3 - 12x^2 = 4x^2(x - 3)\). Critical points: \(x = 0\) and \(x = 3\).
- \(f''(x) = 12x^2 - 24x\). \(f''(3) = 108 - 72 = 36 > 0\), so \(x = 3\) is a local minimum, value \(81 - 108 = -27\).
- \(f''(0) = 0\), so the second derivative test fails at \(x = 0\). Use the first derivative test instead.
- \(4x^2\) is never negative, so the sign of \(f'\) is the sign of \(x - 3\): negative on both sides of \(0\). No sign change.
AnswerLocal minimum \(-27\) at \(x = 3\); \(x = 0\) is neither a maximum nor a minimum
Example 3: Closed interval
MediumFind the absolute maximum and minimum of \(f(x) = 2x^3 - 15x^2 + 36x + 1\) on \([1, 5]\).
- \(f'(x) = 6x^2 - 30x + 36 = 6(x - 2)(x - 3)\). Both critical points, 2 and 3, lie inside \([1, 5]\).
- Values: \(f(1) = 24\), \(f(2) = 29\), \(f(3) = 28\), \(f(5) = 250 - 375 + 180 + 1 = 56\).
- Largest is 56, smallest is 24. Both happen at end points, not at the critical points.
AnswerAbsolute maximum \(56\) at \(x = 5\); absolute minimum \(24\) at \(x = 1\)
Example 4: Fixed perimeter
EasyA rectangle has perimeter 40 cm. Find the largest possible area.
- Let the sides be \(x\) and \(y\). Then \(2x + 2y = 40\), so \(y = 20 - x\), with \(0 < x < 20\).
- Area \(A = x(20 - x) = 20x - x^2\). \(A'(x) = 20 - 2x = 0\) gives \(x = 10\).
- \(A''(x) = -2 < 0\), a maximum. Then \(y = 10\): the rectangle is a square.
AnswerA \(10\) cm by \(10\) cm square, area \(100\) cm²
Example 5: Open box from a square sheet
MediumEqual squares are cut from the corners of a square sheet of side 18 cm and the sides are folded up to make an open box. What size of square gives the largest volume?
- Let the cut squares have side \(x\) cm. The base is \((18 - 2x)\) by \((18 - 2x)\) and the height is \(x\), with \(0 < x < 9\).
- \(V = x(18 - 2x)^2 = 4x^3 - 72x^2 + 324x\).
- \(V'(x) = 12x^2 - 144x + 324 = 12(x - 3)(x - 9)\). Only \(x = 3\) is in the range; \(x = 9\) would leave no base.
- \(V''(x) = 24x - 144\), and \(V''(3) = -72 < 0\), a maximum. \(V(3) = 3 \times 12^2 = 432\).
AnswerCut squares of side \(3\) cm; the largest volume is \(432\) cm³
Example 6: Cylinder with least surface area
Exam levelA closed cylindrical tin must hold \(250\pi\) cm³. Find the radius and height that use the least metal.
- Volume: \(\pi r^2 h = 250\pi\), so \(h = \dfrac{250}{r^2}\).
- Surface area: \(S = 2\pi r^2 + 2\pi r h = 2\pi r^2 + \dfrac{500\pi}{r}\), for \(r > 0\).
- \(S'(r) = 4\pi r - \dfrac{500\pi}{r^2} = 0\) gives \(r^3 = 125\), so \(r = 5\).
- \(S''(r) = 4\pi + \dfrac{1000\pi}{r^3} > 0\), a minimum. Then \(h = \dfrac{250}{25} = 10\) and \(S = 50\pi + 100\pi = 150\pi\).
- With a general volume \(V\), the same steps give \(4\pi r = \dfrac{2V}{r^2}\), so \(V = 2\pi r^3\). Comparing with \(V = \pi r^2 h\) gives \(h = 2r\): the height equals the diameter.
Answer\(r = 5\) cm, \(h = 10\) cm, least surface area \(150\pi \approx 471\) cm²
Example 7: Nearest point on a curve
Exam levelFind the point on the curve \(x^2 = 2y\) nearest to \((0, 5)\).
- Take a point \((x, y)\) on the curve. The square of its distance from \((0, 5)\) is \(D = x^2 + (y - 5)^2\). The distance is least exactly when \(D\) is least, and \(D\) has no square root.
- On the curve \(x^2 = 2y\), so \(D = 2y + (y - 5)^2\), with \(y \ge 0\).
- \(\dfrac{dD}{dy} = 2 + 2(y - 5) = 0\) gives \(y = 4\). \(\dfrac{d^2D}{dy^2} = 2 > 0\), a minimum.
- Then \(x^2 = 8\), so \(x = \pm 2\sqrt{2}\). Least distance \(= \sqrt{8 + 1} = 3\).
Answer\((2\sqrt{2}, 4)\) and \((-2\sqrt{2}, 4)\), both at distance \(3\)
Example 8: Maximum profit
MediumA shop can sell \(x\) units a week at ₹\((100 - 0.5x)\) each. Making \(x\) units costs ₹\((400 + 20x)\). How many units give the greatest profit?
- Revenue \(R = x(100 - 0.5x) = 100x - 0.5x^2\).
- Profit \(P = R - C = 80x - 0.5x^2 - 400\).
- \(P'(x) = 80 - x = 0\) gives \(x = 80\). \(P''(x) = -1 < 0\), a maximum.
- \(P(80) = 6400 - 3200 - 400 = 2800\). The selling price is then \(100 - 40 = 60\) rupees.
Answer\(80\) units a week, profit ₹2800
In word problems I make students write the allowed range of the variable before they differentiate. In the box problem it is \(0 < x < 9\), and that throws out \(x = 9\) at once. It takes ten seconds and saves you from answers like a box with no base.
Example 8 is the simplest kind of profit question. For marginal revenue and marginal cost, see profit maximisation in the Business Calculus course.
Common mistakes
1. Calling every critical point a max or min
\(f(x) = x^3\) has \(f'(0) = 0\), but \(f(-0.1) < 0 < f(0.1)\). The graph passes straight through. Always confirm with a test.
2. Forgetting the end points
In Example 3 the critical points give 29 and 28. Stopping there gives the wrong absolute maximum. The real answer, 56, is at the end point \(x = 5\).
3. Reading "test fails" as "no extremum"
\(f(x) = x^4\) has \(f''(0) = 0\), yet \(x = 0\) is clearly a minimum, since \(x^4 \ge 0\). When \(f'' = 0\), switch to the first derivative test.
Practice questions
Try each one on paper before you open the answer.
Q1Find the local maximum and minimum values of \(f(x) = x^3 - 6x^2 + 9x + 4\).
\(f'(x) = 3(x - 1)(x - 3)\), \(f''(x) = 6x - 12\). \(f''(1) = -6\): local maximum \(f(1) = 8\). \(f''(3) = 6\): local minimum \(f(3) = 4\).
Q2Find the absolute maximum and minimum of \(f(x) = x^3 - 12x\) on \([-3, 5]\).
\(f'(x) = 3x^2 - 12 = 0\) at \(x = \pm 2\). \(f(-3) = 9\), \(f(-2) = 16\), \(f(2) = -16\), \(f(5) = 65\). Absolute maximum \(65\) at \(x = 5\), absolute minimum \(-16\) at \(x = 2\).
Q3Two positive numbers \(x\) and \(y\) add up to 15. Find them so that \(x^2y\) is as large as possible.
\(f(x) = x^2(15 - x) = 15x^2 - x^3\). \(f'(x) = 30x - 3x^2 = 0\) gives \(x = 10\); \(f''(10) = 30 - 60 < 0\). So \(x = 10\), \(y = 5\), and \(x^2y = 500\).
Q4Find the maximum value of \(f(x) = x e^{-x}\).
\(f'(x) = e^{-x}(1 - x) = 0\) at \(x = 1\). \(f''(x) = e^{-x}(x - 2)\), so \(f''(1) = -\dfrac{1}{e} < 0\). Maximum value \(f(1) = \dfrac{1}{e} \approx 0.368\).
Q5Show that of all rectangles inscribed in a circle of radius \(r\), the square has the largest area.
Put a corner at \((r\cos\theta, r\sin\theta)\), \(0 < \theta < \dfrac{\pi}{2}\). Area \(A = 4r^2\sin\theta\cos\theta = 2r^2\sin 2\theta\).
\(A'(\theta) = 4r^2\cos 2\theta = 0\) at \(\theta = \dfrac{\pi}{4}\), and \(A''\left(\dfrac{\pi}{4}\right) = -8r^2 < 0\). At \(\theta = \dfrac{\pi}{4}\) the sides are equal, so it is a square, area \(2r^2\).
Q6An open tank with a square base must hold 32 m³. Find the dimensions that need the least sheet metal.
Base side \(x\), height \(h = \dfrac{32}{x^2}\). Area \(S = x^2 + 4xh = x^2 + \dfrac{128}{x}\).
\(S'(x) = 2x - \dfrac{128}{x^2} = 0\) gives \(x^3 = 64\), \(x = 4\); \(S'' = 2 + \dfrac{256}{x^3} > 0\). Base \(4\) m by \(4\) m, height \(2\) m, metal \(48\) m².
Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.
Frequently asked questions
What is the difference between a local and an absolute maximum?
A local maximum is higher than the points close to it. An absolute maximum is the highest value over the whole domain or interval. In the diagram in section 1, \(x^3 - 3x\) has a local maximum of 2 at \(x = -1\), but on \([-2, 3]\) its absolute maximum is \(f(3) = 18\).
What is a critical point?
A point in the domain where \(f'(x) = 0\) or where \(f'(x)\) does not exist. Every local maximum or minimum inside an interval is a critical point, but some critical points, like \(x = 0\) for \(x^3\), are neither.
What if the second derivative is zero at a critical point?
The second derivative test can't decide. Use the first derivative test (check the sign of \(f'\) on each side), or find higher derivatives: the first non-zero one decides, as explained in section 2.
How do you find the absolute maximum and minimum on a closed interval?
Find the critical points inside the interval, evaluate \(f\) at them and at both end points, and pick the largest and smallest values. No other point can give a bigger or smaller value.