Applied optimization
A farmer has a fixed length of fencing. A cardboard sheet has a fixed size. In each case some quantity — area, volume, cost — depends on how the fixed resource is shaped, and the question is always the same: which single choice of dimensions makes that quantity as large or as small as possible? Applied optimization is the point where every earlier maxima/minima technique — writing a function, differentiating it, testing critical points — finally earns its keep on a real, worded problem. The whole skill is translation: turning a paragraph of English into one function of one variable, using a constraint equation to strip away the extra variable, and then letting do the rest. This article rebuilds the general method as a repeatable seven-step recipe, derives it in full on a fencing problem, and extends the classic folded-box problem into a competitive-exam variant.
To optimize a real quantity , express it as a function of the problem's variables, use the given constraint to reduce it to one variable, then find where and confirm a maximum or minimum with the derivative test, always restricted to the physically valid domain.
The core idea
Every applied optimization problem — however different the story — reduces to the same seven moves.
Set up. First name the quantity to optimize, , and write it in terms of whatever variables the geometry naturally offers; usually there are two variables at this stage, linked by one constraint — a fixed total (fencing, surface area, sheet perimeter) that the problem hands you for free.
Reduce and solve. Use the constraint to eliminate one variable, so becomes a function of a single variable . Differentiate and solve for critical points, then restrict those points to the domain where the setup makes physical sense — a length or an area cannot be negative or zero.
where: is the quantity being optimized written as a function of the single surviving variable , is its derivative, and is a critical point; the sign of the second derivative classifies it without needing to check neighbouring values by hand. On a closed domain, any candidate critical point must also be compared against the endpoint values of , since the true maximum or minimum can sit at a boundary rather than at a critical point.
Report. Finally, substitute back to state the optimal dimensions — not just the value of — and give the optimized value of itself, in the problem's own units.
Working out the maximum area a fixed length of fencing can enclose against an existing wall shows why the seven-step method matters: differentiating the area directly, before using the fencing constraint to eliminate a variable, produces a function of two variables that cannot be optimized at all, so the constraint substitution in Step 4 below is the step that actually makes the problem solvable.
Step 1. Define the variables. A farmer has m of fencing to enclose a rectangular field, using an existing wall as one side, so fencing is needed on only three sides. Let (m) be the side parallel to the wall, and let (m) be each of the two sides perpendicular to the wall.
Step 2. Write the constraint. Only three sides use fencing, so the total fencing used is .
Step 3. Write the quantity to be optimized. The enclosed area is , a function of two variables — not yet ready for differentiation.
Step 4. Eliminate a variable using the constraint. From , . Substituting into gives a single-variable function,
Step 5. Differentiate and solve . , so gives .
Step 6. Classify the critical point with the second-derivative test. for every , so is a maximum, and it lies safely inside the physically valid domain .
Step 7. Report the dimensions and the maximum area. With , . The maximum enclosed area is . Verified: , , , .
Worked example
An open-top rectangular box is made from a square cardboard sheet of side cm, by cutting equal squares of side from each corner and folding up the sides. Find the value of that maximizes the volume.
Step 1. After folding, the base is a square of side and the height is , so the volume is , already a function of the single variable because the sheet's fixed size is built directly into the formula.
Step 2. Determine the domain. Both and are required for the box to exist, so .
Step 3. Expand and differentiate. , so .
Step 4. Solve within the domain: or . Since makes the base side zero and lies outside the open domain , only is a valid critical point.
Step 5. Confirm a maximum. , so , confirming is a maximum.
Step 6. Compute the maximum volume. . Cutting squares of side cm gives base cm and height cm, so the maximum volume is .
Competitive stretch
A closed cylindrical can of fixed volume minimizes surface area — and hence material — when its height equals its diameter, . The setup is the same recipe: write surface area as the quantity to minimize, use the constraint to eliminate , reduce to a single variable , and solve . This is exactly the kind of constraint-elimination step drilled above, just with a volume constraint instead of a fencing or sheet-size constraint.
Common traps
- Differentiating a two-variable expression directly, without first using the constraint to reduce it to one variable — the single most common setup error.
- Accepting a critical point that is outside the physically meaningful domain, such as in the box problem, which forces a dimension to zero.
- Skipping the first- or second-derivative test and assuming the only critical point found must automatically be the answer.
- Reporting the optimal value of alone and forgetting to compute the actual optimized quantity — the maximum area or volume — that the question asked for.
Ask the tutor: stuck setting up the constraint for a new optimization story, like minimizing the material for a closed cylindrical can — ask the AI tutor to walk through the seven-step recipe with you on that exact problem.
Why do I need a constraint equation at all — can I not just differentiate the area or volume directly?
A quantity like area or volume usually starts out depending on two independent variables, such as and in the fencing problem. A derivative with respect to one variable while the other is free to change does not identify a single optimal shape — it only makes sense to set a derivative to zero once depends on exactly one variable. The constraint is what lets you substitute one variable in terms of the other, collapsing to a genuine single-variable function that can meaningfully optimize.
How do I know whether a critical point is a maximum or a minimum without sketching a graph?
Use the second-derivative test: if at the critical point, the function curves downward there, so it is a local maximum; if , it is a local minimum. If , the test is inconclusive and you fall back to checking the sign of just before and after — the first-derivative test. In the box problem, confirms a maximum without ever drawing the cubic.
What if a problem gives a closed domain, like 0 less than or equal to x less than or equal to 6 — do I still just solve Q prime of x equals 0?
Solving finds interior critical points, but on a closed interval the true maximum or minimum can also occur at an endpoint, even if the derivative there is not zero. The safe procedure is to evaluate at every interior critical point that lies inside the domain and at both endpoints, then compare all those values directly — the largest is the maximum and the smallest is the minimum, regardless of which derivative test each point individually passes.