BrownMath.com → Calculus → Optimization
Updated 7 Aug 2022

# Optimization

Copyright © 2003–2022 by Stan Brown, BrownMath.com

Summary: One of the main applications of the derivative is optimization problems — finding the value of one quantity that will make another quantity reach its largest or smallest value, as required. Here’s an overview of the solution techniques for problems with one independent variable.

## Steps to Optimization

1. Write the primary equation, the formula for the quantity to be optimized. The quantity to be optimized is the dependent variable, and the other variables are independent variables. Write down whether the dependent variable is to be maximized or minimized.
2. Before you can proceed, the primary equation must contain only one independent variable and the dependent variable. If you have extra variables, as usually you do, you must construct one or more secondary equations that involve the independent variables in the primary equation. (Usually a problem constraint will lead to a secondary equation.) Substitute the secondary equations in the primary equation to eliminate the extra variables.

It doesn’t matter which variable you eliminate, so go for the one that’s the least work.

In first-year calculus problems, you should always be able to eliminate all the independent variables but one. If you go on to multivariate calculus, you will also be given problems with more than one independent variable, and no necessary relationship between those variables. The solution will still use derivatives, but it will be more complicated.

3. Write down the feasible domain, the values of the remaining independent variable that make sense in the problem. Usually this information will come from the problem or your common-sense knowledge (such as no negative areas).
4. Find the desired maximum or minimum. (See summary below.)
5. Write the answer to the problem. Make sure you have answered the actual question!

## Example: Soda Can

A standard US can of soda (or pop, depending on where you live) holds 12 fluid ounces or 355 ml. Find the dimensions of a cylindrical can that will use the least amount of aluminum.

Solution: The dependent variable is the amount of aluminum. Essentially, you must minimize the surface area of the cylinder.

Step 1: Write the primary equation: the surface area is the area of the two ends (each πr²) plus the area of the side or lateral area.

to minimize (primary equation): A = 2πr² + 2πrh

Step 2: The primary equation contains two independent variables, r and h. Can you relate them in some way? Yes, the problem constraint is that the volume equals 355 ml (or 355 cm³). This gives:

(secondary equation) V = πr²h = 355

Since h occurs once in the primary equation, and as a linear term, it will be easy to eliminate. Solve the secondary equation for h:

h = 355 / πr²

Substitute in the primary equation:

A = 2πr² + 2πrh

A = 2πr² + 2πr·355/πr²

A = 2πr² + 710/r

Why didn’t I solve πr²h = 355 for r = √355 / πh and substitute that in the equation for A? Because then I would have had a −½ power of h to differentiate. It would have given the same answer ultimately, but would have been more work.

Step 3: There are no obvious constraints on the feasible domain, except that r must be positive, r > 0. (Zero is not an endpoint of the domain, because the constraint is > not ≥. Whatever small positive number you think of, there is always an even smaller positive number that is still > 0.) Since the feasible domain has no endpoints, the only possible minima will be at the critical points that you find using derivatives.

Step 4: To try to find maxima or minima, differentiate:

A = 2πr² + 710/r

dA/dr = 4πr − 710/r²

d²A/dr² = 4π + 1420/r³

See the first and second derivatiove tests below.

Find critical numbers where dA/dr  is 0 or does not exist. The derivative does not exist at r = 0; however you can disregard that because r = 0 is outside the feasible domain.

dA/dr = 4πr − 710/r² = 0 ⇒ r = 3710/4π ≈ 3.84 cm

Is this a minimum, a maximum, or neither? Since d²A/dr² is positive for all positive r, the critical point r = 3.84 cm must be a minimum.

Step 5: Don’t fall into the trap of giving r = 3710/4π ≈ 3.84 cm as your final answer. The problem asked for the dimensions of the can with lowest surface area, which means that you also need the height. To find it, substitute r = 3.84 in the secondary equation and get h ≈ 7.67 cm.

Answer: A cylindrical can with volume 355 ml will use the least aluminum if its radius is about 3.84 cm and its height is about 7.67 cm.

Check: V = πr²h = π(3.84²)(7.67) = 355.3 cm³, the same as the required volume give or take a little rounding difference.

Because a real soda can is not exactly cylindrical, you can’t expect perfect agreement with these figures. I measured about 3.2 cm radius and 12.7 cm height on a can of Barq’s root beer, including the top and bottom extensions.

By the way, you may have noticed that the radius is about ½ the height. In fact, you can prove that the cylinder of a given fixed volume with the lowest surface area will always have r = h/2. Instead of setting V = 355 keep V as a letter and treat it as a constant. You will have r = cuberoot(V/2π) and substituting V = πr²h gives r = h/2.

## Steps to Finding Minimum or Maximum

1. Differentiate with respect to the independent variable. You will need both the first and the second derivatives.
2. Find the critical numbers, where f′ is 0 or does not exist.
3. For each critical number (call it c), evaluate the second derivative f″(c) to find whether you have a maximum, a minimum, or neither, as follows:
• If f″(c) is negative, you have a hilltop and c gives you a maximum.
• If f″(c) is positive, you have a valley and c gives you a minimum.
• If f″(c) is 0 or does not exist, you must use the First Derivative Test, which is:
• If f′(x) goes from positive to negative at x=c, you have a hilltop (maximum) at x=c.
• If f′(x) goes from negative to positive at x=c, you have a valley (minimum) at x=c.
• If f′(x) has the same sign on both sides of x=c, you have neither a maximum nor a minimum at x=c.
4. You must also evaluate the original function (primary equation) for each endpoint of the feasible domain, if it has endpoints. Compare to the function values at the optimum points from step 3.