Derivatives · Class 12 · Lesson 18

Maxima and minima: where the slope is zero.

Short answer

At a local maximum or minimum of a smooth function, \(f'(x) = 0\). Solve \(f'(x) = 0\), then test each point: \(f''(x) < 0\) means a maximum, \(f''(x) > 0\) a minimum.

Example: \(f(x) = x^3 - 3x\) gives \(f'(x) = 3x^2 - 3 = 0\), so \(x = \pm 1\). \(f''(-1) = -6\) (maximum, value 2) and \(f''(1) = 6\) (minimum, value \(-2\)).

Class 12HSC & CBSEDiploma
01

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.

Critical points

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 curve y = x cubed minus 3x with a local maximum at (-1, 2) and a local minimum at (1, -2) x y −1 1 local max (−1, 2) local min (1, −2) f′ > 0 f′ < 0 f′ > 0 y = x³ − 3x
For \(f(x) = x^3 - 3x\), the slope \(f'(x) = 3x^2 - 3\) is zero at \(x = -1\) and \(x = 1\), where the orange tangents are horizontal. The slope changes from positive to negative at \(x = -1\) (a local maximum) and from negative to positive at \(x = 1\) (a local minimum). The local maximum value 2 is not the largest value of \(f\): further right, \(f(2.2)\) is already about 4.05.
02

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 rightThe graphAt \(c\)
\(+\) then \(-\)rises, then fallslocal maximum
\(-\) then \(+\)falls, then riseslocal minimum
no changekeeps rising or keeps fallingneither

Second derivative test. Suppose \(f'(c) = 0\). The sign of \(f''(c)\) tells you which way the curve bends.

Second derivative test

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

03

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:

  1. Find \(f'(x)\) and the critical points that lie inside \((a, b)\).
  2. Work out \(f\) at each of those points and at both end points \(a\) and \(b\).
  3. 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.

04

Word problems in five steps

  1. Draw a figure and name the lengths with letters.
  2. Write the quantity to be made largest or smallest (area, volume, cost, distance).
  3. Use the given condition (fixed perimeter, fixed volume, a point on a curve) to write it in terms of one variable.
  4. Write the allowed range of that variable. A length can't be negative.
  5. 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.

05

Solved examples

Example 1: Second derivative test

Easy

Find the local maximum and minimum values of \(f(x) = x^3 - 3x\).

  1. \(f'(x) = 3x^2 - 3 = 3(x - 1)(x + 1)\), so the critical points are \(x = -1\) and \(x = 1\).
  2. \(f''(x) = 6x\). At \(x = -1\): \(f''(-1) = -6 < 0\), a local maximum, value \(f(-1) = -1 + 3 = 2\).
  3. 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

Medium

Find and classify the critical points of \(f(x) = x^4 - 4x^3\).

  1. \(f'(x) = 4x^3 - 12x^2 = 4x^2(x - 3)\). Critical points: \(x = 0\) and \(x = 3\).
  2. \(f''(x) = 12x^2 - 24x\). \(f''(3) = 108 - 72 = 36 > 0\), so \(x = 3\) is a local minimum, value \(81 - 108 = -27\).
  3. \(f''(0) = 0\), so the second derivative test fails at \(x = 0\). Use the first derivative test instead.
  4. \(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

Medium

Find the absolute maximum and minimum of \(f(x) = 2x^3 - 15x^2 + 36x + 1\) on \([1, 5]\).

  1. \(f'(x) = 6x^2 - 30x + 36 = 6(x - 2)(x - 3)\). Both critical points, 2 and 3, lie inside \([1, 5]\).
  2. Values: \(f(1) = 24\), \(f(2) = 29\), \(f(3) = 28\), \(f(5) = 250 - 375 + 180 + 1 = 56\).
  3. 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

Easy

A rectangle has perimeter 40 cm. Find the largest possible area.

  1. Let the sides be \(x\) and \(y\). Then \(2x + 2y = 40\), so \(y = 20 - x\), with \(0 < x < 20\).
  2. Area \(A = x(20 - x) = 20x - x^2\). \(A'(x) = 20 - 2x = 0\) gives \(x = 10\).
  3. \(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

Medium

Equal 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?

  1. 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\).
  2. \(V = x(18 - 2x)^2 = 4x^3 - 72x^2 + 324x\).
  3. \(V'(x) = 12x^2 - 144x + 324 = 12(x - 3)(x - 9)\). Only \(x = 3\) is in the range; \(x = 9\) would leave no base.
  4. \(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 level

A closed cylindrical tin must hold \(250\pi\) cm³. Find the radius and height that use the least metal.

  1. Volume: \(\pi r^2 h = 250\pi\), so \(h = \dfrac{250}{r^2}\).
  2. Surface area: \(S = 2\pi r^2 + 2\pi r h = 2\pi r^2 + \dfrac{500\pi}{r}\), for \(r > 0\).
  3. \(S'(r) = 4\pi r - \dfrac{500\pi}{r^2} = 0\) gives \(r^3 = 125\), so \(r = 5\).
  4. \(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\).
  5. 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 level

Find the point on the curve \(x^2 = 2y\) nearest to \((0, 5)\).

  1. 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.
  2. On the curve \(x^2 = 2y\), so \(D = 2y + (y - 5)^2\), with \(y \ge 0\).
  3. \(\dfrac{dD}{dy} = 2 + 2(y - 5) = 0\) gives \(y = 4\). \(\dfrac{d^2D}{dy^2} = 2 > 0\), a minimum.
  4. 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

Medium

A 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?

  1. Revenue \(R = x(100 - 0.5x) = 100x - 0.5x^2\).
  2. Profit \(P = R - C = 80x - 0.5x^2 - 400\).
  3. \(P'(x) = 80 - x = 0\) gives \(x = 80\). \(P''(x) = -1 < 0\), a maximum.
  4. \(P(80) = 6400 - 3200 - 400 = 2800\). The selling price is then \(100 - 40 = 60\) rupees.

Answer\(80\) units a week, profit ₹2800

Vipul Sir's tip

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.

06

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.

07

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

Stuck on a question?

Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.

08

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.

Related lessons

← All derivatives lessons
Vipul Sir
Written by Vipul Sir

Vipul Sir has taught mathematics for over 15 years to HSC, CBSE, ICSE, IGCSE/IB, Diploma, Engineering and BSc students at VVS Classes in Goregaon and Vile Parle, Mumbai. He teaches every class himself, concepts first and exam technique second.

Class 11 & 12 Maths

Differentiation gets easy once the basics click.

Concept-first classes in small batches in Goregaon and Vile Parle, or online, for HSC, CBSE and ICSE students. Your first class is free.

WhatsApp↗