Optimization uses derivatives to find the best possible value under stated constraints. The calculus is often short; the important work is building the correct function, identifying its feasible domain, and proving that the candidate is actually best.
Separate the goal from the constraint
The objective is the quantity to maximize or minimize: area, cost, volume, distance, or another measurable amount. A constraint relates the variables, such as a fixed perimeter or volume.
Start with a labeled sketch and equations. Use the constraint to write the objective in one independent variable, then state which values of that variable are physically possible. A critical point outside the feasible domain is not an answer, however neatly the algebra works.
Example: largest rectangle with a fixed perimeter
A rectangle has perimeter 40 meters. If its sides are and , the constraint is so The objective is area:
Positive side lengths require Differentiate: The only critical point is giving and area 100 square meters.
To justify the maximum, note that throughout the domain. Alternatively, is positive before 10 and negative after it. The area rises then falls, so this is the global maximum. The endpoint limiting areas are zero, consistent with the conclusion.
The answer includes both dimensions and the requested area, with units. Merely reporting leaves the modeling question incomplete.
Area rises to 100 at and then falls. The horizontal axis is a side length, not the perimeter.
Describe this figure
Function values for the solid curve:
| x | f(x) |
|---|---|
| 0 | 0 |
| 5 | 75 |
| 10 | 100 |
| 15 | 75 |
| 20 | 0 |
Example: an open-top box
Cut squares of side from the corners of a 12-by-12 centimeter sheet, then fold up the sides. The resulting box has height and base dimensions by Its volume is
Differentiate and factor: The roots are 6 and 2, but 6 is a degenerate boundary with no base area. At the box measures 8 by 8 by 2 centimeters and has volume 128 cubic centimeters.
For both factors in are positive. For the first is positive and the second negative. Thus volume increases then decreases, proving that 128 is the maximum. Evaluating only the derivative equation without the domain would have left an invalid candidate in the answer.
Choose a convenient equivalent objective
To minimize distance, you can often minimize squared distance instead. Because squaring is increasing for nonnegative quantities, the location of the minimum is unchanged and the square root disappears from the derivative.
For a point and a fixed point squared distance is This expression faithfully includes both horizontal and vertical differences. Minimizing only one difference would solve a different problem.
Do not replace an objective with a simpler expression unless you can explain why its minimizer or maximizer stays the same. Minimizing cost per item is not the same as minimizing total cost.
Endpoints and existence matter
For a continuous objective on a closed bounded interval, compare all interior critical points and endpoints. On an open or unbounded domain, an optimum may fail to exist, so examine boundary behavior. A zero derivative identifies a candidate, not an automatic maximum.
If a problem requires whole numbers, a continuous critical point can guide the search, but compare the nearby feasible integers. A fractional number of boxes may be mathematically valid in a relaxed model but impossible in the original situation.
Try it yourself
A farmer has 60 meters of fencing for three sides of a rectangle against a straight wall. Find the largest possible area.
Answer: Let be each side perpendicular to the wall. The remaining side is so on Solving gives and the remaining side 30. Since the maximum area is 450 square meters.
What to remember
Model, restrict, differentiate, and justify. The constraint creates the one-variable objective; the domain and a maximum/minimum argument turn a critical point into a valid answer.