The same zero-gradient idea, turned into a tool: write a quantity as a function of one variable, then maximise or minimise it — with the second derivative proving which.
16 min read4 worked examples
Turning stationary points into a tool
Finding and classifying stationary points is useful on its own, but its real power shows up in optimisation: real situations where you want the biggest possible volume, the smallest possible cost, or the least material — subject to some constraint. The method is exactly the same $f'(x)=0$, $f''(x)$ idea from before; the only new step is turning a word problem into a function you can differentiate. The four examples below move through increasingly interesting shapes and constraints — a cylinder, a cylinder trapped inside a sphere, a rectangle fused to a semicircle, and finally an angle rather than a length — to show just how far the same five-step method reaches.
Strategy — the optimisation workflow
Practical "maximum volume / minimum cost" problems follow five steps: (1) introduce variables; (2) write the quantity to optimise as a formula; (3) use the constraint to reduce it to one variable; (4) differentiate, set equal to zero, and solve; (5) classify with the second derivative to confirm it's the max or min asked for. Step 5 is not optional — full marks require you to prove the point is the right type.
Worked example 1
An optimisation problem · minimum surface area of a cylinder
A closed cylindrical can must hold a volume of $250\pi\ \text{cm}^3$. Show that its surface area is $S = 2\pi r^2 + \dfrac{500\pi}{r}$, and find the radius that minimises it.
A closed cylinder of radius r and height h. Fixing the volume πr²h links r and h, so choosing r determines both h and the surface area.
MethodReduce to one variable, then minimise
1
Volume: $\pi r^2 h = 250\pi \Rightarrow h = \dfrac{250}{r^2}$.
The constraint links r and h.
2
A closed can has two circular ends plus a curved side: $S = 2\pi r^2 + 2\pi rh$.
Differentiate and solve: $\dfrac{dS}{dr} = 4\pi r - \dfrac{500\pi}{r^2} = 0 \Rightarrow 4r^3 = 500 \Rightarrow r^3 = 125 \Rightarrow r = 5$.
Write $500\pi/r$ as $500\pi r^{-1}$ first.
5
$\dfrac{d^2S}{dr^2} = 4\pi + \dfrac{1000\pi}{r^3}$, which is positive for every $r>0$ — so $r=5$ is guaranteed to be a minimum without even substituting in.
Both terms are positive whenever r is.
▪ minimised
Look deeper — a neat by-product
Back-substituting, $h = 250/25 = 10$ cm — so the minimising can has $h = 2r$: its height equals its diameter. This isn't a coincidence; it's a famous result for closed cylinders, and it's why some real drinks cans (which also have to be easy to hold and stack) aren't quite this shape. The minimum surface area itself is $S = 2\pi(25) + \dfrac{500\pi}{5} = 50\pi + 100\pi = 150\pi\ \text{cm}^2$.
Worked example 2
An optimisation problem · maximum volume of a cylinder in a sphere
A cylinder of radius $r$ and height $h$ is inscribed in a sphere of radius $6$ cm, so that the rim of each circular end touches the sphere. Show that $V = 36\pi h - \tfrac14 \pi h^3$, and find the value of $h$ that maximises the cylinder's volume.
Cross-section through the centre of the sphere. The right-angled triangle formed by r, h/2 and the sphere's radius 6 gives the constraint via Pythagoras' theorem.
MethodUse Pythagoras for the constraint, then optimise
1
Constraint. Slice the sphere through its centre: the cylinder's half-height $h/2$, its radius $r$, and the sphere's radius $6$ form a right-angled triangle, so $r^2 + \left(\tfrac{h}{2}\right)^2 = 6^2 = 36$.
Pythagoras' theorem on the cross-section.
2
So $r^2 = 36 - \tfrac14 h^2$.
Rearranged, ready to substitute.
3
Volume: $V = \pi r^2 h = \pi\!\left(36 - \tfrac14 h^2\right)h = 36\pi h - \tfrac14 \pi h^3$.
$\dfrac{d^2V}{dh^2} = -\tfrac32 \pi h$, which is negative for every $h>0$ — so this is always a maximum.
A single negative term settles it.
▪ solved
Look deeper — a genuinely 3D constraint
Here the constraint isn't an area or a simple ratio — it's a geometric fact (Pythagoras) linking the cylinder's dimensions to the sphere it sits inside. Back-substituting, $r^2 = 36 - 12 = 24$, so $r = 2\sqrt6$ cm, and the maximum volume is $V = \pi(24)(4\sqrt3) = 96\sqrt3\,\pi\ \text{cm}^3 \approx 522\ \text{cm}^3$ — a little over half the sphere's own volume of $288\pi\ \text{cm}^3$.
Worked example 3
An optimisation problem · maximum area of a Norman window
A "Norman window" is a rectangle of width $x$ and height $y$, topped with a semicircle of diameter $x$. Exactly $20$ m of framing is available for the two vertical sides, the bottom, and the curved top. Show that the enclosed area is $A = 10x - \left(1 + \tfrac{\pi}{4}\right)x^2$, and find the width $x$ that maximises it.
A rectangle of width x and height y, capped with a semicircle of diameter x. The framing runs along the two sides, the bottom, and the curved top — not along the dashed internal join.
MethodMixed shape — combine a rectangle and a semicircle
1
Constraint. The framing is two sides of height $y$, a bottom of length $x$, and a semicircular arc of length $\tfrac12 \pi x$: $2y + x + \tfrac12 \pi x = 20$.
The straight join between rectangle and semicircle isn't framed — it's just glass.
2
Make $y$ the subject: $y = 10 - \tfrac12 x - \tfrac14 \pi x$.
Rearrange, ready to substitute.
3
Quantity to optimise. Area $=$ rectangle $+$ semicircle $= xy + \tfrac12 \pi\!\left(\tfrac{x}{2}\right)^2 = xy + \tfrac18 \pi x^2$.
Differentiate and solve: $\dfrac{dA}{dx} = 10 - \left(2+\tfrac{\pi}{2}\right)x = 0 \Rightarrow x = \dfrac{10}{2+\tfrac{\pi}{2}} = \dfrac{20}{4+\pi} \approx 5.60\ \text{m}$.
Solve for the stationary point.
6
$\dfrac{d^2A}{dx^2} = -\left(2+\tfrac{\pi}{2}\right)$, a negative constant — so this is a maximum for every value of $x$, no substitution needed.
Second derivative doesn't even involve x here.
▪ solved
Look deeper — why the answer isn't a whole number
Not every optimisation problem ends on a clean integer — $\pi$ has worked its way into the coefficient of $x^2$, so the maximising width $x = \tfrac{20}{4+\pi} \approx 5.60$ m is an exact but irrational value. Real exam mark schemes accept the exact fraction or a rounded decimal here; what matters is the method, not tidy arithmetic. The maximum area works out at $A \approx 28.0\ \text{m}^2$.
Worked example 4
An optimisation problem · the longest ladder around a corner
Two corridors meet at a right angle: one is $8$ m wide, the other $1$ m wide. A rigid pole is to be carried horizontally around the corner. If $\theta$ is the angle the pole makes with the wall of the wide corridor, show that the length of the longest pole that fits at that angle is $L(\theta) = \dfrac{8}{\sin\theta} + \dfrac{1}{\cos\theta}$, and find the length of the longest pole that can be carried around the corner.
The pole pivots through the inner corner while touching both outer walls. As θ varies, L(θ) is the length of pole that exactly fits at that angle — the longest pole that can get round the corner is the smallest such L.
MethodMinimise L(θ) — the tightest angle is the binding constraint
1
Setting up. As the pole pivots round the corner at angle $\theta$, it spans both corridors at once. Splitting it into two right-angled triangles, the length across the $8$ m corridor is $\dfrac{8}{\sin\theta}$ and across the $1$ m corridor is $\dfrac{1}{\cos\theta}$, so the pole's total length at that angle is $L(\theta) = \dfrac{8}{\sin\theta} + \dfrac{1}{\cos\theta}$.
Each triangle has the corridor width as the side opposite or adjacent to θ.
2
The key idea. A pole of length $L$ makes it round the corner only if $L \le L(\theta)$ for every angle $\theta$ it has to pass through. So the longest pole that fits is the minimum value of $L(\theta)$ — this is a minimisation, even though we're looking for the "longest" pole.
The tightest squeeze sets the limit.
3
Differentiate using the chain rule on $\csc\theta = (\sin\theta)^{-1}$ and $\sec\theta = (\cos\theta)^{-1}$: $\dfrac{dL}{d\theta} = -\dfrac{8\cos\theta}{\sin^2\theta} + \dfrac{\sin\theta}{\cos^2\theta}$.
Both terms come from the chain rule.
4
Set $=0$ and rearrange: $\dfrac{\sin\theta}{\cos^2\theta} = \dfrac{8\cos\theta}{\sin^2\theta} \Rightarrow \sin^3\theta = 8\cos^3\theta \Rightarrow \tan^3\theta = 8 \Rightarrow \tan\theta = 2$.
Cross-multiply, then take a cube root.
5
$\tan\theta = 2$ gives a $1$-$2$-$\sqrt5$ triangle, so $\sin\theta = \dfrac{2}{\sqrt5}$ and $\cos\theta = \dfrac{1}{\sqrt5}$. Then $L = \dfrac{8}{2/\sqrt5} + \dfrac{1}{1/\sqrt5} = 4\sqrt5 + \sqrt5 = 5\sqrt5\ \text{m} \approx 11.18\ \text{m}$.
Substitute the exact sine and cosine back in.
6
Checking $\dfrac{d^2L}{d\theta^2}$ at this angle gives a positive value, confirming $\theta = \arctan 2$ is a minimum of $L(\theta)$ — exactly what the problem needs.
Positive second derivative ⇒ minimum.
▪ minimised
Look deeper — a different kind of optimisation
This problem has no area or volume in sight, and the variable being optimised is an angle, not a length — a reminder that the five-step workflow applies far beyond boxes and cans. It also flips the usual logic: normally maximising a quantity means finding where its derivative is zero and confirming a maximum; here, the longest pole that fits is found by minimising $L(\theta)$, because the pole has to clear every angle on the way round, not just one.
Common mistake
Three traps specific to optimisation. First, trying to differentiate a formula with two variables still in it — always use the constraint to eliminate one before you differentiate. Second, skipping the second-derivative confirmation: it costs marks even when the stationary point is right. Third, stopping at the variable you solved for instead of answering the actual question — if it asks for the minimum area, the maximum volume, or the pole's length, give that, not just $x$, $h$ or $\theta$.
Check yourself
A farmer has $40$ m of fencing to enclose a rectangular pen. One side of the pen will be an existing wall, so fencing is only needed on the other three sides. Find the dimensions that maximise the enclosed area, and state the maximum area. (Hint: let the side parallel to the wall be $x$ and each side perpendicular to it be $y$; write the fencing constraint, reduce the area to one variable, then optimise.)
Method
1
Fencing used: $x + 2y = 40$, so $x = 40 - 2y$.
Only three sides need fencing.
2
Area $A = xy = (40-2y)y = 40y - 2y^2$.
Now A depends on y alone.
3
$\dfrac{dA}{dy} = 40 - 4y$. Set $=0$: $40 - 4y = 0 \Rightarrow y = 10$.
Solve for the stationary point.
4
$\dfrac{d^2A}{dy^2} = -4 < 0$ ⇒ maximum.
Confirms it's the max, not the min.
5
Then $x = 40 - 2(10) = 20$, and $A = 20 \times 10 = 200\ \text{m}^2$.
Back-substitute for the dimensions and area.
▪ solved
The pen is $20$ m (parallel to the wall) by $10$ m, giving a maximum enclosed area of $200\ \text{m}^2$.