How to solve an optimization problem

An optimization problem requires finding the absolute maximum or minimum of an objective function subject to given constraints. This method applies whenever you need to optimize a measurable physical quantity, such as minimizing cost or maximizing volume, over a specific domain.

The setup

Identify the objective function to be maximized or minimized and the constraint equation that limits the variables. Express the objective function in terms of a single variable by isolating one variable in the constraint equation and substituting it into the objective function.

The steps

  1. Write the objective function f(x)f(x) in terms of one variable. 2. Determine the valid domain of f(x)f(x) based on the physical constraints of the problem. 3. Compute the first derivative f(x)f'(x). 4. Find all critical points by setting f(x)=0f'(x) = 0 and solving for xx, and identify any points where f(x)f'(x) is undefined. 5. Evaluate f(x)f(x) at all critical points and at the endpoints of the domain.

Checking the result

Use the Second Derivative Test by computing f(x)f''(x). If f(c)>0f''(c) > 0, the critical point cc is a local minimum; if f(c)<0f''(c) < 0, it is a local maximum. Ensure that the absolute extremum occurs within the physically valid domain of the problem by comparing these local extrema to the endpoint values.

Common errors

Failing to check the endpoints of a closed interval, which often contain the absolute extrema. Forgetting to substitute the constraint equation, leading to improper differentiation of a multivariable function with respect to a single variable.

Worked example

A farmer has 2400 ft of fencing and wants to fence off a rectangular field that borders a straight river. He needs no fence along the river. What are the dimensions of the field that has the largest area?

Let xx be the width of the field perpendicular to the river and yy be the length parallel to the river. The constraint is 2x+y=24002x + y = 2400. The objective function for area is A=xyA = xy. Substitute y=24002xy = 2400 - 2x into AA to get the single-variable function: A(x)=x(24002x)=2400x2x2A(x) = x(2400 - 2x) = 2400x - 2x^2 The physical domain is 0x12000 \leq x \leq 1200. Differentiate to find A(x)=24004xA'(x) = 2400 - 4x. Set A(x)=0A'(x) = 0 to get the critical point x=600x = 600. Evaluate the area at the endpoints and the critical point: A(0)=0A(0) = 0, A(1200)=0A(1200) = 0, and A(600)=600(24001200)=720000A(600) = 600(2400 - 1200) = 720000. The second derivative is A(x)=4A''(x) = -4, which is strictly negative, confirming x=600x = 600 yields a maximum. The optimal dimensions are width x=600x = 600 ft and length y=1200y = 1200 ft.

FAQ

Run your own problem

References: Calculus Volume 1 by OpenStax · Calculus: Early Transcendentals 8th Edition by James Stewart

See also