impera Open Impera

AP Calculus AB · Analytical applications of differentiation

Optimization

1The idea

Optimization problems ask for the largest or smallest value of some quantity: the maximum area, the minimum cost, the shortest distance. Calculus solves them by finding the absolute extrema of a function.

The method:

  1. Draw and label a diagram. Identify the quantity to optimise.
  2. Write the objective function for that quantity.
  3. Use a constraint (a given fact) to write the objective in terms of one variable.
  4. Find the domain of that variable from the context.
  5. Find critical points: differentiate and set equal to zero.
  6. Justify that you have the absolute maximum or minimum (candidates test, first derivative test, or second derivative test).
  7. Answer the question asked, with units.
Check yourself

In an optimization problem, what is the constraint used for?

  • To write the objective function in terms of one variable

  • To find the domain of the function only

  • To choose the units for each of the variables

  • To find the second derivative of the objective

Show the answer

To write the objective function in terms of one variable

It links the variables.

2Maximising an area

Worked example

a farmer has 600 m of fencing to enclose a rectangular field along a river. No fence is needed along the river. What dimensions maximise the area?

  1. Let $x$ be the length of each side perpendicular to the river and $y$ the side parallel to it.
  2. Objective: $A = xy$.
  3. Constraint: $2x + y = 600$, so $y = 600 - 2x$, and $A(x) = 600x - 2x^2$.
  4. Domain: $0 < x < 300$.
  5. $A'(x) = 600 - 4x = 0$ gives $x = 150$.
  6. $A''(x) = -4 < 0$, so $A$ is concave down everywhere and $x = 150$ gives the absolute maximum.
  7. Dimensions: 150 m by 300 m (300 m along the river). Maximum area: $45{,}000$ m².

The area function for the fence problem peaks at x = 150 m

Check yourself

In the fence problem, why is x = 150 an absolute maximum, not just a relative one?

  • Because the river is straight, so one side needs no fence

  • Because 150 is exactly half of the 300 m of fencing used

  • Because A(150) is positive, so it must be the largest area

  • A″ < 0 everywhere and x = 150 is the only critical point

Show the answer

A″ < 0 everywhere and x = 150 is the only critical point

One critical point plus concavity gives the absolute extremum.

3Minimising a cost or surface area

Worked example

an open-top box with a square base must hold 32,000 cm³. Find the dimensions that use the least material.

  1. Base side $x$, height $h$.
  2. Objective (surface area): $S = x^2 + 4xh$.
  3. Constraint: $x^2h = 32{,}000$, so $h = \frac{32000}{x^2}$, and $S(x) = x^2 + \frac{128000}{x}$.
  4. Domain: $x > 0$.
  5. $S'(x) = 2x - \frac{128000}{x^2} = 0$ gives $x^3 = 64000$, so $x = 40$.
  6. $S'' = 2 + \frac{256000}{x^3} > 0$ for $x > 0$, so this is the absolute minimum.
  7. Base 40 cm by 40 cm, height $h = \frac{32000}{1600} = 20$ cm.
Check yourself

For S(x) = x² + 128000/x, the critical point is x =

  • 40

  • 64000

  • 20

  • 80

Show the answer

40

2x³ = 128000.

4Distance problems

Worked example

find the point on $y = \sqrt{x}$ closest to $(3, 0)$.

  1. A point on the curve is $(x, \sqrt{x})$.
  2. Distance squared: $D = (x - 3)^2 + (\sqrt{x})^2 = x^2 - 5x + 9$. (Minimising $D$ also minimises the distance, since square root is increasing. This avoids messy roots.)
  3. $D'(x) = 2x - 5 = 0$ gives $x = 2.5$.
  4. $D'' = 2 > 0$: a minimum.
  5. The closest point is $\left(2.5, \sqrt{2.5}\right) \approx (2.5, 1.58)$.
Check yourself

Why minimise the square of the distance instead of the distance?

  • It has the same minimum point and avoids square roots

  • The distance formula is wrong for points on curves

  • It changes the critical point to an easier value

  • It always gives a smaller answer than the distance

Show the answer

It has the same minimum point and avoids square roots

√ is an increasing function.

5Checking the endpoints

When the domain is a closed interval, you must also check the endpoints, because the absolute extremum could be there.

Worked example

a wire 10 cm long is cut into two pieces: one bent into a square, the other into a circle. Where should it be cut to maximise the total area?

  1. Let $x$ be the length for the square ($0 \le x \le 10$). Area $= \left(\frac{x}{4}\right)^2 + \pi\left(\frac{10 - x}{2\pi}\right)^2 = \frac{x^2}{16} + \frac{(10 - x)^2}{4\pi}$.
  2. Setting $A'(x) = 0$ gives $x = \frac{40}{4 + \pi} \approx 5.6$, but this is a minimum (the function is concave up).
  3. Endpoints: $A(0) = \frac{25}{\pi} \approx 7.96$; $A(10) = 6.25$.
  4. Maximum total area: use all the wire for the circle.

The critical point alone would have given the wrong answer.

Check yourself

On a closed domain, the absolute maximum might occur:

  • Only where f″ = 0

  • At an endpoint

  • Never at an endpoint

  • Only at a critical point

Show the answer

At an endpoint

Always check the endpoints.

6Going deeper: a reliable procedure and three classic problems, fully justified

Procedure

  1. Draw and name the variables.
  2. Write the quantity to optimize (the objective) as a formula.
  3. Use the constraint to reduce it to a function of one variable.
  4. State the domain.
  5. Differentiate; find critical points.
  6. Justify that the critical point gives a maximum or minimum (candidates test, first or second derivative test).
  7. Answer the question asked, with units.

Worked example (fence): 100 m of fencing encloses a rectangle against a straight wall (no fence needed along the wall). Maximize the area.

  1. Let x be each side perpendicular to the wall; the side parallel is 100 − 2x.
  2. $A(x) = x(100 - 2x) = 100x - 2x^2$, for 0 < x < 50.
  3. $A'(x) = 100 - 4x = 0$: x = 25.
  4. $A''(x) = -4 < 0$: a maximum (and the only critical point).
  5. Dimensions 25 m by 50 m; area 1250 m².

Worked example (open box): squares of side x are cut from the corners of a 12 cm by 12 cm sheet and the sides folded up. Maximize the volume.

  1. $V(x) = x(12 - 2x)^2$, for 0 < x < 6.
  2. $V'(x) = (12 - 2x)^2 + x \cdot 2(12 - 2x)(-2) = (12 - 2x)(12 - 6x)$.
  3. Critical points: x = 6 (an endpoint, volume 0) and x = 2.
  4. V′ changes from positive to negative at x = 2: maximum.
  5. Volume = 2(8)² = 128 cm³.

Worked example (can): a closed cylinder must hold 1000 cm³. Minimize the surface area.

  1. Constraint: $\pi r^2h = 1000$, so $h = \frac{1000}{\pi r^2}$.
  2. $S = 2\pi r^2 + 2\pi rh = 2\pi r^2 + \frac{2000}{r}$, for r > 0.
  3. $S' = 4\pi r - \frac{2000}{r^2} = 0$: $r^3 = \frac{500}{\pi}$, so r = 5.42 cm.
  4. $S'' = 4\pi + \frac{4000}{r^3} > 0$ for all r > 0: concave up, so this is the absolute minimum.
  5. $h = \frac{1000}{\pi(5.42)^2} = 10.84$ cm: the height equals the diameter.

Worked example (distance): find the point on $y = \sqrt{x}$ closest to (3, 0).

  1. Minimize the square of the distance: $D = (x - 3)^2 + x$.
  2. $D' = 2(x - 3) + 1 = 0$: x = 2.5.
  3. D″ = 2 > 0: minimum.
  4. Point $(2.5, \sqrt{2.5})$; distance $\sqrt{0.25 + 2.5} = 1.66$.

Worked example (revenue): a shop sells 200 items a week at 10 dollars; each 1-dollar price rise loses 10 sales.

  1. With x price rises: R = (10 + x)(200 − 10x).
  2. R′ = 200 − 10x − 100 − 10x = 100 − 20x = 0: x = 5.
  3. R″ = −20 < 0: maximum.
  4. Price 15 dollars; revenue 15 × 150 = 2250 dollars.

Justifying on the exam

  • Closed interval: compare values at critical points and endpoints.
  • One critical point: "A′ changes from positive to negative at x = 25, and it is the only critical point, so A has its absolute maximum there." Or use the second derivative being negative on the whole domain.
  • A critical point alone is not a justification.

Tips

  • Minimizing a distance: minimize its square.
  • Check that the answer lies in the domain and makes physical sense.
  • Re-read the question: does it want the value of x, the dimensions, or the optimal amount?

Common mistakes

  • Differentiating before eliminating the second variable.
  • No justification that the critical point is a maximum or minimum.
  • Ignoring endpoints of the domain.
  • Answering with x when the maximum area or the dimensions were asked.
  • Algebra slips with the chain rule in the box problem.
Check yourself

In an optimization problem with two variables, what must be done before differentiating?

  • Set both variables equal to each other so they can be combined into one

  • Differentiate the constraint twice to find where it is concave down

  • Substitute the endpoints of the interval into the objective function

  • Use the constraint to write the objective as a function of one variable

Show the answer

Use the constraint to write the objective as a function of one variable

The derivative test applies to a function of a single variable.

7For top marks

  • Define every variable with units.
  • Show the objective function in one variable and state its domain.
  • Justify absolute extrema: one critical point plus a sign change of $f'$, or concavity throughout, or the candidates test on a closed interval.
  • Answer exactly what is asked: dimensions, the location, or the maximum value.
Example

"Since $A'(x) > 0$ for $0 < x < 150$ and $A'(x) < 0$ for $150 < x < 300$, $A$ has its absolute maximum at $x = 150$."

Check yourself

A question asks for the maximum area. Which final answer is correct in form?

  • 150 m by 300 m only

  • A′(150) = 0

  • 45,000 m²

  • x = 150

Show the answer

45,000 m²

Give the value asked for, with units.

Now test yourself

This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.

Practise in Impera