<meta http-equiv="refresh" content="1; url=/nojavascript/"> Optimization | CK-12 Foundation
You are reading an older version of this FlexBook® textbook: CK-12 Calculus Go to the latest version.

# 3.7: Optimization

Created by: CK-12

## Learning Objectives

A student will be able to:

• Use the First and Second Derivative Tests to find absolute maximum and minimum values of a function.
• Use the First and Second Derivative Tests to solve optimization applications.

## Introduction

In this lesson we wish to extend our discussion of extrema and look at the absolute maximum and minimum values of functions. We will then solve some applications using these methods to maximize and minimize functions.

Absolute Maximum and Minimum

We begin with an observation about finding absolute maximum and minimum values of functions that are continuous on a closed interval. Suppose that $f$ is continuous on a closed interval $[a,b].$ Recall that we can find relative minima and maxima by identifying the critical numbers of $f$ in $(a,b)$ and then applying the Second Derivative Test. The absolute maximum and minimum must come from either the relative extrema of $f$ in $(a,b)$ or the value of the function at the endpoints, $f(a)$ or $f(b).$ Hence the absolute maximum or minimum values of a function $f$ that is continuous on a closed interval $[a,b]$ can be found as follows:

1. Find the values of $f$ for each critical value in $(a,b)$;
2. Find the values of the function $f$ at the endpoints of $[a,b]$;
3. The absolute maximum will be the largest value of the numbers found in 1 and 2; the absolute minimum will be the smallest number.

The optimization problems we will solve will involve a process of maximizing and minimizing functions. Since most problems will involve real applications that one finds in everyday life, we need to discuss how the properties of everyday applications will affect the more theoretical methods we have developed in our analysis. Let’s start with the following example.

Example 1:

A company makes high-quality bicycle tires for both recreational and racing riders. The number of tires that the company sells is a function of the price charged and can be modeled by the formula $T(x) = -x^3 + 36.5 x^2 + 50x + 250,$ where $x$ is the priced charged for each tire in dollars. At what price is the maximum number of tires sold? How many tires will be sold at that maximum price?

Solution:

Let’s first look at a graph and make some observations. Set the viewing window ranges on your graphing calculator to $[-10, 50]$ for $x$ and $[-500,10000]$ for $y.$ The graph should appear as follows:

We first note that since this is a real-life application, we observe that both quantities, $x$ and $T(x),$ are positive or else the problem makes no sense. These conditions, together with the fact that the zero of $T(x)$ is located at $x = 37.9,$ suggest that the actual domain of this function is $0 < \times < 37.$ This domain, which we refer to as a feasible domain, illustrates a common feature of optimization problems: that the real-life conditions of the situation under study dictate the domain values. Once we make this observation, we can use our First and Second Derivative Tests and the method for finding absolute maximums and minimums on a closed interval (in this problem, $[0,37]$), to see that the function attains an absolute maximum at $x = 25,$ at the point $(25, 8687.5).$ So, charging a price of $\25$ will result in a total of $8687$ tires being sold.

In addition to the feasible domain issue illustrated in the previous example, many optimization problems involve other issues such as information from multiple sources that we will need to address in order to solve these problems. The next section illustrates this fact.

Primary and Secondary Equations

We will often have information from at least two sources that will require us to make some transformations in order to answer the questions we are faced with. To illustrate this, let’s return to our Lesson on Related Rates problems and recall the right circular cone volume problem.

$V=\frac{1}{3}\pi r^2h.$

We started with the general volume formula $V=\frac{1}{3}\pi r^2h$ , but quickly realized that we did not have sufficient information to find $\frac{dh}{dt}$ since we had no information about the radius when the water level was at a particular height. So we needed to employ some indirect reasoning to find a relationship between $r$ and $h$, $r(t)=\frac{2h(t)}{5}$. We then made an appropriate substitution in the original formula $(V=\frac{1}{3}\pi\left (\frac{2h}{5}\right )^2h=\frac{4\pi}{75}h^3)$ and were able to find the solution.

We started with a primary equation, $V=\frac{1}{3}\pi r^2h$, that involved two variables and provided a general model of the situation. However, in order to solve the problem, we needed to generate a secondary equation, $r(t)=\frac{2h(t)}{5}$, that we then substituted into the primary equation. We will face this same situation in most optimization problems.

Let’s illustrate the situation with an example.

Example 2:

Suppose that Mary wishes to make an outdoor rectangular pen for her pet chihuahua. She would like the pen to enclose an area in her backyard with one of the sides of the rectangle made by the side of Mary's house as indicated in the following figure. If she has $90 \;\mathrm{ft}$ of fencing to work with, what dimensions of the pen will result in the maximum area?

Solution:

The primary equation is the function that models the area of the pen and that we wish to maximize,

$A = xy.$

The secondary equation comes from the information concerning the fencing Mary has to work with. In particular,

$2 x + y = 90.$

Solving for $y$ we have

$y = 90 - 2x.$

We now substitute into the primary equation to get

$A = xy = x (90-2x),$ or

$A = 90x -2x ^2.$

It is always helpful to view the graph of the function to be optimized. Set the viewing window ranges on your graphing calculator to $[-10, 100]$ for $x$ and $[-500,1200]$ for $y.$ The graph should appear as follows:

The feasible domain of this function is $0 < \times < 45,$ which makes sense because if $x$ is $45 \;\mathrm{feet}$, then the figure will be two $45$-foot-long fences going away from the house with $0\;\mathrm{feet}$ left for the width, $y.$ Using our First and Second Derivative Tests and the method for finding absolute maximums and minimums on a closed interval (in this problem, $[0, 45]$), we see that the function attains an absolute maximum at $x = 22.5,$ at the point $(22.5,1012.5).$ So the dimensions of the pen should be $x = 22.5,$ $y = 45$; with those dimensions, the pen will enclose an area of $1012.5 \;\mathrm{ft}^2.$

Recall in the Lesson Related Rates that we solved problems that involved a variety of geometric shapes. Let’s consider a problem about surface areas of cylinders.

Example 3:

A certain brand of lemonade sells its product in $16-$ounce aluminum cans that hold $473\;\mathrm{ml}$ $(1 \;\mathrm{ml} = 1 \;\mathrm{cm^3}).$ Find the dimensions of the cylindrical can that will use the least amount of aluminum.

Solution:

We need to develop the formula for the surface area of the can. This consists of the top and bottom areas, each $\pi r^2,$ and the surface area of the side, $2 \pi rh$ (treating the side as a rectangle, the lateral area is (circumference of the top) $\times$ (height)). Hence the primary equation is

$A = 2 \pi r^2 + 2 \pi rh.$

We observe that both our feasible domains require $r, h > 0.$

In order to generate the secondary equation, we note that the volume for a circular cylinder is given by $V = \pi r^2h.$ Using the given information we can find a relationship between $r$ and $h,$ $h=\frac{473}{\pi r^2}$. We substitute this value into the primary equation to get $A = 2\pi r^2+2\pi r\left (\frac{473}{\pi r^2}\right )$, or $A=2\pi r^2+\frac{946}{r}.$

$\frac{dA}{dr}=4\pi r-\frac{946}{r^2}=0$ when $r=\sqrt[3]{\frac{946}{4\pi}}\approx 9.06\;\mathrm{cm}$. We note that $\frac{d^2A}{dr^2}>0$ since $r > 0.$ Hence we have a minimum surface area when $r=\sqrt[3]{\frac{946}{4\pi 0}}\approx 4.22\;\mathrm{cm}$ and $h=\frac{473}{\pi(\sqrt[3]{\frac{946}{4\pi})^2}}=8.44 \;\mathrm{cm}$.

## Lesson Summary

1. We used the First and Second Derivative Tests to find absolute maximum and minimum values of a function.
2. We used the First and Second Derivative Tests to solve optimization applications.

For video presentations of maximum-minimum Business and Economics applications (11.0), see Math Video Tutorials by James Sousa, Max & Min Apps. w/calculus, Part 1 (9:57)

To see more examples of worked out problems involving finding minima and maxima on an interval (11.0), see the video at Khan Academy Minimum and Maximum Values on an Interval (11:42).

This video shows the process of applying the first derivative test to problems with no context, just a given function and a domain. A classic problem in calculus involves maximizing the volume of an open box made by cutting squares from a rectangular sheet and folding up the edges. This very cool calculus applet shows one solution to this problem and multiple representations of the problem as well. Calculus Applet on Optimization

## Review Questions

In problems #1–4, find the absolute maximum and absolute minimum values, if they exist.

1. $f (x) = 2x^2 - 6 x + 6$ on $[0,5]$
2. $f(x) = x^3 + 3 x^2$ on $[-2,3]$
3. $f(x)=3x^\frac{2}{3}-6x+6$ on $[1,8]$
4. $f(x) = x^4 - x^3$ on $[-2,2]$
5. Find the dimensions of a rectangle having area $2000 \;\mathrm{ft}^2$ whose perimeter is as small as possible.
6. Find two numbers whose product is $50$ and whose sum is a minimum.
7. John is shooting a basketball from half-court. It is approximately $45 \;\mathrm{ft}$ from the half court line to the hoop. The function $s(t) = -0.025 t^2 + t + 15$ models the basketball’s height above the ground $s(t)$ in feet, when it is $t\;\mathrm{feet}$ from the hoop. How many feet from John will the ball reach its highest height? What is that height?
8. The height of a model rocket $t$ seconds into flight is given by the formula $h(t)=-\frac{1}{3}t^3+4t^2+25t+4$.
1. How long will it take for the rocket to attain its maximum height?
2. What is the maximum height that the rocket will reach?
3. How long will the flight last?
9. Show that of all rectangles of a given perimeter, the rectangle with the greatest area is a square.
10. Show that of all rectangles of a given area, the rectangle with the smallest perimeter is a square.

1. Absolute minimum at $x=\frac{3}{2},f\left (\frac{3}{2}\right )=\frac{3}{2}$. Absolute maximum at $x = 5,$ $f(5) = 26.$
2. Absolute minimum at $x = 0,$ $f(0) = 0.$ Absolute maximum at $x = 3,$ $f(3) = 54.$
3. Absolute minimum at $x = 8,$ $f(8) = -30.$ Absolute maximum at $x = 1,$ $f(1) = 3.$
4. Absolute minimum at $x = 0.75,$ $f(0.75) = -0.105.$ Absolute maximum at $x = -2,$ $f(-2) = 24.$
5. $x=y=20\sqrt{5}$
6. $x=y=5\sqrt{2}$
7. At $t = 20 \;\mathrm{ft}$, the basketball will reach a height of $s(t) = 25 \;\mathrm{ft}$.
8. The rocket will take approximately $t\approx10.4 \;\mathrm{sec}$ to attain its maximum height of $321.7 \;\mathrm{ft}$. the rocket will hit the ground at $t\approx16.6 \;\mathrm{sec}$.
9. Assume that the given perimeter is a constant $P$. Then: $P = 2w + 2l$, where $w$ is the width of the rectangle and $l$ is the length. The area of this rectangle is given by $A = Wl$. Since we want to maximize the area, we first isolate $w$ in the perimeter equation: $w = \frac{P-2l}{2}$ And then substitute this into the area equation: $A = lw = l\left( \frac{P-2l}{2} \right) = \frac{Pl}{2} - l^2$. To find the maximum of $A$, we then take the derivative of $A$ with respect to $l$, set the derivative equal to zero, and solve for $l$ and the associated critical value: $\frac{dA}{dl} = \frac{P}{2} - 2l = 0$ Which means that: $2l = \frac{P}{2}, or \ l = \frac{P}{4},$ will produce either a max or minimum for the area $A$. We can also take the second derivative of $A$ with respect to $l$ to determine whether this $l = \frac{P}{4}$ produces a maximum or a minimum: $\frac{d^2 A}{dl^2} = -2$ And this negative value for the second derivative over the entire domain of $A$ means that the function A is concave downwards everywhere, which, in turn, means that the function $A$ at the point $l = \frac{P}{4}$ is a maximum. Finally, since $l = \frac{P}{4}$ we know that: $w = \frac{P-2l}{2} = \frac{P-2\left(\frac{P}{4}\right)}{2} = \frac{\frac{P}{2}}{2} = \frac{P}{4}$ Accordingly, since $w = l = \frac{P}{4}$, we have shown that the dimensions that produce the maximum area are square dimensions.
10. Assume that the given area is a constant $A$. Then: $A = wl$, where $w$ is the width of the rectangle and $l$ is the length. Then the perimeter of this rectangle is given by $P = 2w+2l$. Since we want to minimize the perimeter, we first isolate $w$ in the area equation: $w = \frac{A}{l}$. Substituting this into the perimeter equation we get: $P = 2w+2l = 2\left( \frac{A}{l} \right)+2l$. To find the point of minimization of this perimeter function, we take the derivative of this function with respect to $l$ and set it to zero and solve for $l$: $\frac{dP}{dl} &= \frac{-2A}{l^2}+2 = 0\\2 &= \frac{2A}{l^2}\\l^2 &= A\\l &= \sqrt{A}$ To find $w$ we substitute this value back into the area formula: $A &= wl = w\sqrt{A}\\W &= \frac{A}{\sqrt{A}} = \sqrt{A}$ So we have either a perimeter maximum or a minimum at $w = l = \sqrt{A}$. To determine which, we look at the second derivative of the perimeter function: $\frac{d^2 P}{dl^2} = \frac{4A}{l^3}$. Since we know that the domain of $l$ is limited to positive values, then $\frac{d^2 P}{dl^2} = \frac{4A}{l^3}$ is positive for all values of $l$, and the function $P$ is concave upwards everywhere in the domain for $l$, and so $w = l = \sqrt{A}$ produces an absolute minimum for $P$. Accordingly, we have shown that the smallest perimeter is in the shape of a square.

Feb 23, 2012

Dec 03, 2014