Back to the on-screen lesson ·

Applied optimisation

Turning a description into a function of one variable, maximising it, and justifying that the answer is one.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to separate the objective from the constraint in a described problem, use the constraint to write the objective in one variable, state the domain the physical situation imposes and use it to reject roots and to supply endpoint candidates, differentiate and solve, justify that the stationary point found is the extremum by a derivative test or an endpoint comparison, transform an objective monotonically where that makes the calculus easier, and answer the question that was actually asked.

2. Build the function, then maximise it

An applied optimisation problem arrives as a description, and most of the work is turning it into a function of one variable. The calculus at the end is the part you already know.

Two equations, doing different jobs.

The constraint is what eliminates a variable; the objective is what gets differentiated. Getting them the wrong way round is the standard false start, and it produces an equation that is true and useless.

The method.

  1. Name the variables and say what each means, with units.
  2. Write the objective.
  3. Write the constraint.
  4. Use the constraint to put the objective in one variable.
  5. State the domain, from the physical situation.
  6. Differentiate, set to zero, solve.
  7. Justify that the solution is the extremum — second derivative, sign change, or comparison with endpoints.
  8. Answer the question that was asked, in the units it was asked in.

Step 7 is the one that gets dropped, and without it the answer is a candidate rather than a conclusion. Step 8 is the second: a question asking for the dimensions is not answered by the area.

Another way: picture

A rectangle with a fixed loop of string around it. Squash it flat and the area vanishes; stretch it tall and the area vanishes again; somewhere between, the area is largest. The endpoints of the domain are the two degenerate shapes, and the interior stationary point is the square — the picture contains the whole argument, endpoints included.

Another way: steps

Where the setting-up goes wrong:

3. Transforming the objective before differentiating

A monotone transformation of the objective does not move the minimiser. If $g$ is increasing, then $f$ and $g \circ f$ are minimised at the same place — because $g$ preserves order, so it preserves which value is smallest.

Two uses come up constantly.

Minimise the square of a distance. $D = \sqrt{(x-a)^2 + (y-b)^2}$ is awkward to differentiate and $D^2$ is a polynomial. Since $\sqrt{\ }$ is increasing on $[0,\infty)$, minimising $D^2$ minimises $D$, and the answer is the same point.

Take logarithms of a product. Maximising $f(x) = x^a(1-x)^b$ over $(0,1)$ is much easier as maximising $\ln f = a\ln x + b\ln(1-x)$, whose derivative is $\dfrac{a}{x} - \dfrac{b}{1-x}$ and needs no product rule at all. This is how a maximum-likelihood estimate is computed, every time.

The transformation changes the value of the objective and not the location of the extremum, so remember to report the original quantity if that is what was asked for.

4. Where this goes wrong

Differentiating the constraint. It is a fixed fact, not the thing being optimised.

Leaving two variables in the objective. Then $\dfrac{dA}{dw}$ is not well defined, because $h$ is silently a function of $w$ and has not been substituted.

Skipping the domain. A negative length, or a width exceeding the available fence, is not a candidate. And on a closed domain the endpoints are candidates that have to be checked.

Skipping the justification. $f' = 0$ finds candidates; a derivative test or an endpoint comparison finds the answer.

Answering the wrong question. "What are the dimensions?" wants $w$ and $h$; "what is the largest area?" wants $A$. Both come from the same calculation and they are different answers.

Reporting a transformed value. If you minimised $D^2$, the minimum distance is the square root of what you found.

5. Finding the number is not answering the question

The calculus in an optimisation problem is usually three lines, and the marks — and the meaning — are in the lines around it. Two habits separate an answer from a candidate.

Justify. A stationary point is not an extremum until a derivative test or an endpoint comparison says it is. On a closed interval, compare; on an open one, use $f''$ and note that a unique stationary point makes a local extremum global. Without this the work has found a place where the derivative vanishes, and nothing more.

Answer what was asked. The question may want the dimensions, or the maximum value, or the cost at the optimum, and these are three different numbers from one calculation. Reporting $x = \sqrt3$ when the question asked for the area is a complete solution with no answer at the end of it.

6. A can of fixed volume, minimum material

  1. Objective: surface area $S = 2\pi r^2 + 2\pi rh$. Constraint: $\pi r^2 h = V$ with $V$ fixed, so $h = \dfrac{V}{\pi r^2}$.

    Name both, in that order.

  2. Substitute: $S(r) = 2\pi r^2 + \dfrac{2V}{r}$ on $r > 0$. Then $S'(r) = 4\pi r - \dfrac{2V}{r^2} = 0$ gives $r^3 = \dfrac{V}{2\pi}$.

    One variable, then differentiate.

  3. $S'' = 4\pi + \dfrac{4V}{r^3} > 0$, so it is a minimum. Substituting back gives $h = 2r$: the optimal can is as tall as it is wide. Real cans are not, because the top and bottom cost more per unit area than the side — which is a different objective and a different answer.

    Justify, then interpret.

7. A problem where an endpoint wins

  1. A wire of length $12$ is cut into two pieces, one bent into a square and the other into a circle. Where should it be cut to maximise the total area?

    The objective is a sum of two areas.

  2. With $x$ used for the square: $A(x) = \dfrac{x^2}{16} + \dfrac{(12-x)^2}{4\pi}$ on $[0, 12]$. The stationary point is a minimum — $A'' > 0$ — so it is the answer to a different question.

    Check what the stationary point is before using it.

  3. The maximum is at an endpoint: $A(0) = \dfrac{144}{4\pi} \approx 11.5$ against $A(12) = 9$. All of it into the circle. Without checking the endpoints the answer would have been the minimum, reported confidently as the maximum.

8. Your turn: the largest rectangle with base on the $x$-axis inscribed under $y = 9 - x^2$

  1. By symmetry the corners are at $\pm x$, so the base is $2x$ and the height $9 - x^2$: $A(x) = 2x(9-x^2)$ on $[0,3]$.

    Objective in one variable.

  2. $A'(x) = 18 - 6x^2 = 0$ gives $x = \sqrt3$.

  3. Your turn: work this step out. Its working is at the end of the packet.

    $A'' = -12x < 0$ there, so it is a maximum; the endpoints give $A = 0$. Area $= 2\sqrt3(6) = 12\sqrt3$.

9. Guided practice

Match each optimization step to its purpose.

Defines the function whose values are comparedExpresses dependent variables in one variableFinds interior critical candidatesIdentifies the absolute optimum on the feasible domain
The quantity to maximize or minimize
A fixed perimeter, budget, or volume relation
Set the objective derivative to zero
Check candidates and endpoints

10. Guided practice

Match each step in a fencing optimization problem to the job it performs.

The resource constraintThe quantity to maximizeA one-variable objective on a physical domainEvidence that an interior critical point is a maximum
$2w+2h=40$
$A=wh$
$A(w)=w(20-w)$
$A''(w)=-2$

11. Practice

A rectangle has perimeter $26$. What is its largest possible area?

Answer:

12. Practice

A farmer has $54$ m of fence for a rectangular pen and wants the largest area. Which equation is the constraint?

Constraint equationQuantity to maximizeReduces the objective to one variableFinds interior critical candidates
A fixed total amount of fence
Area $A=wh$
Solve the perimeter relation for one variable
Derivative of the one-variable objective

13. Practice

A closed-topped box has a square base of side $x$ and height $h$, with $x^2h = 5$ fixed. Its surface area is $2x^2 + 4xh$. At the minimum, $x^3$ equals what?

Answer:

14. Somewhere new

Which $x$ minimises the distance from the point $(4, 0)$ to the parabola $y^2 = x$? Give the $x$-coordinate of the closest point, assuming $4 \ge 1/2$.

Answer:

15. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

16. Test question

In the fence problem with $28$ m of fence, the algebra gives candidates $w = 7$ and (from a different formulation) $w = -7$. Why is the second rejected?

Restrict it to physically possible valuesReject it when it lies outside that domainTest its endpoints as optimization candidatesCompare its objective value with the other candidates
A variable represents a physical length
A negative algebraic critical value
A closed feasible interval
A critical value within the feasible domain

17. What you can do now

You can set up, solve and justify an optimisation problem. Say in your own words why finding the stationary point is not yet the answer. Next: L'Hopital's rule, the last of the derivative's applications.

Working for the steps left to you

8. Your turn: the largest rectangle with base on the $x$-axis inscribed under $y = 9 - x^2$, step 3

Justified against both the test and the ends.