Skip to main content

Section 4.4 Optimization

A relatively simple but important application of the derivative is the problem of finding a maximum or minimum value of a varying quantity. Historically, this was one of the first successes of calculus.

Subsection 4.4.1 Optimization Problems

  1. Read the question carefully, and identify what is known and what needs to be found, and what quantity needs to be optimized.
  2. Sketch a diagram of the geometric situation, if possible. Try to sketch the most general situation. Label which quantities are given (fixed), and which quantities are varying (variables). This will help you identify the relationships between the quantity involved.
  3. Determine the equation that involves the quantity which is to be maximized or minimized, in terms of the quantities labelled in the previous step, called the objective function.
  4. Write the objective function in terms of only one independent variable, by determining relationships between the independent variables, solving for one of the variables, and substituting into the formula.
  5. Determine the implied domain of the single independent variable, based on the specific problem.
  6. Use the techniques of differential calculus to determine the absolute maximum or minimum. In other words, determine critical points, and determine the absolute maximum on the implied domain.

Subsection 4.4.2 Examples

Maximize the product of two numbers with fixed sum.
Minimize the sum of two numbers with fixed product.
Find two positive numbers whose product is 64 and whose sum is a minimum. Let \(x, y > 0\) be the numbers, so \(xy = 64\text{.}\) We want to minimize \(s = x + y\) Then, \(y = \frac{64}{x}\text{,}\) so,
\begin{equation*} s = x + \frac{64}{x} \end{equation*}
Then, \(\frac{ds}{dx} = 1 - \frac{64}{x^2}\text{.}\) Then,
\begin{align*} 1 - \frac{64}{x^2} \amp = 0\\ x^2 \amp = 64\\ x \amp = \pm 8 \end{align*}
Here, only the \(x = 8\) solution applies, because the numbers must be positive. Verifying with the second derivative, \(s''(x) = \frac{128}{x^3}\) which is positive for \(x > 0\text{,}\) so \(x = 8\) is a minimum.
The distance between a point \((x,y)\) on the graph of \(y = f(x)\) and a fixed point \((a,b)\) is given by,
\begin{equation*} d(x) = \sqrt{(x - a)^2 + \brac{f(x) - b}^2} \end{equation*}
Instead, we can minimize the square of distance, which makes differentiation easier. Say,
\begin{equation*} D(x) = (x - a)^2 + \brac{f(x) - b}^2 \end{equation*}

Subsection 4.4.3 Application: Range of a Projectile

You may recall from physics that for a projectile launched from the ground, with initial velocity \(v\) at an angle of \(\theta\) above the horizontal, the horziontal range of the projectile is given by,
\begin{equation*} R = \frac{v^2 \sin{(2\theta)}{g} \end{equation*}
where \(g\) is the gravitational constant. This neglects air resistance, and assumes the Earth is flat.
Using differentiation, we can determine what angle \(\theta\) produces the maximum range.
\begin{align*} \frac{dR}{d\theta} = \frac{2v^2}{g} \cos{(2\theta)} \amp = 0\\ \cos{(2\theta)} \amp = 0 \end{align*}
Then,
\begin{align*} 2\theta \amp = \frac{\pi}{2}\\ \theta \amp = \frac{\pi}{4} \end{align*}
In other words, the maximum range is produced when the launch angle is \(\ang{45}\text{.}\)

Subsection 4.4.4 Cylindrical Can

Minimize surface area (material used) given a fixed volume that is desired.

Subsection 4.4.5 Application: Snell's Law

You may have noticed that light bends in water. When a ray of light passes from a thinner medium (like air) to a thicker medium (like water, or glass), the light ray bends towards the perpendicular between the two media. Similarly, when passing from denser to thinner, it bends away from the perpendicular. In 1621, Willebrord Snell, Dutch scientist, conducted experiments with refraction in various mediums, and varying the angle of the incoming ray. He discovered that for two given medium, if \(\theta_1, \theta_2\) are the angles between the incident ray and the perpendicular, and the refracted ray and the perpendicular, then the ratio of the sines of these angles were constant. In other words,
\begin{equation*} \frac{\sin{\theta_1}}{\sin{\theta_2}} \end{equation*}
was constant. In fact, this property was discovered previously in 1602 by Thomas Harriot, English astronomer, and in 984 by Ibn Sahl, Persian mathematician. More precisely,
Fermat's principle of least time states that a ray takes the path from point A to point B which takes the least time. If we assume this principle is true, then using differential calculus and optimization, we can determine the conditions where this is satisfied, and derive this relationship. Let \(L\) be the horizontal distance from the source to the target, \(a\) be the vertical distance from the source to the change in medium, \(b\) be the vertical distance from the target to the change in medium. Let \(\theta_1, \theta_2\) be the angle between the normal and the ray. Then, the total travel time from source to target is,
\begin{equation*} T = \frac{\sqrt{x^2 + a^2}}{v_1} + \frac{\sqrt{(L - x)^2 + b^2}}{v_2} \end{equation*}
Then, finding critical points,
\begin{equation*} \frac{dT}{dx} = \frac{x}{v_1 \sqrt{x^2 + a^2}} - \frac{L - x}{v_2 \sqrt{(L - x)^2 + b^2}} = 0 \end{equation*}
Then, notice that,
\begin{equation*} \frac{x}{\sqrt{x^2 + a^2}} = \sin{\theta_1} \qquad \text{and} \qquad \frac{L - x}{\sqrt{(L - x)^2 + b^2}} = \sin{\theta_2} \end{equation*}
Then, the equation reduces to,
\begin{equation*} \frac{\sin{\theta_1}}{v_1} - \frac{\sin{\theta_2}}{v_2} = 0 \end{equation*}
This equation can be rearranged into the equivalent formulation,
\begin{equation*} \frac{\sin{\theta_2}}{\sin{\theta_1}} = \frac{v_2}{v_1} \end{equation*}

Subsection 4.4.6 Advaned: General Box Problem

Consider the box problem, with a rectangular piece of cardboard, of length \(L\) and width \(W\text{,}\) forming an open box by cutting four equal-sized square corners, and folding up the sides, and taping them together at the edges. The volume of the box with side length cut \(x\) is given by,
\begin{equation*} V(x) = (L - 2x) \cdot (W - 2x) \cdot x \end{equation*}
Then, in this general form, we can determine the extrema.
\begin{align*} V(x) \amp = (LW - 2Wx - 2Lx + 4x^2) x \\ \amp = LWx + (-2W - 2L) x^2 + 4x^3\\ 4x^3 + (-2W - 2L) x^2 + LWx \end{align*}
Then,
\begin{equation*} V'(x) = 12x^2 + (-4W - 4L)x + LWx = 0 \end{equation*}
Then, determining critical points,
\begin{align*} x \amp = \frac{-(-4W - 4L) \pm \sqrt{(-4W - 4L)^2 - 4(12)(LW)}{2(12)}\\ \amp = \frac{4W + 4L \pm \sqrt{16W^2 + 32LW + 16L^2 - 48LW}{24}\\ \amp = \frac{4W + 4L \pm \sqrt{16W^2 - 16LW + 16L^2}{24}\\ \amp = \frac{4W + 4L \pm 4 \sqrt{W^2 - LW + L^2}}{24}\\ \amp = \frac{W + L \pm \sqrt{W^2 - LW + L^2}}{6} \end{align*}
It turns out that the maximum occurs at the solution with the negative sign. Then, the maximum volume is \(V\brac{\frac{W + L \pm \sqrt{W^2 - LW + L^2}}{6}}\text{.}\)