Setting Up Optimization Problems
Optimization means finding the best value: the most area, the least cost, the biggest volume. Most of the work is building the right function. This guide shows how to turn a word problem into a one-variable function with a domain.
Name the quantity you want to make largest or smallest, and write a formula for it. If the formula has two variables, use the constraint (the fixed amount of fence, material or money) to replace one of them. Find the domain the situation allows. Then this becomes a closed-interval extreme-value problem: find critical points, compare candidates, and answer the question that was asked, with units.
1The setup routine
| Step | Ask yourself |
|---|---|
| 1. Picture | What does it look like? Label every length with a letter. |
| 2. Objective | What is being maximized or minimized? Write its formula. |
| 3. Constraint | What is fixed? Use it to write one variable in terms of the other. |
| 4. One variable | Substitute to get a function of one variable. |
| 5. Domain | Which values make physical sense? |
| 6. Solve | Critical points and endpoints; compare. |
2Fencing
Fence along a river
A farmer has 600 m of fence to enclose a rectangular field along a straight river; no fence is needed along the river. What dimensions give the largest area?
- 1Quantity to optimize: area \(A\). Variables: side \(x\) perpendicular to the river, side \(y\) along it.
- 2Constraint: \(2x + y = 600\), so \(y = 600 - 2x\). One-variable function: \(A(x) = x(600 - 2x) = 600x - 2x^2\).
- 3Domain: lengths cannot be negative, so \(0 \le x \le 300\).
- 4\(A'(x) = 600 - 4x = 0\) at \(x = 150\). Candidates: \(A(0) = 0\), \(A(150) = 45{,}000\), \(A(300) = 0\).
“\(A'(x) = 600 - 4x\) changes sign from positive to negative at \(x = 150\), and this is the only critical point in \((0, 300)\), so the area is a maximum when \(x = 150\) m. The field should be 150 m by 300 m.”
The fence length, 600, is fixed; it is not the thing being maximized. The area is the objective. Writing the derivative of \(2x + y\) leads nowhere.
Without a domain you cannot check endpoints, and you might report an impossible answer, such as a negative length. Here \(x\) must be between 0 and 300.
3Boxes and numbers
Largest volume
Squares of side \(x\) are cut from the corners of a 12-inch by 12-inch sheet, and the sides are folded up to make an open box. Find the largest possible volume.
- 1\(V(x) = x(12 - 2x)^2\), with domain \(0 \le x \le 6\).
- 2\(V'(x) = (12 - 2x)^2 + x \cdot 2(12 - 2x)(-2) = (12 - 2x)(12 - 6x)\).
- 3Zeros: \(x = 6\) (an endpoint) and \(x = 2\). Candidates: \(V(0) = 0\), \(V(2) = 2 \cdot 8^2 = 128\), \(V(6) = 0\).
Largest product with a fixed sum
Two nonnegative numbers add to 20. What is the largest possible product?
- 1Numbers \(x\) and \(20 - x\); product \(P(x) = x(20 - x)\), domain \(0 \le x \le 20\).
- 2\(P'(x) = 20 - 2x = 0\) at \(x = 10\). \(P(10) = 100\); endpoints give 0.
Largest rectangle under \(y = 12 - x^2\)
A rectangle has its base on the x-axis and its top two corners on the parabola \(y = 12 - x^2\). Find the largest possible area.
- 1By symmetry, put the corners at \((\pm x, 12 - x^2)\). Width \(2x\), height \(12 - x^2\): \(A(x) = 2x(12 - x^2) = 24x - 2x^3\).
- 2Domain: the height must not be negative, so \(0 \le x \le \sqrt{12}\).
- 3\(A'(x) = 24 - 6x^2 = 0\) at \(x = 2\). Candidates: \(A(0) = 0\), \(A(2) = 4 \cdot 8 = 32\), \(A(\sqrt{12}) = 0\).
If the question asks for the dimensions, give the dimensions (150 m by 300 m), not just \(x = 150\). If it asks for the maximum volume, give 128 in³, not \(x = 2\).
Quick reference
| Problem | Objective | Constraint |
|---|---|---|
| Fence, 3 sides | A = xy | 2x + y = fence length |
| Open box from a sheet | V = x(s − 2x)² | 0 ≤ x ≤ s/2 |
| Fixed sum | P = x(S − x) | x + y = S |