Optimization Problems
The largest box or the cheapest tank: write the quantity, then find where its slope is zero.
Before this Lesson
You have 100 m of fence and a flat, empty site, and you want to enclose as much storage yard as you can. Does the shape matter? It's tempting to think it can't, since the same fence ought to surround the same ground. So try it. A yard 45 m by 5 m uses all the fence and encloses 225 m². A yard 25 m by 25 m uses the same fence and encloses 625 m².
That's nearly three times the ground from the same fence. Some shape has to be the best one, and you can find it without trying them all.
Two variables are one too many
Call the yard's sides and . You want the largest area, so write that down:
Now you'd like to differentiate, and you're stuck. The method from Maxima, Minima, and Inflection Points works on a function of one variable, and this has two. Pretend is a constant and you get . Set that to zero, and the best yard has a side of length zero, which is nonsense. The mistake is that isn't constant: make the yard longer and the fence has to come from somewhere, so the yard gets narrower.
The fence is what links the two sides. That link is the problem's constraint, and it lets you trade for :
That's one variable, and from here it's a problem you've already solved.
Solve for the flat spots, and drop any root outside the domain. At a flat spot, means a peak and means a valley. The Handbook's Differential Calculus section prints these as its Test for a Maximum and Test for a Minimum.
The second derivative, , is negative, so that's a peak. It's also physically possible, since a side has to fall between 0 and 50 m. The other side is , so the best yard is a square, and its area is .
Every optimization problem you'll meet runs through that same pipeline:
- Write the quantity to optimize. Words like "largest" or "least" tell you which one.
- Use the constraint to make it a function of one variable.
- Find where its slope is zero, then confirm that it's the kind of point you're after and that it lies in the physical range.
- Answer what was asked: a dimension, or the best value.
The Handbook prints the tests for step 3 and says nothing about steps 1 and 2, which come from reading the problem.
The square isn't a quirk of 100 m. For any fixed perimeter , the same steps give a square with side . But change the problem slightly, and the shape changes with it.
The box you can cut too far
Take a square metal sheet, 12 in on a side. Cut a square from each corner, fold up the flaps, and you have an open box. Cut tiny notches and you get a wide tray with hardly any depth. Cut huge notches and you get tall walls around hardly any floor. Neither holds much, so the best cut is somewhere between.
Here the constraint never shows up as an equation, because the sheet itself is the constraint. You make one choice, the cut , and the sheet sets everything else. The height is , and each floor edge loses at both ends, leaving . So the volume already comes as a function of one variable:
Both roots solve the equation, but only one of them is a box. Cut 6 in from each corner of a 12 in sheet and the notches meet, leaving no floor. The physical range is , which rules that root out. The second derivative, , agrees: is a peak, and is a valley, the lowest a volume can go.
So cut 2 in, and the volume is .
The tank that uses the least steel
A cylindrical tank has to hold a fixed volume, and you pay for every square foot of steel. Think about the extremes. A wide, shallow tank, shaped like a cake pan, spends its steel on the floor and lid. A tall, thin one, shaped like a drinking straw, spends it on the wall. So the best proportions are again somewhere between.
The Handbook's Mensuration of Areas and Volumes section has both formulas you need, under Right Circular Cylinder:
Multiply out that and you can see the parts, a wall and two ends:
That's the quantity, with two variables again. The constraint is the volume, which is a fixed number even though it's written as a letter, so it gives you . Substitute, and is gone:
Now the trade-off is out in the open. The ends grow as grows, the wall shrinks, and their sum has a valley.
Find where the slope is zero:
The second derivative, , is positive for every , so that's a valley. You could stop there, but look at what it says about the shape. Use in the formula for :
The height is twice the radius, which is the diameter. So the closed tank of least steel is as tall as it is wide, whatever it holds. For the graph's 1,000 ft³, gives and .
The same pipeline in other clothes
Exam wording dresses these problems up, but spot the standard form and the rest is routine. A word like largest, least, strongest, or cheapest names the quantity. Whatever's fixed, such as the fence on hand, the volume to hold, or the sheet you start with, is the constraint.
The quantity needn't be a length or an area. When some parts cost more than others, the quantity is the total cost, and each part carries its price. The method doesn't change, but the tidy shapes do.
Check the shape
The classic problems have answers with recognizable shapes, and they're worth a glance once the algebra is done. If a closed tank comes out five times as tall as it is wide, there's a mistake somewhere.
There's less to remember here than it looks, because two of these are halves of the others. Reflect a riverside yard in the river and you have a closed rectangle with twice the fence, whose best shape is a square. Half a square has a long side twice its short side. Stand a second open tank upside down on the first, rim to rim, and you have a closed tank, whose best shape is as tall as it is wide. Half of that has .
These are checks, not substitutes. A priced side or a new constraint moves the answer off them, as the yard with the pricey front did. On a multiple-choice question, the options give you one more check: the right one has to meet the constraint and beat the others on the quantity, and both take seconds on a calculator.