Free lesson

Every lesson is free, no account needed. Make a free account to save your progress.

Live classGet practice + mocks
  1. Home
  2. Lesson Library
  3. Maxima and minima
Basic Calculus · Derivatives

Maxima and Minima with Derivatives

At the top of every peak and the bottom of every valley, the tangent goes flat. Set f′(x) = 0 and the interesting points solve themselves.

Read the graph

x y −1 1 2 −2 (−1, 2) (1, −2)
f(x) = x³ − 3x. The dashed tangents at both turning points are perfectly flat.

At which x does the local maximum occur?

Turning points have flat tangents.

Climb a hill: rising before the top, falling after — so at the very top the slope passes through zero. The same holds at the bottom of a valley. That is the whole strategy: turning points hide where f′(x) = 0.

Set the derivative to zero and solve.

f(x) = x³ − 3x → f′(x) = 3x² − 3

power rule, term by term

3x² − 3 = 0 → x² = 1

the flat-tangent condition

x = −1 or x = 1

two critical points — the graph shows both

A known critical number pins down a missing coefficient. If f(x) = x³ + bx² + 24x has a critical number at x = 2, then f′(2) = 12 + 4b + 24 = 0, so b = −9. Now f′(x) = 3x² − 18x + 24 = 3(x − 2)(x − 4), and the other critical number is x = 4.

Which is the peak, which is the valley?

Check the heights, or watch the sign of f′ change as you pass through.

f(−1) = −1 + 3 = 2

the higher one — local maximum

f(1) = 1 − 3 = −2

the lower one — local minimum

f′ changesThe point is a…
+ to −peak — rising, then falling
− to +valley — falling, then rising

Trap: answering with the wrong number

Asked for the local maximum value of f(x) = x³ − 3x, a student solves f′(x) = 0, gets x = −1, and writes “−1”. That is where the peak is; its height is f(−1) = 2. A second slip: taking only the positive root of x² = 1 gives x = 1, and f(1) = −2 gets reported as the maximum — but that point is the valley. Keep both roots, then read which one the question asks for: the x, or f(x).

For parabolas, this is a formula you already know.

y = ax² + bx + c → y′ = 2ax + b = 0

flat-tangent condition

x = −b2a

the vertex formula is calculus in disguise

Every "maximum height" and "minimum cost" question about a quadratic is this one line. The derivative just extends the same idea to curves the vertex formula cannot touch.

Word problems: one formula in one letter, then f′ = 0.

240 m of fencing makes a rectangular field split into two pens by one extra fence parallel to the ends. What is the largest total area?

ends and divider: 3 fences of length x

draw it and count the pieces

3x + 2L = 240 → L = 120 − 1.5x

the constraint removes the second letter

A = x(120 − 1.5x) = 120x − 1.5x²

the thing to maximise, in x only

A′ = 120 − 3x = 0 → x = 40, L = 60

flat tangent

A = 40 × 60 = 2400 m²

check: 3(40) + 2(60) = 240 ✓

The best shape is not always a square

A square of side 48 uses 3(48) + 2(48) = 240 m but encloses only 2304 m². Extra fences (a divider) or missing ones (a wall or river side) shift the best shape. Write the fence equation from the picture, never from habit.

Two numbers with a fixed sum. Two positive numbers add to 15; make the first times the square of the second as large as possible. With the second = y: P = (15 − y)y² = 15y² − y³, P′ = 30y − 3y² = 3y(10 − y) = 0, so y = 10, the first is 5, and P = 5 × 100 = 500.

A rectangle under a curve. Its base is on the x-axis and its top corners are on y = 27 − x². With corners at x and −x, the width is 2x and the height 27 − x²: A = 2x(27 − x²) = 54x − 2x³, A′ = 54 − 6x² = 0, so x = 3 and A = 6 × 18 = 108.

Variations: a flat spot that is not a turn, a closed interval, a 1x term.

f′ = 0 but no turn. Classify the critical point of f(x) = x³ − 6x² + 12x.

f′(x) = 3x² − 12x + 12 = 3(x − 2)²

a perfect square

f′ = 0 only at x = 2

one critical number

f′(1) = 3, f′(3) = 3

+ before, + after: no change of sign

neither — a shelf at (2, 8)

f(2) = 8 − 24 + 24 = 8

What is different: a flat tangent is necessary for a turn but not enough. The curve pauses at x = 2 and keeps rising.

A closed interval. Find the largest and smallest values of f(x) = x³ − 3x² for −1 ≤ x ≤ 4.

f′ = 3x² − 6x = 3x(x − 2) = 0 → x = 0, 2

both inside the interval

f(0) = 0, f(2) = 8 − 12 = −4

the turning points

f(−1) = −1 − 3 = −4, f(4) = 64 − 48 = 16

the two ends

largest 16 (at x = 4), smallest −4

−4 occurs twice: x = −1 and x = 2

What is different: the biggest value sits at an END, where f′ is not 0. On a closed interval, always test the endpoints too.

The local maximum is not the largest value

f(0) = 0 is a peak, so it is tempting to answer 0. But the curve climbs past it to 16 at the right end. “Local” means only among nearby points.

A 1x term, positive x only. Find the minimum of f(x) = x + 9x for x > 0.

f′(x) = 1 − 9x² = 0

9x−1 → −9x−2

x² = 9 → x = 3 (not −3)

−3 breaks x > 0

f(3) = 3 + 3 = 6

check: f(2) = 6.5, f(4) = 6.25, both bigger ✓

What is different: not a polynomial, and the given condition throws one root away before we even classify.

Throw out critical points the problem cannot use.

An open box is made from a 10 cm by 16 cm sheet by cutting squares of side x from the corners. Which x gives the largest volume?

V = x(10 − 2x)(16 − 2x) = 4x³ − 52x² + 160x

height × width × length, expanded

V′ = 12x² − 104x + 160 = 4(3x − 20)(x − 2)

power rule, then factor

x = 2 or x = 203

two candidates

203 > 5: width 10 − 2x would be negative

the domain is 0 < x < 5

x = 2 cm, V = 2 × 6 × 12 = 144 cm³

the only usable one

On the exam

Expect a minimum or maximum value of a polynomial, or a story — fence, box, two numbers with a fixed sum. Build one formula in one letter, set its derivative to zero, reject impossible x, and answer what was asked: the x, the side lengths, or the area itself. Plugging a neighbouring x in (it must give a worse value) is a fast check.

Check the sign of f′ on both sides of each point.

f′(−2) 3(4) − 3 = +9 rising into x = −1…
f′(0) −3 …falling after it: + to −, a peak ✓
f′(2) +9 rising after x = 1: − to +, a valley ✓

Remember the flow

Set f′ = 0 · Solve · Sign change tells peak or valley

Flat tangent first, verdict second.
Now you try

Practice problem

The problem

At which x does f(x) = x² − 4x + 1 reach its minimum?