What an optimization problem asks for
The quantity to be made largest or smallest is called the objective function. The constraint is a fixed condition that links the variables, such as a set amount of material or a set volume. Typical goals are the biggest box from a sheet, the cheapest can for a given volume, or the shortest path between two points.
Calculus helps because a smooth function has a horizontal tangent at an interior maximum or minimum. The derivative is zero at such points. These points are called critical points.
The standard method in five steps
First, draw the situation and name the variables. Second, write the objective function, then use the constraint to eliminate variables until only one remains. Third, state the domain, meaning the values that make physical sense.
Fourth, differentiate and solve for the critical points inside the domain. Fifth, evaluate the objective at each critical point and at each endpoint. The largest or smallest of these values is the answer. On a closed interval, a continuous function always attains both a maximum and a minimum.
Worked example: an open box from a square sheet
Take a square sheet of side 12 cm. Cut a square of side x from each corner and fold up the sides. The base has side 12 − 2x and the height is x, so V = x(12 − 2x)^2. The domain is 0 ≤ x ≤ 6.
Differentiate with the product and chain rules: V' = (12 − 2x)^2 + x · 2(12 − 2x)(−2) = (12 − 2x)(12 − 6x). This is zero at x = 6 and x = 2. Now compare values. V(0) = 0, V(6) = 6 · 0 = 0, and V(2) = 2 · 8^2 = 2 · 64 = 128. The maximum volume is 128 cm³, with corner squares of side 2 cm.
Worked case: the can of fixed volume
A closed cylinder of radius r and height h has volume V = πr²h and surface area S = 2πr² + 2πrh. Substituting h = V/(πr²) gives S = 2πr² + 2V/r. Then S' = 4πr − 2V/r², which is zero when r³ = V/(2π).
Putting this back into h = V/(πr²) gives h = 2r. The least material is used when the height equals the diameter. Real cans often differ because of manufacturing, seams and shelf space.
Common mistakes and where the method appears
A frequent error is to find a critical point and stop. A critical point can be a minimum, a maximum or neither, so it must be checked against the endpoints or with the second derivative. Another error is to ignore the domain, which can make a result physically impossible.
Optimization appears in engineering design, economics (maximum profit, minimum average cost), physics (shortest time paths) and statistics (least squares fitting). With several variables, the same idea uses the gradient instead of a single derivative.
Key terms
- Objective function
- The quantity to be maximized or minimized, written in terms of one variable after the constraint is used.
- Constraint
- A condition linking the variables, such as a fixed volume or fixed amount of material.
- Critical point
- An interior point of the domain where the derivative is zero or does not exist.
- Domain
- The set of input values that make sense for the problem.
- Second derivative test
- A check that classifies a critical point: a positive second derivative indicates a local minimum, a negative one a local maximum.
- Extreme value theorem
- A continuous function on a closed interval attains both a maximum and a minimum there.
