A lot of physics is a search for the most or the least of something. A ball settles where its energy is lowest. Light takes the quickest route. An engineer wants the strongest beam from the least steel. You already have the tool: at a peak or a dip, the slope is zero. This lesson turns that into a routine for real problems, where the hard part is usually writing the problem down, not the calculus.
- The box. Cut a square from each corner of a 12 cm sheet and fold up the sides. Drag the cut from tiny to huge: a wide shallow tray, then a tall thin tube. Neither holds much.
- Watch the amber line on the graph. While it slopes up, a bigger cut still gains. Find where it goes flat and turns green.
- Tick "Lay the sheet flat" to see exactly what's being cut away.
- The fence. You have 40 m of fence and a long wall for the fourth side. Before you drag anything, guess the best shape. Then find it.
- Sand, then water. A lifeguard runs at 5 m/s and swims at 2 m/s. The straight line, shown dashed, isn't the quickest way. Find the crossing point that is, and watch the two ratios in the readout as you get there.
The routine
Every one of these problems goes the same way.
- Name things. One is the quantity you want the most or least of. The other is the thing you're free to choose.
- Write one in terms of the other. Get a formula for the thing you care about that contains only the thing you choose. If there's a second unknown, a fixed total gets rid of it: 40 m of fence, 12 cm of sheet.
- Differentiate, and set the slope to zero. Solve for the places where the graph is flat.
- Check. Make sure the flat place is the right kind, a peak or a dip, and that neither end of the allowed range does better.
At the best value, either you're at an end of the range or the slope is zero:
Worked example: the box
Name things. You want the most volume \(V\). You choose the cut, \(x\), and it has to be between 0 and 6 or there's no sheet left.
Write \(V\) in terms of \(x\). The base is the sheet less a cut at each end, and the height is the cut.
Multiply it out so it's easy to differentiate.
Differentiate.
Take out the 12 and factorise, so you can see where it's zero.
The slope is zero at \(x = 2\) and at \(x = 6\). Work out \(V\) at both, and at the other end of the range.
So the most the box can hold is 128 cm³, with a 2 cm cut.
Check it against the picture: the green line sits at \(x = 2\), with the readout showing 128.
Telling a peak from a dip
A slope of zero only says the graph is flat. To tell a peak from a dip, look at the slope on each side. Just before \(x = 2\) the box's slope is positive, and just after it's negative: up and then down is a peak.
The quicker test is the second derivative, which is the slope of the slope. At a peak the slope is falling, from positive through zero to negative, so the second derivative is negative. At a dip it's rising.
For the box, \(\dfrac{d^2V}{dx^2} = -96 + 24x\), which is \(-48\) at \(x = 2\). Negative, so it's a peak. If the second derivative comes out as exactly zero the test says nothing either way, and you go back to looking at the slope on each side.
Don't forget the ends
A flat point is only a candidate. If you're limited to a stretch of the curve, the biggest value might be at one end of it, where the slope isn't zero at all.
- Start as it is. The highest value is at the right-hand end, not at the flat peak.
- Pull the right-hand end back towards \(x = 1\). At some point the peak takes over. Where?
- Find a stretch with no flat point in it at all. The highest and lowest values are still there: they're both at ends.
So the full list of candidates is short: the flat points inside the range, and the two ends. Work out the value at each and compare.
The lifeguard and the light
The third problem has a famous answer. In the picture the lifeguard starts 20 m up the beach, and the swimmer is 30 m out and 60 m along the shore. Call \(x\) how far along the shore the lifeguard enters the water. The time taken is the sand distance over the running speed plus the water distance over the swimming speed:
Differentiate with the chain rule and something tidy appears. Each term turns into the sine of the angle its path makes with a line square to the shore, over the speed:
Setting that to zero doesn't give a neat value of \(x\), and the picture finds it by trial at about 48 m. But it does give a neat rule: at the quickest crossing, \(\dfrac{\sin\theta_1}{v_1} = \dfrac{\sin\theta_2}{v_2}\).
Light crossing from air into water obeys exactly that rule, with the two speeds of light in place of running and swimming. It's called Snell's law, and it's why a straw looks bent in a glass. Light takes the path of least time, and a whole way of doing physics grows from that idea: write down one quantity, then find the path that makes it as small as it can be. The other everyday use is balance. A system sits still where its potential energy has zero slope, and it's only stable if that point is a dip.
Problems
A ball is thrown up, and its height is \(h = 30t - 5t^2\) metres. When is it highest, and how high is that?
Answer
\(\dfrac{dh}{dt} = 30 - 10t = 0\) at \(t = 3\) s. Then \(h = 90 - 45 = 45\) m. The second derivative is \(-10\), negative, so it's a peak.
Do the fence by the routine. You have 40 m of fence for three sides of a rectangle, with a wall as the fourth. If each side going out from the wall is \(x\), what \(x\) encloses the most?
Answer
The two sides use \(2x\), leaving \(40 - 2x\) to run along the wall. So \(A = x(40 - 2x) = 40x - 2x^2\), with \(x\) between 0 and 20.
\(\dfrac{dA}{dx} = 40 - 4x = 0\) at \(x = 10\). Then \(A = 10 \times 20 = 200\) m². Both ends give zero area, and the second derivative is \(-4\), so it's the most. The best pen is twice as long as it is deep, not a square.
Find the smallest value of \(f(x) = x + \dfrac{4}{x}\) for positive \(x\).
Answer
\(f' = 1 - \dfrac{4}{x^2} = 0\) when \(x^2 = 4\), so \(x = 2\), and \(f(2) = 2 + 2 = 4\).
\(f'' = \dfrac{8}{x^3}\), which is positive, so it's a dip. Towards either end of the range, \(x\) near 0 or very large, \(f\) grows without limit. So 4 is the smallest value.
Find the highest and lowest values of \(f(x) = x^3 - 3x\) for \(x\) between 0 and 2. Check with the second picture.
Answer
\(f' = 3x^2 - 3 = 0\) at \(x = \pm 1\), and only \(x = 1\) is inside the range. The candidates are the two ends and that flat point:
\(f(0) = 0\), \(f(1) = -2\), \(f(2) = 2\).
The lowest is \(-2\), at the flat point. The highest is 2, at the right-hand end, where the slope is 9, nowhere near zero.
A closed tin can has to hold 1000 cm³. What radius uses the least metal? The volume is \(\pi r^2 h\) and the surface is \(2\pi r^2 + 2\pi r h\).
Answer
Use the fixed volume to get rid of \(h\), so the surface depends on \(r\) alone.
Differentiate, and set the slope to zero.
So \(r \approx 5.42\) cm. Putting that back gives \(h \approx 10.84\) cm, which is exactly twice the radius: the best can is as tall as it is wide. The second derivative is \(4\pi + \frac{4000}{r^3}\), which is positive, so it's a dip. The ends don't beat it: a very thin can or a very flat one both need far more metal.
A battery of voltage \(V\) has resistance \(r\) inside it. Connected to a resistor \(R\), it delivers power \(P = \dfrac{V^2 R}{(R + r)^2}\). Which \(R\) gets the most power?
Answer
Use the quotient rule with \(u = V^2R\) and \(v = (R + r)^2\), so \(u' = V^2\) and \(v' = 2(R + r)\). The top of the rule, \(u'v - uv'\), is
and the bottom is \((R + r)^4\). One \((R + r)\) cancels.
That's zero when \(R = r\). For smaller \(R\) the slope is positive and for larger \(R\) it's negative, so it's a peak. A battery delivers the most power to a load that matches its own resistance, and that power is \(\dfrac{V^2}{4r}\).