Differential Calculus
Applied Optimization
Applied optimization is where the machinery of the last few topics gets cashed in: a word problem is converted into one function of one variable on an explicit domain, and then the absolute maximum or minimum of that function is found. The differentiation is usually the easy part. Marks are lost almost entirely in three places — failing to use the constraint to reduce to a single variable, failing to state the domain, and failing to justify that the critical point found is the global optimum rather than merely a local one.
The procedure
- Draw and label. Give every length, radius, angle, area and cost a symbol; record the units.
- Name the objective. Write the quantity to be optimised as a formula. At this stage it may involve two or more variables.
- Write the constraint as an equation relating those variables (fixed perimeter, fixed volume, a point lying on a given curve, ...).
- Reduce to one variable. Solve the constraint for one variable, substitute, and obtain .
- State the domain : exactly those for which the configuration actually exists.
- Find the critical numbers of in : where or where fails to exist.
- Justify that your candidate is the absolute extremum on , then answer the question that was asked — dimensions, cost, area, time — with units.
Getting the domain right
Every physical length must be , and so must every length derived from . Collect the inequalities and intersect them. Cutting squares of side from the corners of a sheet requires , and , giving .
Include the degenerate endpoints whenever extends continuously to them. A box of height is not a box, but admitting and costs nothing (those values give , which will never win) and it converts an open interval into a closed bounded one — which hands you the Extreme Value Theorem for free.
Sometimes you cannot do this: a radius sitting in a denominator forces , so the domain is , EVT does not apply, and you must justify a different way.
The justification toolkit
| Situation | Method | What you must actually verify |
|---|---|---|
| closed and bounded, continuous on all of it | Closed Interval Method | evaluate at every critical number in and at and ; largest wins for max, smallest for min |
| continuous on an interval , one interior critical number | First Derivative Test for Absolute Extreme Values | on all of left of and on all of right of absolute min (reverse the signs for a max) |
| any interval | Global concavity | for every together with is the absolute min on |
| continuous on an interval , continuous on its interior, exactly one critical number and it is interior | Single-critical-point principle | a local extremum at that single interior critical number is automatically the global one |
| has one sign throughout | Monotonicity | the optimum sits at an endpoint; if that endpoint is excluded from , no optimum exists |
| open or unbounded | Behaviour at the ends | if is continuous on , at both ends of , and is the only critical number, then is the absolute minimum. Continuity is essential: a function with a jump can have at both ends, one critical number, and no minimum at all |
Extreme Value Theorem (EVT). If is continuous on a closed, bounded interval , then attains an absolute maximum and an absolute minimum on . All three hypotheses are needed; the theorem gives existence only, never location.
First Derivative Test for Absolute Extreme Values. Let be continuous on an interval and let be a critical number interior to . If for all in and for all in , then is the absolute maximum value of on ; with the signs reversed, is the absolute minimum. The words "for all" carry the whole content: testing one point on each side of establishes only a local extremum.
Global concavity test. If for every in an interval , then is increasing on ; so if for some , then to the left of and to the right, making the absolute minimum on . Contrast this with the ordinary Second Derivative Test, whose hypotheses are and at the single point (the condition is not optional — by itself says nothing about extrema), and whose conclusion is only that is a local minimum.
Single-critical-point principle. If is continuous on an interval , differentiable on its interior with continuous there, and — a point of the interior of — is the only critical number in , then a local maximum (minimum) at is the absolute maximum (minimum) on . Reason: is continuous and vanishes only at , so by the Intermediate Value Theorem keeps one constant sign on each side of ; the local behaviour at pins down which signs those are.
Minimising a distance: minimise its square
To find the point of a curve nearest a fixed point , minimise
rather than . This is legitimate because is strictly increasing on , so exactly when : the two functions have their minima at exactly the same . Take the square root only at the end, and only if the question asks for the distance itself.
Classic templates
| Problem | Objective | Constraint |
|---|---|---|
| Enclosure with a river on one side | ||
| Box from an sheet | domain | |
| Can of fixed volume, cheapest metal | ||
| Closest point of to | the point lies on the curve | |
| Rectangle inscribed in a semicircle of radius | , | |
| Refraction / lifeguard (least time) | the path crosses the interface at |
Worked Example 1 — box from a sheet (Closed Interval Method)
Squares of side cm are cut from the four corners of a sheet and the flaps folded up. Maximise the volume.
Objective and reduction. The base measures by and the height is , so
Domain. , , give . is a polynomial, hence continuous on , so EVT applies and the Closed Interval Method is legitimate.
Critical numbers.
The discriminant is , so
Only lies in . exists everywhere, so there are no other critical numbers.
Compare the three candidates.
Conclusion. Cut corner squares of side cm. The maximum volume is , from a base cm and height cm.
Worked Example 2 — cheapest can (open domain, global concavity)
A closed cylindrical can must hold . The curved side costs cents per ; the top and the bottom cost cents per . Find the cheapest dimensions.
Objective. cents.
Constraint. , so .
Reduce.
Domain is — open and unbounded, so the Closed Interval Method is not available.
Critical number.
forces , i.e. cm, and exists for all , so this is the only critical number.
Justification. for every , so is concave up on the whole domain; the unique stationary point is therefore the absolute minimum. (Equivalently, the numerator is negative before that and positive after, so decreases then increases.)
Answer. Since ,
so the cheapest can is exactly three radii tall: cm, cm. Its cost is , hence cents, about dollars. (In general, with side cost and top/bottom cost , the same computation gives ; equal costs return the familiar .)
Common mistakes
| Wrong | Right |
|---|---|
| Differentiating a two-variable expression such as directly. | Use the constraint first to eliminate a variable: , then differentiate. |
| ", so this is the maximum." | only makes a candidate. Justify with the Closed Interval Method, a full sign analysis of , or global concavity. |
| Using to claim a global minimum. | Together with , the condition gives only a local minimum (and with it gives no extremum at all). Upgrade it with on the whole interval, or with the single-critical-point principle. |
| Forgetting the endpoints in the Closed Interval Method. | For a wire cut into a square and a circle, the maximum area occurs at the endpoint "all wire to the circle"; the interior critical point is the minimum. |
| Writing the domain as "" out of habit. | Derived lengths must be non-negative too: for a sheet the domain is , not . |
| Grinding the chain rule through . | Optimise instead; is increasing, so the minimiser is identical. |
| Answering "" and stopping. | The question asked for a volume, a cost or a set of dimensions. Convert back and attach units. |
| Assuming an optimum must exist. | On an open domain it need not: rectangles of perimeter have areas filling — there is a maximum () but no minimum. |
| Rounding to and then computing from the rounded value. | Carry exact values (, ) through the algebra and round only in the final line. |
| Squaring an equation such as and keeping every root. | Squaring can create extraneous solutions; substitute back into the unsquared equation, and discard roots outside the domain. |
Key terms
- objective function
- constraint equation
- reduction to one variable
- feasible domain
- degenerate endpoint
- critical number
- absolute (global) maximum
- absolute (global) minimum
- Extreme Value Theorem
- Closed Interval Method
- First Derivative Test for Absolute Extreme Values
- global concavity argument
- single-critical-point principle
- monotonicity argument
- minimising the squared distance
- inscribed rectangle
- minimum-cost container
- Fermat's principle of least time
- Snell's law
- interpretation and units
Practice Problems
A farmer has m of fencing and wants to enclose a rectangular field bordering a straight river. No fence is needed along the river. Find the dimensions that maximise the enclosed area, state the maximum area, and justify that it really is the absolute maximum.
Show hint
Call each of the two sides perpendicular to the river , then use the fact that all m of fence is used up to express the remaining side in terms of .
Show answer
Objective. Let be the length (m) of each of the two sides perpendicular to the river and the length of the side parallel to it. The area is
Constraint. Only three sides are fenced, and all the fencing is used:
Reduce to one variable.
Domain. We need and , i.e. . So . is a polynomial, hence continuous on this closed bounded interval, so by the Extreme Value Theorem a maximum exists and the Closed Interval Method applies.
Critical numbers. , which exists for every , so the only critical number comes from
and lies in .
Compare the candidates.
Conclusion. The maximum area is , attained with the two sides perpendicular to the river equal to m and the side parallel to the river equal to m. The optimal field is twice as long (along the river) as it is deep.
Independent check. for every , so is concave down everywhere and its unique stationary point must be the absolute maximum — the same conclusion by a different route. Numerically, and , both less than .
A rectangular garden must have an area of exactly . Find the dimensions that minimise the total length of fencing around it. Explain why the Closed Interval Method is not available here, and give a valid justification instead.
Show hint
Let one side be ; the area constraint fixes the other side. Then think hard about which values of are actually allowed.
Show answer
Objective and constraint. Let the sides be and metres. The constraint is , so , and the perimeter is
Domain. A side must have positive length, and is undefined at , so . This interval is open and unbounded: the Extreme Value Theorem does not apply, and there are no endpoints to evaluate, so the Closed Interval Method cannot be used.
Critical numbers.
On , exists everywhere and vanishes only when (the root is not in the domain).
Justification — either argument is complete on its own.
Sign of . For we have and , so ; for both factors are positive, so . Thus is strictly decreasing on and strictly increasing on , and by the First Derivative Test for Absolute Extreme Values is the absolute minimum on .
Global concavity. for every , so is concave up on the entire interval and the unique stationary point is the absolute minimum.
Answer. m and m: the garden is a square of side m, and the minimum amount of fencing is
Check. , , — consistent with a minimum at . Note also that both as and as , so there is no maximum: an area- rectangle can have arbitrarily large perimeter.
An open-topped box is made from a square piece of cardboard cm on a side by cutting a square of side from each corner and folding up the four flaps. Find the value of that maximises the volume, and state that maximum volume.
Show hint
Write the base dimensions in terms of first, then work out exactly which values of produce an actual box — that is your domain.
Show answer
Objective. After the corners are removed the base is a square of side and the height is , so
Domain. We need and , so . is a polynomial, hence continuous on this closed bounded interval: the Extreme Value Theorem guarantees a maximum and the Closed Interval Method applies.
Critical numbers. By the product rule and the chain rule,
exists for all , and when or . The value is an endpoint of the domain, so the only interior critical number is .
Compare the candidates.
Conclusion. Cut squares of side cm; the maximum volume is , from a box measuring cm.
Check two ways. Expanding first gives and , matching the factored derivative above. Numerically, and , both below .
A box with an open top and a square base must have a volume of . Find the dimensions that use the least material, i.e. that minimise the total surface area, and justify that your answer is the global minimum.
Show hint
There are two unknowns — the side of the base and the height — and one constraint, the volume. Use the constraint to eliminate the height before differentiating.
Show answer
Set-up. Let be the side of the square base and the height (cm).
Constraint. , so .
Objective. The box has a base and four sides but no top:
Domain. (the expression is undefined at , and a base of side encloses nothing), so — open, so no Closed Interval Method.
Critical numbers.
exists for every , and exactly when , i.e. .
Justification. for every , so is concave up on the whole of ; therefore the unique stationary point gives the absolute minimum. (Equivalently: for , so there, and for , so there — decreases then increases.)
Answer.
so the box is at the base with height — note . The minimum surface area is
Check. Volume: ✓. Neighbouring values: and , both larger than ✓.
Find the point (or points) on the parabola that are closest to the point , and state the shortest distance.
Show hint
Minimise the square of the distance rather than the distance itself, and use the equation of the parabola to make it a function of alone.
Show answer
Objective. A general point of the parabola is , and its distance to is
Because is strictly increasing on , and attain their minimum at exactly the same -values, so minimise
Domain. All real — the whole parabola is available.
Critical numbers.
which exists everywhere and vanishes at and .
Sign analysis (write ):
| Interval | ||||
|---|---|---|---|---|
| decreasing | ||||
| increasing | ||||
| decreasing | ||||
| increasing |
So has local minima at and a local maximum at . Since decreases on and increases on — and is even, so — the value is the absolute minimum of on the whole real line. (Consistently, as .)
Value. With ,
Hence the minimum distance is .
Answer. There are two closest points, symmetric about the -axis:
Warning and check. The vertex is a critical number but a local maximum of restricted to a neighbourhood of ; its distance to is , far larger than . Numerically, and and , all above ✓.
A rectangle has its base on the diameter of a semicircle of radius and its two upper vertices on the semicircular arc. Find the dimensions of the rectangle of largest area, and state that maximum area.
Show hint
Set the semicircle up as with its diameter on the -axis, and exploit the symmetry of the picture to describe the rectangle with a single variable.
Show answer
Set-up. Take the semicircle to be the upper half of , i.e. for . By symmetry the optimal rectangle is symmetric about the -axis, with vertices and for some with . Its width is and its height is , so
is continuous on the closed bounded interval , so the Extreme Value Theorem applies and the Closed Interval Method will settle the question.
Critical numbers. For , by the product and chain rules,
requires , i.e. , so (the negative root is outside the domain). also fails to exist at , but that is an endpoint, which the Closed Interval Method tests anyway.
Compare the candidates.
Answer. The largest rectangle has width and height — it is exactly twice as wide as it is tall — and its area is square units.
Check. and , both less than ✓.
Worth remembering. For a semicircle of radius the same computation gives , height , width , and maximum area . With this returns ✓.
A Norman window has the shape of a rectangle surmounted by a semicircle whose diameter is the top edge of the rectangle. The perimeter of the whole window is m. Find the radius of the semicircle and the height of the rectangle that maximise the area (so that the window admits the most light), and state the maximum area.
Show hint
Let the radius be ; that forces the width of the rectangle. When you write the perimeter, remember that only a semicircular arc is on the boundary — not a whole circle, and not the top edge of the rectangle.
Show answer
Set-up. Let be the radius of the semicircle, so the rectangle has width , and let be the height of the rectangle (metres).
Constraint. The boundary consists of the bottom edge , the two vertical sides , and the semicircular arc of length (the top edge of the rectangle is interior, not part of the perimeter):
Objective.
Domain. We need and , i.e. , so
is a polynomial in , hence continuous on this closed bounded interval: the Closed Interval Method applies.
Critical numbers.
which exists everywhere and vanishes at
and indeed , so is interior to the domain.
Compare the candidates.
At the rectangle collapses () and the window is a bare semicircle:
At , using ,
The height. With ,
so .
Answer. m — the rectangle's height equals the radius, so the rectangle is twice as wide as it is tall — and the maximum area is
Justification, checked twice. The Closed Interval Method already decides it: . Independently, for every , so is concave down on the whole interval and its unique stationary point is the absolute maximum.
Sanity check of the perimeter. ✓.
A rectangular storage container with an open top must have a volume of . The length of its base is twice its width. Material for the base costs dollars per square metre and material for the four sides costs dollars per square metre. Find the dimensions and the cost of the cheapest such container.
Show hint
With width the length is ; use the volume constraint to eliminate the height, then assemble the cost as (base area) times its rate plus (total side area) times its rate.
Show answer
Set-up. Let be the width, so the length is , and let be the height (all in metres).
Constraint. , so
Objective. Base area , costing dollars. The four sides consist of two rectangles of area and two of area , a total area of , costing dollars. Hence
Domain — open, so the Closed Interval Method is unavailable.
Critical numbers.
This exists for all and vanishes when
Justification. for every , so is concave up on the whole domain and the unique stationary point is the absolute minimum. (Also as and as , so there is no maximum.)
Minimum cost. Using to avoid rounding,
so
Answer. Width m, length m, height m, and the minimum cost is about dollars.
Checks. Volume: ✓. Cost at nearby widths: and , both above ✓.
A rower is in a boat at a point km from the nearest point on a straight shoreline. She wants to reach a point on the shore, km from . She can row at km/h and walk at km/h. Where should she land in order to reach in the least time, and how long does the journey take? Justify carefully that this is the global minimum.
Show hint
Let be the distance from to her landing point and use Pythagoras for the rowing leg. Time equals distance divided by speed on each leg separately.
Show answer
Set-up. Let be the distance (km) from to the landing point, measured towards . Then
- rowing distance (Pythagoras, since the boat is km offshore at ),
- walking distance .
Objective.
(Landing before or beyond is never sensible; formally or only lengthens both legs.) The radicand is at least , so is continuous on the closed bounded interval : the Extreme Value Theorem guarantees a minimum and the Closed Interval Method applies.
Differentiate.
which exists for every in .
Solve .
Check for extraneous roots. Squaring can create false solutions, so substitute back into the unsquared equation: and ✓. The other root lies outside and is rejected.
Closed Interval Method.
Answer. She should land km from (hence km from , which she walks), and the minimum total time is hours.
Second, independent justification. Differentiating again,
so is concave up on and its unique stationary point is the absolute minimum. Numerically, and , both greater than ✓.
A piece of wire cm long is cut into two pieces. One piece is bent into a square and the other into a circle.
(a) How should the wire be cut so that the total enclosed area is a minimum? (b) How should it be cut so that the total enclosed area is a maximum?
Justify both answers, and say clearly where each optimum occurs.
Show hint
Let be the length of wire used for the square. Allow the degenerate cuts and so that you are working on a closed interval — and then be suspicious about which of (a), (b) the interior critical point answers.
Show answer
Set-up. Let be the length (cm) of the piece bent into the square, so goes to the circle, with (the endpoints mean "use all the wire for one shape").
- Square: side , area .
- Circle: circumference , so radius and area .
Objective.
is a polynomial in , hence continuous on the closed bounded interval : the Extreme Value Theorem guarantees both a maximum and a minimum, and the Closed Interval Method will find them.
Critical numbers.
Setting and multiplying through by :
Evaluate the three candidates.
For the interior point, write , so that . Then
(a) Minimum. The smallest of , and is the interior value: cut the wire so that
giving the minimum total area .
(b) Maximum. The largest of the three values is : do not cut the wire at all — bend the whole cm into a circle.
Why the interior point can only be the minimum.
so is concave up on . A concave-up function's stationary point is its minimum, and its maximum is therefore forced to an endpoint. A student who solved , found and reported it as "the optimum" would have part (b) completely wrong — this is exactly why the endpoints must be evaluated.
Checks. ✓ (matching ). Nearby, and , both larger ✓. And the circle really does beat the square: for a fixed length of wire the circle is the most area-efficient shape, .
Find the dimensions and the volume of the right circular cylinder of largest volume that can be inscribed in a sphere of radius . Express your answer in terms of , and state what fraction of the sphere's volume the optimal cylinder occupies.
Show hint
Cut the solid with a plane through the axis of the cylinder: you get a rectangle inscribed in a circle of radius , which gives you one Pythagorean relation. Taking the height as your single variable keeps the algebra cleanest.
Show answer
Set-up. Let the cylinder have radius and height ; by symmetry the optimal cylinder is centred in the sphere. A plane through the axis cuts the cylinder in a rectangle inscribed in a great circle of radius . Half the rectangle's diagonal is a radius of the sphere, so
Objective, reduced to one variable.
Domain. and , i.e. . So , a closed bounded interval on which the polynomial is continuous: the Extreme Value Theorem applies and the Closed Interval Method is valid.
Critical numbers.
(the negative root is outside the domain), and exists everywhere.
Compare the candidates.
Answer. The largest inscribed cylinder has
and volume
Fraction of the sphere. The sphere has volume , so
i.e. the best cylinder fills about of the sphere — a ratio independent of .
Second justification and numeric check. for , so is concave down on and the unique stationary point is the absolute maximum, consistent with the two endpoint values of . Taking : , while and — both smaller ✓.
Light travels from a point in one medium to a point in a second medium, crossing the flat interface between them. Its speed is in the first medium and in the second. Choose coordinates so that the interface is the -axis, with , and with and ; suppose the light crosses the interface at the point .
Using Fermat's principle (light follows the path of least time), prove Snell's law
where and are the angles the two straight segments make with the normal to the interface. Your solution must include a full justification that the time is genuinely minimised at such a crossing point, and that such a crossing point exists in .
Show hint
Write the total travel time as a function of using Pythagoras on each leg, then look carefully at the two terms of — each one is a sine divided by a speed.
Show answer
Objective. Within a single medium the speed is constant, so the least-time path there is a straight line; the whole path is therefore . By Pythagoras the two legs have lengths
Since time equals distance divided by speed on each leg,
The radicands are at least and , so is defined and differentiable for every real ; the domain is all of the real line, an interval.
Differentiate (chain rule on each square root, noting ):
Recognise the sines. The normal to the interface at the crossing point is vertical. The first segment has horizontal run and length , and is measured from the vertical, so the opposite side is the horizontal run:
Therefore
so the equation says precisely
It remains to show that a solution exists and that it minimises .
Existence of a critical point in . is continuous on , and
By the Intermediate Value Theorem applied to on , there is at least one with and .
Justification that is the absolute minimum. Differentiate once more. By the quotient rule,
The same computation with gives , and the extra factor cancels the minus sign in front of the second term. Hence
for every real , because .
So is strictly increasing on the whole real line. Consequently is its only zero, with for all and for all . Thus is strictly decreasing on and strictly increasing on , and by the First Derivative Test for Absolute Extreme Values is the absolute minimum of , attained at that single point.
Therefore the least-time path is the one crossing at , and it satisfies , which is Snell's law.
Remarks.
- If the law reduces to ; both angles lie in , where is one-to-one, so and the path is a straight line — light in a uniform medium travels straight, as it must.
- Writing for the refractive indices turns the result into the familiar .
- The same function models the lifeguard problem, where the two "media" are sand (fast) and water (slow); it explains why the optimal path bends towards the normal on entering the slower medium, and why — whenever — it never runs straight from to .
- Nothing in the argument needed and to be on opposite sides of the interface with the same kind of geometry: any least-time problem of the form has a strictly convex , hence exactly one minimiser, found by solving .
