Optimization
What dimensions give the biggest garden for a fixed amount of fencing? What shape of can uses the least metal? Which route for a cable costs the least? These are optimization problems: finding the best value of something. You’ve done a few with quadratics, but derivatives let you optimize almost any function. Most of the work is in the setup; the calculus part uses the tests you already know.
Key ideas
Section titled “Key ideas”Setting up
Section titled “Setting up”- Draw a picture and label it with variables.
- Identify the objective: the quantity to maximize or minimize (area, volume, cost, distance). Write it as a formula.
- Write the constraint: the fixed condition (total fencing, fixed volume, a curve the point must lie on).
- Use the constraint to get one variable. Solve it for one variable and substitute, so the objective depends on a single variable.
- State the domain: which values of that variable make physical sense (lengths positive, cuts no bigger than the sheet, and so on).
Solving and justifying
Section titled “Solving and justifying”- Differentiate and find the critical points in the domain.
- Justify that you’ve found the absolute max or min. Use one of these:
- Candidates test: if the domain is a closed interval, compare the objective at the critical points and the endpoints.
- Only one critical point: if there’s just one critical point in the domain and the first derivative test (sign of changes from to ) or the second derivative test () shows it’s a relative maximum, it’s the absolute maximum. Same idea for a minimum.
- Answer the question asked, with units. Read carefully: does it want the dimensions, the maximum value, or both?
AP free-response questions award a point for the justification, so don’t skip step 7.
A shortcut for distance
Section titled “A shortcut for distance”To minimize a distance , minimize instead. The square root is an increasing function, so and are smallest at the same point, and has no square root to differentiate.
Worked examples
Section titled “Worked examples”Example 1: Fencing a divided field
Section titled “Example 1: Fencing a divided field”A farmer has m of fencing to enclose a rectangular field and divide it into three pens with two fences parallel to one side. What dimensions give the largest total area?
Solution.
Variables: let be the length of each fence parallel to the dividers (the two ends of the field and the two dividers), and the length of the other two sides. So there are fences of length and of length .
Constraint: , so .
Objective:
Domain: (both and must be positive).
Critical point: gives .
Justify: , so is a relative maximum, and it’s the only critical point in the domain, so it’s the absolute maximum.
Answer: m and m, for a maximum area of m².
Example 2: The open box
Section titled “Example 2: The open box”An open-top box is made from a cm by cm sheet of cardboard by cutting equal squares from the corners and folding up the sides. What size of square gives the largest volume?
Solution. Let be the side of each square, in cm. The box has height and a base of by .
Domain: (at the short side is used up). Including the endpoints is fine, since they just give , and it lets you use the candidates test.
Only is in the domain. Candidates:
Cut cm squares. The box is cm by cm by cm, with a maximum volume of cm³.
Example 3: The cheapest can
Section titled “Example 3: The cheapest can”A closed cylindrical can must hold cm³. What radius and height use the least material (smallest surface area)? Give answers to three decimal places.
Solution. Let be the radius and the height, in cm.
Objective (top, bottom, and side): .
Constraint: , so . Substitute:
Justify: for all , so this is a relative minimum, and it’s the only critical point, so it’s the absolute minimum.
cm. The best can has radius about cm and height about cm, using about cm² of material.
Notice : the height equals the diameter. (You can show this exactly: gives .)
Example 4: Closest point on a curve
Section titled “Example 4: Closest point on a curve”Find the point on the curve that is closest to the point .
Solution. A point on the curve is , with . Minimize the squared distance:
The derivative changes from negative to positive at , and it’s the only critical point on , so it gives the absolute minimum. (At the endpoint , , which is larger.)
The closest point is , at a distance of .
Common mistakes
Section titled “Common mistakes”Differentiating before you have one variable. can’t be optimized until you use the constraint to replace . Get the objective in terms of a single variable first.
Skipping the domain. The domain tells you which critical points count and gives the endpoints for the candidates test. In Example 2, solves but makes no sense: you can’t cut cm squares from a cm side.
No justification. Finding a critical point isn’t enough. Say why it’s the absolute max or min: a candidates table, or “the only critical point, and changes from positive to negative there.”
Answering the wrong question. If the question asks for the dimensions, give both dimensions with units. If it asks for the maximum volume, give the volume. In Example 2, "" alone isn’t the volume.
Mixing up the constraint and the objective. The objective is what you’re making as large or small as possible. The constraint is what’s fixed. In Example 3, the volume is fixed ( cm³) and the surface area is minimized.
Forgetting a side or a face. Check your formula against the picture. Is the box open or closed? Is one side of the pen against a wall? Do the dividers count?
Practice
Section titled “Practice”1. (Warm-up) Two positive numbers have a product of . What is the smallest possible value of their sum?
Solution
Let the numbers be and , with . The sum is .
gives . , so it’s a minimum, and it’s the only critical point.
The numbers are and , and the smallest sum is .
2. (Warm-up) A rectangle has a perimeter of m. Write its area as a function of one side length , state the domain, and find the largest possible area.
Solution
The other side is , so , with .
gives . , and it’s the only critical point, so it’s the absolute maximum.
The largest area is m² (a square).
3. (Core) A rectangular garden of area m² is built against a house, so only three sides need fencing. What dimensions use the least fencing?
Solution
Let be each side perpendicular to the house and the side parallel to it. Constraint: , so .
gives , so . , so it’s a minimum, and it’s the only critical point.
The garden is m (out from the house) by m (along the house), using m of fencing.
4. (Core) A closed box with a square base must hold m³. The material for the top and bottom costs $10 per m², and the material for the sides costs $5 per m². Find the dimensions that minimize the cost, and the minimum cost.
Solution
Let the base be m by m and the height m. Constraint: , so .
Top and bottom: m² at $10. Four sides: m² at $5.
gives , so . , so it’s a minimum, and it’s the only critical point.
The box is m by m by m tall, and the minimum cost is , or $60.
5. (Core) An open-top box is made from a cm by cm square sheet by cutting equal squares from the corners. Find the largest possible volume.
Solution
for .
at and . Candidates:
The largest volume is cm³, with cm squares cut out.
6. (Core) Find the points on the parabola that are closest to the point , and the minimum distance.
Solution
A point on the parabola is .
gives or .
heads to infinity as grows, so the minimum is at . The closest points are , at distance . (At , the point is a relative maximum of the distance.)
7. (Core) A rectangle is inscribed in a semicircle of radius cm, with its base on the diameter. Find the dimensions that give the largest area.
Solution
Put the centre at the origin. If the top-right corner is on the circle, then , the base is , and
when , so . ( is undefined at , an endpoint.) Candidates: , , and
The rectangle is cm wide and cm tall, with area cm².
8. (Challenge) A power line runs from a station on one bank of a straight river m wide to a factory on the other bank, m downstream. Cable costs $50 per metre under water and $30 per metre along the bank. The cable goes straight across the river to a point m downstream, then along the far bank. Find the cheapest route.
Solution
The underwater part has length and the land part , for .
(Only the positive root counts.) Candidates:
| (m) | |||
|---|---|---|---|
| ($) |
The cheapest route crosses the river to a point m downstream, then follows the bank. The minimum cost is $48 000.
9. (Challenge) Find the dimensions of the cylinder with the largest volume that fits inside a sphere of radius cm. Give the volume exactly and to three decimal places.
Solution
Let the cylinder have radius and height . A cross-section through the centre shows a right triangle with legs and and hypotenuse :
gives , so cm.
, so this critical point gives the maximum. Then , so cm.