24.7 Optimisation

IB Math AA SL and HL: how to use derivatives to find the greatest or least value of a quantity in a practical problem; how to build the function to… Worked examples and solutions.

SL 5.8

In this section you will learn
  • how to use derivatives to find the greatest or least value of a quantity in a practical problem
  • how to build the function to optimise from a diagram and a constraint
  • how to justify that a stationary value is a maximum or a minimum

The method

Optimisation means finding the best value: the largest area, the smallest cost, the shortest distance, and so on. In 24.3 we used the first and second derivatives to find maximum and minimum points. Now we apply this to real problems.

Stationary values and their nature Not in the formula booklet

For \(y = f(x)\):

  • if \(\frac{dy}{dx} = 0\) at \(x = a\), there is a stationary point at \(x = a\) and \(f(a)\) is a stationary value of \(y\);
  • if \(\frac{dy}{dx} = 0\) and \(\frac{d^2y}{dx^2} < 0\) at \(x = a\), then \(f(a)\) is a maximum value of \(y\);
  • if \(\frac{dy}{dx} = 0\) and \(\frac{d^2y}{dx^2} > 0\) at \(x = a\), then \(f(a)\) is a minimum value of \(y\).
  • \(a\): the \(x\)-coordinate of the stationary point
  • \(\frac{d^2y}{dx^2}\): the second derivative of \(y\)

The formulae for areas and volumes (cylinder, cone, sphere, …) are in the booklet.

The steps:

  1. Draw a diagram and name the variables.
  2. Write the quantity to optimise (for example \(V\)) using the variables.
  3. Use the constraint (the fixed information) to write it in terms of one variable. State the domain.
  4. Differentiate and solve \(\frac{dV}{dx} = 0\).
  5. Justify that it is a maximum (or minimum): second derivative test or a sign diagram of \(\frac{dV}{dx}\).
  6. Answer the question that was asked (it may ask for \(V\), or for \(x\), or for something else), with units.

Example 1 A right circular cone with base radius \(r\) cm and height \(h\) cm is inscribed in a sphere of radius \(6\) cm, as in the cross-section below. The volume of the cone is \(V\) cm\(^3\).

(a) Show that \(r^2 = 12h - h^2\).

(b) Express \(V\) in terms of \(h\).

(c) Given that \(h\) can vary, find the value of \(h\) for which \(V\) is stationary.

(d) Show that this value of \(h\) gives the maximum volume, and find this maximum volume.

(a) The centre \(O\) is \(6\) cm below the vertex, so the base of the cone is \(h - 6\) cm below \(O\). A radius of the sphere goes from \(O\) to the edge of the base. By Pythagoras,

\[ r^2 + (h - 6)^2 = 6^2 \;\Rightarrow\; r^2 + h^2 - 12h + 36 = 36 \;\Rightarrow\; r^2 = 12h - h^2 . \]

(b) \(V = \frac{1}{3}\pi r^2 h = \frac{1}{3}\pi(12h - h^2)h = \frac{\pi}{3}(12h^2 - h^3)\), for \(0 < h < 12\).

(c) \(\frac{dV}{dh} = \frac{\pi}{3}(24h - 3h^2) = \pi h(8 - h)\). Since \(h > 0\), \(\frac{dV}{dh} = 0\) gives \(h = 8\).

(d) \(\frac{d^2V}{dh^2} = \frac{\pi}{3}(24 - 6h) = \pi(8 - 2h)\). At \(h = 8\): \(\frac{d^2V}{dh^2} = -8\pi < 0\), so it is a maximum.

\[ V_{\max} = \frac{\pi}{3}(12 \times 64 - 512) = \frac{\pi}{3} \times 256 = \frac{256\pi}{3} \approx 268 \text{ cm}^3 . \]

Example 2 At 9:00 a.m. ship \(A\) leaves port \(P\) and sails on a bearing of \(030°\) at \(12\) km h\(^{-1}\). At the same time ship \(B\) is \(70\) km due east of \(P\), sailing towards \(P\) at \(9\) km h\(^{-1}\).

(a) Show that the distance \(D\) km between the ships \(t\) hours after 9:00 a.m. is given by \(D = \sqrt{333t^2 - 2100t + 4900}\).

(b) Find the minimum value of \(D^2\) for \(t \ge 0\).

(c) At what time, to the nearest minute, are the ships closest together? How close are they?

(a) After \(t\) hours, \(PA = 12t\) and \(PB = 70 - 9t\). A bearing of \(030°\) makes an angle of \(60°\) with due east, so \(\angle APB = 60°\). By the cosine rule:

\[ \begin{aligned} D^2 &= (12t)^2 + (70 - 9t)^2 - 2(12t)(70 - 9t)\cos 60° \\ &= 144t^2 + 4900 - 1260t + 81t^2 - 840t + 108t^2 \\ &= 333t^2 - 2100t + 4900 . \end{aligned} \]

(b) \(D\) is smallest when \(D^2\) is smallest. \(\frac{d(D^2)}{dt} = 666t - 2100 = 0\) gives \(t = \frac{350}{111} \approx 3.153\). The second derivative is \(666 > 0\), so this is a minimum.

\[ D^2_{\min} = 333\left(\frac{350}{111}\right)^2 - 2100\left(\frac{350}{111}\right) + 4900 = \frac{176\,400}{111} \approx 1589 . \]

(c) \(0.153 \text{ h} \approx 9\) minutes, so the time is about 12:09 p.m. The least distance is \(\sqrt{1589.2} \approx 39.9\) km. (Check: \(B\) reaches \(P\) only at \(t = \frac{70}{9} \approx 7.8\), so the model is valid at \(t = 3.15\).)

Graphs page: enter \(f_1(x) = \sqrt{333x^2 - 2100x + 4900}\) (use \(x\) for \(t\)). Set the window, for example \(0 \le x \le 8\), \(0 \le y \le 80\). Choose Menu → Analyze Graph → Minimum, and click to the left and then to the right of the lowest point. The calculator shows the minimum at \(x \approx 3.15\), \(y \approx 39.9\).

You must still show the set-up (the function and its domain) in your working.

HL students: continue with 24.8 Further Optimisation.

Common errors

✗ Wrong ✓ Right Why
Differentiating a function of two variables Use the constraint to remove one variable first You can only differentiate a function of one variable here.
Stopping at \(\frac{dV}{dx} = 0\) Justify max/min (second derivative or sign diagram) “Show that it is a maximum” needs a reason.
Giving \(x\) when the question asks for the maximum area Substitute back and answer the question Read the last line of the question again.
Ignoring the domain State the domain and check your answer is in it Lengths must be positive, so some solutions of \(\frac{dV}{dx} = 0\) are not possible.
Minimising \(D\) with a messy square root Minimise \(D^2\) instead \(D\) and \(D^2\) have their minimum at the same \(t\) (for \(D \ge 0\)).

Exercises

1 Two positive numbers \(x\) and \(y\) have \(x + y = 20\). Find the maximum value of \(x^2y\).

\(P = x^2(20 - x) = 20x^2 - x^3\). \(\frac{dP}{dx} = 40x - 3x^2 = x(40 - 3x) = 0 \Rightarrow x = \frac{40}{3}\).

\(\frac{d^2P}{dx^2} = 40 - 6x = -40 < 0\): maximum. \(y = \frac{20}{3}\), \(P = \frac{1600}{9} \times \frac{20}{3} = \frac{32\,000}{27} \approx 1185\).

2 An open box is made from a square sheet of card \(24\) cm by \(24\) cm by cutting a square of side \(x\) cm from each corner and folding up the sides. Find the value of \(x\) that gives the maximum volume, and the maximum volume.

\(V = x(24 - 2x)^2\), \(0 < x < 12\).

\(\frac{dV}{dx} = (24 - 2x)^2 - 4x(24 - 2x) = (24 - 2x)(24 - 6x) = 0 \Rightarrow x = 4\) (since \(x \neq 12\)).

Sign of \(\frac{dV}{dx}\): \(+\) for \(0 < x < 4\), \(-\) for \(4 < x < 12\): maximum. \(V = 4 \times 16^2 = 1024\) cm\(^3\).

3 A closed cylinder has volume \(250\pi\) cm\(^3\). Find the radius and height that make its total surface area as small as possible, and find this area.

\(\pi r^2 h = 250\pi \Rightarrow h = \frac{250}{r^2}\). \(S = 2\pi r^2 + 2\pi r h = 2\pi r^2 + \frac{500\pi}{r}\).

\(\frac{dS}{dr} = 4\pi r - \frac{500\pi}{r^2} = 0 \Rightarrow r^3 = 125 \Rightarrow r = 5\), \(h = 10\).

\(\frac{d^2S}{dr^2} = 4\pi + \frac{1000\pi}{r^3} > 0\): minimum. \(S = 50\pi + 100\pi = 150\pi \approx 471\) cm\(^2\).

4 Find the coordinates of the point on the curve \(y = \sqrt{x}\) that is closest to the point \((4, 0)\), and find this shortest distance.

\(D^2 = (x - 4)^2 + (\sqrt{x})^2 = x^2 - 7x + 16\).

\(\frac{d(D^2)}{dx} = 2x - 7 = 0 \Rightarrow x = \frac{7}{2}\) (second derivative \(2 > 0\): minimum).

Point \(\left(\frac{7}{2}, \sqrt{\frac{7}{2}}\right)\). \(D^2 = \frac{49}{4} - \frac{49}{2} + 16 = \frac{15}{4}\), so \(D = \frac{\sqrt{15}}{2} \approx 1.94\).