Navigation

Concept Review

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

  1. Draw and label. Give every length, radius, angle, area and cost a symbol; record the units.
  2. Name the objective. Write the quantity QQ to be optimised as a formula. At this stage it may involve two or more variables.
  3. Write the constraint as an equation relating those variables (fixed perimeter, fixed volume, a point lying on a given curve, ...).
  4. Reduce to one variable. Solve the constraint for one variable, substitute, and obtain Q=f(x)Q=f(x).
  5. State the domain II: exactly those xx for which the configuration actually exists.
  6. Find the critical numbers of ff in II: where f(x)=0f'(x)=0 or where ff' fails to exist.
  7. Justify that your candidate is the absolute extremum on II, then answer the question that was asked — dimensions, cost, area, time — with units.

Getting the domain right

Every physical length must be 0\ge 0, and so must every length derived from xx. Collect the inequalities and intersect them. Cutting squares of side xx from the corners of a 30×1630\times16 sheet requires x0x\ge0, 302x030-2x\ge0 and 162x016-2x\ge0, giving 0x80\le x\le 8.

Include the degenerate endpoints whenever ff extends continuously to them. A box of height 00 is not a box, but admitting x=0x=0 and x=8x=8 costs nothing (those values give V=0V=0, 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 rr sitting in a denominator forces r>0r>0, so the domain is (0,)(0,\infty), EVT does not apply, and you must justify a different way.

The justification toolkit

SituationMethodWhat you must actually verify
I=[a,b]I=[a,b] closed and bounded, ff continuous on all of itClosed Interval Methodevaluate ff at every critical number in (a,b)(a,b) and at f(a)f(a) and f(b)f(b); largest wins for max, smallest for min
ff continuous on an interval II, one interior critical number ccFirst Derivative Test for Absolute Extreme Valuesf<0f'<0 on all of II left of cc and f>0f'>0 on all of II right of cc \Rightarrow absolute min (reverse the signs for a max)
II any intervalGlobal concavityf(x)>0f''(x)>0 for every xIx\in I together with f(c)=0f'(c)=0 \Rightarrow f(c)f(c) is the absolute min on II
ff continuous on an interval II, ff' continuous on its interior, exactly one critical number and it is interiorSingle-critical-point principlea local extremum at that single interior critical number is automatically the global one
ff' has one sign throughout IIMonotonicitythe optimum sits at an endpoint; if that endpoint is excluded from II, no optimum exists
II open or unboundedBehaviour at the endsif ff is continuous on II, f(x)+f(x)\to+\infty at both ends of II, and cc is the only critical number, then f(c)f(c) is the absolute minimum. Continuity is essential: a function with a jump can have f+f\to+\infty at both ends, one critical number, and no minimum at all

Extreme Value Theorem (EVT). If ff is continuous on a closed, bounded interval [a,b][a,b], then ff attains an absolute maximum and an absolute minimum on [a,b][a,b]. All three hypotheses are needed; the theorem gives existence only, never location.

First Derivative Test for Absolute Extreme Values. Let ff be continuous on an interval II and let cc be a critical number interior to II. If f(x)>0f'(x)>0 for all x<cx<c in II and f(x)<0f'(x)<0 for all x>cx>c in II, then f(c)f(c) is the absolute maximum value of ff on II; with the signs reversed, f(c)f(c) is the absolute minimum. The words "for all" carry the whole content: testing one point on each side of cc establishes only a local extremum.

Global concavity test. If f(x)>0f''(x)>0 for every xx in an interval II, then ff' is increasing on II; so if f(c)=0f'(c)=0 for some cIc\in I, then f<0f'<0 to the left of cc and f>0f'>0 to the right, making f(c)f(c) the absolute minimum on II. Contrast this with the ordinary Second Derivative Test, whose hypotheses are f(c)=0f'(c)=0 and f(c)>0f''(c)>0 at the single point cc (the condition f(c)=0f'(c)=0 is not optional — f(c)>0f''(c)>0 by itself says nothing about extrema), and whose conclusion is only that f(c)f(c) is a local minimum.

Single-critical-point principle. If ff is continuous on an interval II, differentiable on its interior with ff' continuous there, and cc — a point of the interior of II — is the only critical number in II, then a local maximum (minimum) at cc is the absolute maximum (minimum) on II. Reason: ff' is continuous and vanishes only at cc, so by the Intermediate Value Theorem ff' keeps one constant sign on each side of cc; the local behaviour at cc pins down which signs those are.

Minimising a distance: minimise its square

To find the point of a curve y=y(x)y=y(x) nearest a fixed point (p,q)(p,q), minimise

g(x)=(xp)2+(y(x)q)2g(x)=\left(x-p\right)^{2}+\left(y(x)-q\right)^{2}

rather than d(x)=g(x)d(x)=\sqrt{g(x)}. This is legitimate because ttt\mapsto\sqrt{t} is strictly increasing on [0,)[0,\infty), so g(x1)<g(x2)g(x_{1})<g(x_{2}) exactly when d(x1)<d(x2)d(x_{1})<d(x_{2}): the two functions have their minima at exactly the same xx. Take the square root only at the end, and only if the question asks for the distance itself.

Classic templates

ProblemObjectiveConstraint
Enclosure with a river on one sideA=xyA=xy2x+y=L2x+y=L
Box from an a×ba\times b sheetV=x(a2x)(b2x)V=x(a-2x)(b-2x)domain 0x12min(a,b)0\le x\le \tfrac12\min(a,b)
Can of fixed volume, cheapest metalC=cs(2πrh)+ct(2πr2)C=c_{s}\left(2\pi rh\right)+c_{t}\left(2\pi r^{2}\right)πr2h=V\pi r^{2}h=V
Closest point of y=f(x)y=f(x) to (p,q)(p,q)g=(xp)2+(f(x)q)2g=(x-p)^{2}+\left(f(x)-q\right)^{2}the point lies on the curve
Rectangle inscribed in a semicircle of radius RRA=2xR2x2A=2x\sqrt{R^{2}-x^{2}}x2+y2=R2x^{2}+y^{2}=R^{2}, 0xR0\le x\le R
Refraction / lifeguard (least time)T=a2+x2v1+b2+(dx)2v2T=\dfrac{\sqrt{a^{2}+x^{2}}}{v_{1}}+\dfrac{\sqrt{b^{2}+(d-x)^{2}}}{v_{2}}the path crosses the interface at (x,0)(x,0)

Worked Example 1 — box from a sheet (Closed Interval Method)

Squares of side xx cm are cut from the four corners of a 30 cm×16 cm30\text{ cm}\times16\text{ cm} sheet and the flaps folded up. Maximise the volume.

Objective and reduction. The base measures (302x)(30-2x) by (162x)(16-2x) and the height is xx, so

V(x)=x(302x)(162x)=x(48060x32x+4x2)=4x392x2+480x.\begin{aligned} V(x) &= x(30-2x)(16-2x) \\ &= x\left(480-60x-32x+4x^{2}\right) \\ &= 4x^{3}-92x^{2}+480x . \end{aligned}

Domain. x0x\ge0, 302x030-2x\ge0, 162x016-2x\ge0 give 0x80\le x\le 8. VV is a polynomial, hence continuous on [0,8][0,8], so EVT applies and the Closed Interval Method is legitimate.

Critical numbers.

V(x)=12x2184x+480=4(3x246x+120).\begin{aligned} V'(x) &= 12x^{2}-184x+480 \\ &= 4\left(3x^{2}-46x+120\right). \end{aligned}

The discriminant is 4624(3)(120)=21161440=676=26246^{2}-4(3)(120)=2116-1440=676=26^{2}, so

x=46±266=12or103.x=\frac{46\pm26}{6}=12 \quad\text{or}\quad \frac{10}{3}.

Only x=103x=\tfrac{10}{3} lies in (0,8)(0,8). VV' exists everywhere, so there are no other critical numbers.

Compare the three candidates.

V(0)=0V(103)=103703283=1960027725.93V(8)=8140=0.\begin{aligned} V(0) &= 0 \\ V\left(\tfrac{10}{3}\right) &= \tfrac{10}{3}\cdot\tfrac{70}{3}\cdot\tfrac{28}{3}=\frac{19600}{27}\approx 725.93 \\ V(8) &= 8\cdot 14\cdot 0 = 0 . \end{aligned}

Conclusion. Cut corner squares of side 1033.33\dfrac{10}{3}\approx3.33 cm. The maximum volume is 1960027725.9 cm3\dfrac{19600}{27}\approx725.9\ \text{cm}^{3}, from a base 703×283\tfrac{70}{3}\times\tfrac{28}{3} cm and height 103\tfrac{10}{3} cm.

Worked Example 2 — cheapest can (open domain, global concavity)

A closed cylindrical can must hold 1000 cm31000\ \text{cm}^{3}. The curved side costs 22 cents per cm2\text{cm}^{2}; the top and the bottom cost 33 cents per cm2\text{cm}^{2}. Find the cheapest dimensions.

Objective. C=2(2πrh)+3(2πr2)=4πrh+6πr2C = 2\left(2\pi rh\right)+3\left(2\pi r^{2}\right)=4\pi rh+6\pi r^{2} cents.

Constraint. πr2h=1000\pi r^{2}h=1000, so h=1000πr2h=\dfrac{1000}{\pi r^{2}}.

Reduce.

C(r)=4πr1000πr2+6πr2=4000r+6πr2,r>0.C(r)=4\pi r\cdot\frac{1000}{\pi r^{2}}+6\pi r^{2}=\frac{4000}{r}+6\pi r^{2},\qquad r>0 .

Domain is (0,)(0,\infty) — open and unbounded, so the Closed Interval Method is not available.

Critical number.

C(r)=4000r2+12πr=12πr34000r2.C'(r)=-\frac{4000}{r^{2}}+12\pi r=\frac{12\pi r^{3}-4000}{r^{2}} .

C(r)=0C'(r)=0 forces r3=10003πr^{3}=\dfrac{1000}{3\pi}, i.e. r=(10003π)1/34.734r=\left(\dfrac{1000}{3\pi}\right)^{1/3}\approx 4.734 cm, and CC' exists for all r>0r>0, so this is the only critical number.

Justification. C(r)=8000r3+12π>0C''(r)=\dfrac{8000}{r^{3}}+12\pi>0 for every r>0r>0, so CC is concave up on the whole domain; the unique stationary point is therefore the absolute minimum. (Equivalently, the numerator 12πr3400012\pi r^{3}-4000 is negative before that rr and positive after, so CC decreases then increases.)

Answer. Since πr3=10003\pi r^{3}=\dfrac{1000}{3},

h=1000πr2=1000rπr3=1000r1000/3=3r,h=\frac{1000}{\pi r^{2}}=\frac{1000r}{\pi r^{3}}=\frac{1000r}{1000/3}=3r ,

so the cheapest can is exactly three radii tall: r4.73r\approx4.73 cm, h14.20h\approx14.20 cm. Its cost is 6πr2=6πr3r=2000r6\pi r^{2}=\dfrac{6\pi r^{3}}{r}=\dfrac{2000}{r}, hence C=4000r+2000r=6000r1267C=\dfrac{4000}{r}+\dfrac{2000}{r}=\dfrac{6000}{r}\approx1267 cents, about 12.6712.67 dollars. (In general, with side cost csc_{s} and top/bottom cost ctc_{t}, the same computation gives h=2ctcsrh=\dfrac{2c_{t}}{c_{s}}\,r; equal costs return the familiar h=2rh=2r.)

Common mistakes

WrongRight
Differentiating a two-variable expression such as A=xyA=xy directly.Use the constraint first to eliminate a variable: A(x)=x(4002x)A(x)=x(400-2x), then differentiate.
"f(c)=0f'(c)=0, so this is the maximum."f(c)=0f'(c)=0 only makes cc a candidate. Justify with the Closed Interval Method, a full sign analysis of ff', or global concavity.
Using f(c)>0f''(c)>0 to claim a global minimum.Together with f(c)=0f'(c)=0, the condition f(c)>0f''(c)>0 gives only a local minimum (and with f(c)0f'(c)\ne0 it gives no extremum at all). Upgrade it with f>0f''>0 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 "x>0x>0" out of habit.Derived lengths must be non-negative too: for a 30×1630\times16 sheet the domain is [0,8][0,8], not (0,)(0,\infty).
Grinding the chain rule through d=(xp)2+(f(x)q)2d=\sqrt{(x-p)^{2}+(f(x)-q)^{2}}.Optimise d2d^{2} instead; x\sqrt{\phantom{x}} is increasing, so the minimiser is identical.
Answering "x=103x=\tfrac{10}{3}" 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 2020 have areas filling (0,25](0,25] — there is a maximum (2525) but no minimum.
Rounding rr to 4.74.7 and then computing hh from the rounded value.Carry exact values (r3=1000/(3π)r^{3}=1000/(3\pi), h=3rh=3r) through the algebra and round only in the final line.
Squaring an equation such as 5x=336+x25x=3\sqrt{36+x^{2}} 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 400400 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 xx, then use the fact that all 400400 m of fence is used up to express the remaining side in terms of xx.

Show answer

Objective. Let xx be the length (m) of each of the two sides perpendicular to the river and yy the length of the side parallel to it. The area is

A=xy.A = xy .

Constraint. Only three sides are fenced, and all the fencing is used:

2x+y=400y=4002x.2x + y = 400 \quad\Longrightarrow\quad y = 400-2x .

Reduce to one variable.

A(x)=x(4002x)=400x2x2.A(x) = x(400-2x) = 400x - 2x^{2}.

Domain. We need x0x\ge0 and y=4002x0y=400-2x\ge0, i.e. x200x\le200. So I=[0,200]I=[0,200]. AA 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. A(x)=4004xA'(x)=400-4x, which exists for every xx, so the only critical number comes from

4004x=0x=100,400-4x=0 \quad\Longrightarrow\quad x=100 ,

and 100100 lies in (0,200)(0,200).

Compare the candidates.

A(0)=0400=0A(100)=100200=20000A(200)=2000=0.\begin{aligned} A(0) &= 0\cdot400 = 0 \\ A(100) &= 100\cdot 200 = 20000 \\ A(200) &= 200\cdot 0 = 0 . \end{aligned}

Conclusion. The maximum area is 20000 m2\mathbf{20000\ \text{m}^{2}}, attained with the two sides perpendicular to the river equal to x=100x=100 m and the side parallel to the river equal to y=400200=200y=400-200=200 m. The optimal field is twice as long (along the river) as it is deep.

Independent check. A(x)=4<0A''(x)=-4<0 for every xx, so AA is concave down everywhere and its unique stationary point must be the absolute maximum — the same conclusion by a different route. Numerically, A(99)=99(202)=19998A(99)=99(202)=19998 and A(101)=101(198)=19998A(101)=101(198)=19998, both less than 2000020000.

A rectangular garden must have an area of exactly 64 m264\ \text{m}^{2}. 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 xx; the area constraint fixes the other side. Then think hard about which values of xx are actually allowed.

Show answer

Objective and constraint. Let the sides be xx and yy metres. The constraint is xy=64xy=64, so y=64xy=\dfrac{64}{x}, and the perimeter is

P=2x+2y=2x+128x.P = 2x+2y = 2x + \frac{128}{x}.

Domain. A side must have positive length, and 64/x64/x is undefined at x=0x=0, so I=(0,)I=(0,\infty). 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.

P(x)=2128x2=2x2128x2=2(x8)(x+8)x2.P'(x) = 2-\frac{128}{x^{2}} = \frac{2x^{2}-128}{x^{2}} = \frac{2(x-8)(x+8)}{x^{2}} .

On (0,)(0,\infty), PP' exists everywhere and vanishes only when x=8x=8 (the root x=8x=-8 is not in the domain).

Justification — either argument is complete on its own.

Sign of PP'. For 0<x<80<x<8 we have x8<0x-8<0 and x+8>0x+8>0, so P(x)<0P'(x)<0; for x>8x>8 both factors are positive, so P(x)>0P'(x)>0. Thus PP is strictly decreasing on (0,8](0,8] and strictly increasing on [8,)[8,\infty), and by the First Derivative Test for Absolute Extreme Values P(8)P(8) is the absolute minimum on (0,)(0,\infty).

Global concavity. P(x)=256x3>0P''(x)=\dfrac{256}{x^{3}}>0 for every x>0x>0, so PP is concave up on the entire interval and the unique stationary point is the absolute minimum.

Answer. x=8x=8 m and y=648=8y=\dfrac{64}{8}=8 m: the garden is a square of side 88 m, and the minimum amount of fencing is

P(8)=2(8)+1288=16+16=32 m.P(8)=2(8)+\frac{128}{8}=16+16=\mathbf{32\ \text{m}} .

Check. P(4)=8+32=40P(4)=8+32=40, P(8)=32P(8)=32, P(16)=32+8=40P(16)=32+8=40 — consistent with a minimum at x=8x=8. Note also that P(x)P(x)\to\infty both as x0+x\to0^{+} and as xx\to\infty, so there is no maximum: an area-6464 rectangle can have arbitrarily large perimeter.

An open-topped box is made from a square piece of cardboard 1212 cm on a side by cutting a square of side xx from each corner and folding up the four flaps. Find the value of xx that maximises the volume, and state that maximum volume.

Show hint

Write the base dimensions in terms of xx first, then work out exactly which values of xx produce an actual box — that is your domain.

Show answer

Objective. After the corners are removed the base is a square of side 122x12-2x and the height is xx, so

V(x)=x(122x)2.V(x) = x(12-2x)^{2}.

Domain. We need x0x\ge0 and 122x012-2x\ge0, so I=[0,6]I=[0,6]. VV 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,

V(x)=(122x)2+x2(122x)(2)=(122x)[(122x)4x]=(122x)(126x).\begin{aligned} V'(x) &= (12-2x)^{2} + x\cdot 2(12-2x)(-2) \\ &= (12-2x)\left[(12-2x)-4x\right] \\ &= (12-2x)(12-6x). \end{aligned}

VV' exists for all xx, and V(x)=0V'(x)=0 when x=6x=6 or x=2x=2. The value x=6x=6 is an endpoint of the domain, so the only interior critical number is x=2x=2.

Compare the candidates.

V(0)=0V(2)=2(124)2=282=264=128V(6)=6(1212)2=0.\begin{aligned} V(0) &= 0 \\ V(2) &= 2(12-4)^{2}=2\cdot 8^{2}=2\cdot 64 = 128 \\ V(6) &= 6(12-12)^{2}=0 . \end{aligned}

Conclusion. Cut squares of side x=2\mathbf{x=2} cm; the maximum volume is 128 cm3\mathbf{128\ \text{cm}^{3}}, from a box measuring 8×8×28\times8\times2 cm.

Check two ways. Expanding first gives V(x)=4x348x2+144xV(x)=4x^{3}-48x^{2}+144x and V(x)=12x296x+144=12(x2)(x6)V'(x)=12x^{2}-96x+144=12(x-2)(x-6), matching the factored derivative above. Numerically, V(1.9)=1.9(8.2)2=127.76V(1.9)=1.9(8.2)^{2}=127.76 and V(2.1)=2.1(7.8)2=127.76V(2.1)=2.1(7.8)^{2}=127.76, both below 128128.

A box with an open top and a square base must have a volume of 32,000 cm332{,}000\ \text{cm}^{3}. 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 xx be the side of the square base and hh the height (cm).

Constraint. x2h=32000x^{2}h = 32000, so h=32000x2h=\dfrac{32000}{x^{2}}.

Objective. The box has a base and four sides but no top:

S=x2+4xh=x2+4x32000x2=x2+128000x.S = x^{2}+4xh = x^{2}+4x\cdot\frac{32000}{x^{2}} = x^{2}+\frac{128000}{x} .

Domain. x>0x>0 (the expression 128000/x128000/x is undefined at x=0x=0, and a base of side 00 encloses nothing), so I=(0,)I=(0,\infty) — open, so no Closed Interval Method.

Critical numbers.

S(x)=2x128000x2=2x3128000x2=2(x364000)x2.S'(x) = 2x-\frac{128000}{x^{2}} = \frac{2x^{3}-128000}{x^{2}} = \frac{2\left(x^{3}-64000\right)}{x^{2}} .

SS' exists for every x>0x>0, and S(x)=0S'(x)=0 exactly when x3=64000x^{3}=64000, i.e. x=40x=40.

Justification. S(x)=2+256000x3>0S''(x)=2+\dfrac{256000}{x^{3}}>0 for every x>0x>0, so SS is concave up on the whole of (0,)(0,\infty); therefore the unique stationary point gives the absolute minimum. (Equivalently: x364000<0x^{3}-64000<0 for 0<x<400<x<40, so S<0S'<0 there, and x364000>0x^{3}-64000>0 for x>40x>40, so S>0S'>0 there — SS decreases then increases.)

Answer.

h=32000402=320001600=20,h = \frac{32000}{40^{2}} = \frac{32000}{1600} = 20 ,

so the box is 40 cm×40 cm\mathbf{40\ \text{cm}\times40\ \text{cm}} at the base with height 20 cm\mathbf{20\ \text{cm}} — note h=12xh=\tfrac12 x. The minimum surface area is

S(40)=402+12800040=1600+3200=4800 cm2.S(40)=40^{2}+\frac{128000}{40}=1600+3200=\mathbf{4800\ \text{cm}^{2}} .

Check. Volume: 40220=3200040^{2}\cdot20 = 32000 ✓. Neighbouring values: S(39)=1521+128000391521+3282.05=4803.05S(39)=1521+\dfrac{128000}{39}\approx1521+3282.05=4803.05 and S(41)=1681+128000411681+3121.95=4802.95S(41)=1681+\dfrac{128000}{41}\approx1681+3121.95=4802.95, both larger than 48004800 ✓.

Find the point (or points) on the parabola y=x2y=x^{2} that are closest to the point (0,3)(0,3), 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 xx alone.

Show answer

Objective. A general point of the parabola is (x,x2)\left(x,x^{2}\right), and its distance to (0,3)(0,3) is

d(x)=(x0)2+(x23)2.d(x)=\sqrt{(x-0)^{2}+\left(x^{2}-3\right)^{2}} .

Because ttt\mapsto\sqrt{t} is strictly increasing on [0,)[0,\infty), dd and g=d2g=d^{2} attain their minimum at exactly the same xx-values, so minimise

g(x)=x2+(x23)2=x2+x46x2+9=x45x2+9.\begin{aligned} g(x) &= x^{2}+\left(x^{2}-3\right)^{2} \\ &= x^{2}+x^{4}-6x^{2}+9 \\ &= x^{4}-5x^{2}+9 . \end{aligned}

Domain. All real xx — the whole parabola is available.

Critical numbers.

g(x)=4x310x=2x(2x25),g'(x)=4x^{3}-10x = 2x\left(2x^{2}-5\right) ,

which exists everywhere and vanishes at x=0x=0 and x=±52=±102±1.5811x=\pm\sqrt{\tfrac52}=\pm\dfrac{\sqrt{10}}{2}\approx\pm1.5811.

Sign analysis (write x0=102x_{0}=\tfrac{\sqrt{10}}{2}):

Interval2x2x2x252x^{2}-5g(x)g'(x)gg
x<x0x<-x_{0}-++-decreasing
x0<x<0-x_{0}<x<0--++increasing
0<x<x00<x<x_{0}++--decreasing
x>x0x>x_{0}++++++increasing

So gg has local minima at x=±x0x=\pm x_{0} and a local maximum at x=0x=0. Since gg decreases on (,x0](-\infty,-x_{0}] and increases on [x0,)[x_{0},\infty) — and gg is even, so g(x0)=g(x0)g(-x_{0})=g(x_{0}) — the value g(±x0)g(\pm x_{0}) is the absolute minimum of gg on the whole real line. (Consistently, g(x)=x45x2+9+g(x)=x^{4}-5x^{2}+9\to+\infty as x±x\to\pm\infty.)

Value. With x02=52x_{0}^{2}=\tfrac52,

g(±x0)=(52)25(52)+9=254252+9=2550+364=114.g(\pm x_{0}) = \left(\frac52\right)^{2}-5\left(\frac52\right)+9 = \frac{25}{4}-\frac{25}{2}+9 = \frac{25-50+36}{4} = \frac{11}{4}.

Hence the minimum distance is d=114=1121.658d=\sqrt{\dfrac{11}{4}}=\dfrac{\sqrt{11}}{2}\approx1.658.

Answer. There are two closest points, symmetric about the yy-axis:

(102, 52)and(102, 52),shortest distance 1121.66.\left(\frac{\sqrt{10}}{2},\ \frac{5}{2}\right)\quad\text{and}\quad\left(-\frac{\sqrt{10}}{2},\ \frac{5}{2}\right),\qquad \text{shortest distance } \frac{\sqrt{11}}{2}\approx1.66 .

Warning and check. The vertex (0,0)(0,0) is a critical number but a local maximum of gg restricted to a neighbourhood of 00; its distance to (0,3)(0,3) is 33, far larger than 1.6581.658. Numerically, g(1.5)=5.062511.25+9=2.8125g(1.5)=5.0625-11.25+9=2.8125 and g(1.6)=6.553612.8+9=2.7536g(1.6)=6.5536-12.8+9=2.7536 and g(1.7)=8.352114.45+9=2.9021g(1.7)=8.3521-14.45+9=2.9021, all above g(x0)=2.75g(x_{0})=2.75 ✓.

A rectangle has its base on the diameter of a semicircle of radius 22 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 y=4x2y=\sqrt{4-x^{2}} with its diameter on the xx-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 x2+y2=4x^{2}+y^{2}=4, i.e. y=4x2y=\sqrt{4-x^{2}} for 2x2-2\le x\le 2. By symmetry the optimal rectangle is symmetric about the yy-axis, with vertices (±x,0)(\pm x,0) and (±x,4x2)\left(\pm x,\sqrt{4-x^{2}}\right) for some xx with 0x20\le x\le2. Its width is 2x2x and its height is 4x2\sqrt{4-x^{2}}, so

A(x)=2x4x2,0x2.A(x)=2x\sqrt{4-x^{2}},\qquad 0\le x\le 2 .

AA is continuous on the closed bounded interval [0,2][0,2], so the Extreme Value Theorem applies and the Closed Interval Method will settle the question.

Critical numbers. For 0<x<20<x<2, by the product and chain rules,

A(x)=24x2+2x2x24x2=24x22x24x2=2(4x2)2x24x2=84x24x2.\begin{aligned} A'(x) &= 2\sqrt{4-x^{2}} + 2x\cdot\frac{-2x}{2\sqrt{4-x^{2}}} \\ &= 2\sqrt{4-x^{2}} - \frac{2x^{2}}{\sqrt{4-x^{2}}} \\ &= \frac{2\left(4-x^{2}\right)-2x^{2}}{\sqrt{4-x^{2}}} \\ &= \frac{8-4x^{2}}{\sqrt{4-x^{2}}} . \end{aligned}

A(x)=0A'(x)=0 requires 84x2=08-4x^{2}=0, i.e. x2=2x^{2}=2, so x=2x=\sqrt2 (the negative root is outside the domain). AA' also fails to exist at x=2x=2, but that is an endpoint, which the Closed Interval Method tests anyway.

Compare the candidates.

A(0)=0A(2)=2242=222=4A(2)=444=0.\begin{aligned} A(0) &= 0 \\ A\left(\sqrt2\right) &= 2\sqrt2\cdot\sqrt{4-2}=2\sqrt2\cdot\sqrt2 = 4 \\ A(2) &= 4\sqrt{4-4}=0 . \end{aligned}

Answer. The largest rectangle has width 222.832\sqrt2\approx2.83 and height 42=21.41\sqrt{4-2}=\sqrt2\approx1.41 — it is exactly twice as wide as it is tall — and its area is 4\mathbf{4} square units.

Check. A(1.3)=2.62.312.6(1.5199)=3.952A(1.3)=2.6\sqrt{2.31}\approx2.6(1.5199)=3.952 and A(1.5)=31.753(1.3229)=3.969A(1.5)=3\sqrt{1.75}\approx3(1.3229)=3.969, both less than 44 ✓.

Worth remembering. For a semicircle of radius RR the same computation gives x=R2x=\dfrac{R}{\sqrt2}, height R2\dfrac{R}{\sqrt2}, width R2R\sqrt2, and maximum area R2R^{2}. With R=2R=2 this returns 44 ✓.

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 1010 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 rr; 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 rr be the radius of the semicircle, so the rectangle has width 2r2r, and let hh be the height of the rectangle (metres).

Constraint. The boundary consists of the bottom edge 2r2r, the two vertical sides 2h2h, and the semicircular arc of length πr\pi r (the top edge of the rectangle is interior, not part of the perimeter):

2r+2h+πr=10h=10(2+π)r2.2r+2h+\pi r = 10 \quad\Longrightarrow\quad h=\frac{10-(2+\pi)r}{2}.

Objective.

A=2rhrectangle+πr22semicircle=2r10(2+π)r2+πr22=10r2r2πr2+πr22=10r2r2πr22.\begin{aligned} A &= \underbrace{2rh}_{\text{rectangle}}+\underbrace{\frac{\pi r^{2}}{2}}_{\text{semicircle}} \\ &= 2r\cdot\frac{10-(2+\pi)r}{2}+\frac{\pi r^{2}}{2} \\ &= 10r-2r^{2}-\pi r^{2}+\frac{\pi r^{2}}{2} \\ &= 10r-2r^{2}-\frac{\pi r^{2}}{2}. \end{aligned}

Domain. We need r0r\ge0 and h0h\ge0, i.e. (2+π)r10(2+\pi)r\le10, so

0r102+π1.9449.0\le r\le \frac{10}{2+\pi}\approx1.9449 .

AA is a polynomial in rr, hence continuous on this closed bounded interval: the Closed Interval Method applies.

Critical numbers.

A(r)=104rπr=10(4+π)r,A'(r) = 10-4r-\pi r = 10-(4+\pi)r ,

which exists everywhere and vanishes at

r=104+π1.4002,r^{*}=\frac{10}{4+\pi}\approx1.4002 ,

and indeed 104+π<102+π\dfrac{10}{4+\pi}<\dfrac{10}{2+\pi}, so rr^{*} is interior to the domain.

Compare the candidates.

A(0)=0.A(0)=0 .

At r=102+πr=\dfrac{10}{2+\pi} the rectangle collapses (h=0h=0) and the window is a bare semicircle:

A(102+π)=π2(102+π)2=50π(2+π)2157.0826.4365.941.A\left(\frac{10}{2+\pi}\right)=\frac{\pi}{2}\left(\frac{10}{2+\pi}\right)^{2}=\frac{50\pi}{(2+\pi)^{2}}\approx\frac{157.08}{26.436}\approx5.941 .

At r=rr=r^{*}, using A(r)=10r4+π2r2A(r)=10r-\dfrac{4+\pi}{2}r^{2},

A(r)=1004+π4+π2100(4+π)2=1004+π504+π=504+π7.0012.\begin{aligned} A\left(r^{*}\right) &= \frac{100}{4+\pi}-\frac{4+\pi}{2}\cdot\frac{100}{(4+\pi)^{2}} \\ &= \frac{100}{4+\pi}-\frac{50}{4+\pi} \\ &= \frac{50}{4+\pi}\approx 7.0012 . \end{aligned}

The height. With r=rr=r^{*},

10(2+π)r=10(4+π)10(2+π)4+π=204+π,10-(2+\pi)r^{*}=\frac{10(4+\pi)-10(2+\pi)}{4+\pi}=\frac{20}{4+\pi},

so h=104+π=rh=\dfrac{10}{4+\pi}=r^{*}.

Answer. r=h=104+π1.40r=h=\dfrac{10}{4+\pi}\approx1.40 m — the rectangle's height equals the radius, so the rectangle is twice as wide as it is tall — and the maximum area is

Amax=504+π7.00 m2.A_{\max}=\frac{50}{4+\pi}\approx 7.00\ \text{m}^{2}.

Justification, checked twice. The Closed Interval Method already decides it: 7.0012>5.941>07.0012>5.941>0. Independently, A(r)=(4+π)<0A''(r)=-(4+\pi)<0 for every rr, so AA is concave down on the whole interval and its unique stationary point is the absolute maximum.

Sanity check of the perimeter. 2r+2h+πr=4r+πr=(4+π)r=(4+π)104+π=102r+2h+\pi r = 4r+\pi r = (4+\pi)r^{*} = (4+\pi)\cdot\dfrac{10}{4+\pi}=10 ✓.

A rectangular storage container with an open top must have a volume of 10 m310\ \text{m}^{3}. The length of its base is twice its width. Material for the base costs 1010 dollars per square metre and material for the four sides costs 66 dollars per square metre. Find the dimensions and the cost of the cheapest such container.

Show hint

With width ww the length is 2w2w; 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 ww be the width, so the length is 2w2w, and let hh be the height (all in metres).

Constraint. V=(2w)(w)h=2w2h=10V=(2w)(w)h=2w^{2}h=10, so

h=5w2.h=\frac{5}{w^{2}} .

Objective. Base area =2w2=2w^{2}, costing 10(2w2)=20w210\left(2w^{2}\right)=20w^{2} dollars. The four sides consist of two rectangles of area whwh and two of area 2wh2wh, a total area of 2wh+4wh=6wh2wh+4wh=6wh, costing 6(6wh)=36wh6(6wh)=36wh dollars. Hence

C=20w2+36wh=20w2+36w5w2=20w2+180w,w>0.C = 20w^{2}+36wh = 20w^{2}+36w\cdot\frac{5}{w^{2}} = 20w^{2}+\frac{180}{w},\qquad w>0 .

Domain (0,)(0,\infty) — open, so the Closed Interval Method is unavailable.

Critical numbers.

C(w)=40w180w2=40w3180w2.C'(w) = 40w-\frac{180}{w^{2}} = \frac{40w^{3}-180}{w^{2}} .

This exists for all w>0w>0 and vanishes when

40w3=180w3=92w=(92)1/31.6510.40w^{3}=180 \quad\Longrightarrow\quad w^{3}=\frac{9}{2} \quad\Longrightarrow\quad w=\left(\frac92\right)^{1/3}\approx1.6510 .

Justification. C(w)=40+360w3>0C''(w)=40+\dfrac{360}{w^{3}}>0 for every w>0w>0, so CC is concave up on the whole domain and the unique stationary point is the absolute minimum. (Also C(w)C(w)\to\infty as w0+w\to0^{+} and as ww\to\infty, so there is no maximum.)

Minimum cost. Using w3=92w^{3}=\tfrac92 to avoid rounding,

180w=180w2w3=180w29/2=40w2,\frac{180}{w} = \frac{180w^{2}}{w^{3}} = \frac{180w^{2}}{9/2} = 40w^{2},

so

Cmin=20w2+40w2=60w2=60(92)2/360(2.72568)163.54.C_{\min}=20w^{2}+40w^{2}=60w^{2}=60\left(\frac92\right)^{2/3}\approx 60(2.72568)\approx 163.54 .

Answer. Width w=(92)1/31.651w=\left(\tfrac92\right)^{1/3}\approx1.651 m, length 2w3.3022w\approx3.302 m, height h=5w252.72571.834h=\dfrac{5}{w^{2}}\approx\dfrac{5}{2.7257}\approx1.834 m, and the minimum cost is about 163.54\mathbf{163.54} dollars.

Checks. Volume: 2w2h2(2.7257)(1.8344)10.00 m32w^{2}h\approx2(2.7257)(1.8344)\approx10.00\ \text{m}^{3} ✓. Cost at nearby widths: C(1.6)=20(2.56)+1801.6=51.2+112.5=163.70C(1.6)=20(2.56)+\dfrac{180}{1.6}=51.2+112.5=163.70 and C(1.7)=20(2.89)+1801.757.8+105.88=163.68C(1.7)=20(2.89)+\dfrac{180}{1.7}\approx57.8+105.88=163.68, both above 163.54163.54 ✓.

A rower is in a boat at a point 66 km from the nearest point AA on a straight shoreline. She wants to reach a point BB on the shore, 2020 km from AA. She can row at 33 km/h and walk at 55 km/h. Where should she land in order to reach BB in the least time, and how long does the journey take? Justify carefully that this is the global minimum.

Show hint

Let xx be the distance from AA 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 xx be the distance (km) from AA to the landing point, measured towards BB. Then

  • rowing distance =62+x2=36+x2=\sqrt{6^{2}+x^{2}}=\sqrt{36+x^{2}} (Pythagoras, since the boat is 66 km offshore at AA),
  • walking distance =20x=20-x.

Objective.

T(x)=36+x23+20x5,0x20.T(x)=\frac{\sqrt{36+x^{2}}}{3}+\frac{20-x}{5},\qquad 0\le x\le 20 .

(Landing before AA or beyond BB is never sensible; formally x<0x<0 or x>20x>20 only lengthens both legs.) The radicand is at least 36>036>0, so TT is continuous on the closed bounded interval [0,20][0,20]: the Extreme Value Theorem guarantees a minimum and the Closed Interval Method applies.

Differentiate.

T(x)=132x236+x215=x336+x215,T'(x)=\frac{1}{3}\cdot\frac{2x}{2\sqrt{36+x^{2}}}-\frac{1}{5}=\frac{x}{3\sqrt{36+x^{2}}}-\frac{1}{5},

which exists for every xx in [0,20][0,20].

Solve T(x)=0T'(x)=0.

x336+x2=155x=336+x225x2=9(36+x2)25x29x2=32416x2=324x2=32416=20.25x=4.5.\begin{aligned} \frac{x}{3\sqrt{36+x^{2}}} &= \frac{1}{5} \\ 5x &= 3\sqrt{36+x^{2}} \\ 25x^{2} &= 9\left(36+x^{2}\right) \\ 25x^{2}-9x^{2} &= 324 \\ 16x^{2} &= 324 \\ x^{2} &= \frac{324}{16}=20.25 \\ x &= 4.5 . \end{aligned}

Check for extraneous roots. Squaring can create false solutions, so substitute back into the unsquared equation: 36+20.25=56.25=7.5\sqrt{36+20.25}=\sqrt{56.25}=7.5 and 4.53(7.5)=4.522.5=0.2=15\dfrac{4.5}{3(7.5)}=\dfrac{4.5}{22.5}=0.2=\dfrac15 ✓. The other root x=4.5x=-4.5 lies outside [0,20][0,20] and is rejected.

Closed Interval Method.

T(0)=63+205=2+4=6T(4.5)=7.53+15.55=2.5+3.1=5.6T(20)=4363+020.880636.96.\begin{aligned} T(0) &= \frac{6}{3}+\frac{20}{5}=2+4=6 \\ T(4.5) &= \frac{7.5}{3}+\frac{15.5}{5}=2.5+3.1=5.6 \\ T(20) &= \frac{\sqrt{436}}{3}+0\approx\frac{20.8806}{3}\approx6.96 . \end{aligned}

Answer. She should land 4.5\mathbf{4.5} km from AA (hence 15.515.5 km from BB, which she walks), and the minimum total time is 5.6\mathbf{5.6} hours.

Second, independent justification. Differentiating again,

T(x)=13ddx[x36+x2]=1336+x2xx36+x236+x2=12(36+x2)3/2>0,T''(x)=\frac{1}{3}\cdot\frac{d}{dx}\left[\frac{x}{\sqrt{36+x^{2}}}\right]=\frac{1}{3}\cdot\frac{\sqrt{36+x^{2}}-x\cdot\frac{x}{\sqrt{36+x^{2}}}}{36+x^{2}}=\frac{12}{\left(36+x^{2}\right)^{3/2}}>0,

so TT is concave up on [0,20][0,20] and its unique stationary point is the absolute minimum. Numerically, T(4)=523+1652.4037+3.2=5.6037T(4)=\dfrac{\sqrt{52}}{3}+\dfrac{16}{5}\approx2.4037+3.2=5.6037 and T(5)=613+32.6034+3=5.6034T(5)=\dfrac{\sqrt{61}}{3}+3\approx2.6034+3=5.6034, both greater than 5.65.6 ✓.

A piece of wire 100100 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 xx be the length of wire used for the square. Allow the degenerate cuts x=0x=0 and x=100x=100 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 xx be the length (cm) of the piece bent into the square, so 100x100-x goes to the circle, with 0x1000\le x\le 100 (the endpoints mean "use all the wire for one shape").

  • Square: side x4\dfrac{x}{4}, area x216\dfrac{x^{2}}{16}.
  • Circle: circumference 100x100-x, so radius r=100x2πr=\dfrac{100-x}{2\pi} and area πr2=π(100x)24π2=(100x)24π\pi r^{2}=\pi\cdot\dfrac{(100-x)^{2}}{4\pi^{2}}=\dfrac{(100-x)^{2}}{4\pi}.

Objective.

A(x)=x216+(100x)24π,0x100.A(x)=\frac{x^{2}}{16}+\frac{(100-x)^{2}}{4\pi},\qquad 0\le x\le100 .

AA is a polynomial in xx, hence continuous on the closed bounded interval [0,100][0,100]: the Extreme Value Theorem guarantees both a maximum and a minimum, and the Closed Interval Method will find them.

Critical numbers.

A(x)=2x162(100x)4π=x8100x2π.A'(x)=\frac{2x}{16}-\frac{2(100-x)}{4\pi}=\frac{x}{8}-\frac{100-x}{2\pi}.

Setting A(x)=0A'(x)=0 and multiplying through by 8π8\pi:

πx4(100x)=0πx+4x=400x=400π+456.01.\begin{aligned} \pi x-4(100-x) &= 0 \\ \pi x+4x &= 400 \\ x &= \frac{400}{\pi+4}\approx 56.01 . \end{aligned}

Evaluate the three candidates.

A(0)=10024π=2500π795.77(all wire to the circle),A(0)=\frac{100^{2}}{4\pi}=\frac{2500}{\pi}\approx 795.77 \qquad(\text{all wire to the circle}),

A(100)=100216=625(all wire to the square).A(100)=\frac{100^{2}}{16}=625 \qquad(\text{all wire to the square}).

For the interior point, write x=400π+4x^{*}=\dfrac{400}{\pi+4}, so that 100x=100(π+4)400π+4=100ππ+4100-x^{*}=\dfrac{100(\pi+4)-400}{\pi+4}=\dfrac{100\pi}{\pi+4}. Then

A(x)=116160000(π+4)2+14π10000π2(π+4)2=10000(π+4)2+2500π(π+4)2=2500(4+π)(π+4)2=2500π+4350.06.\begin{aligned} A\left(x^{*}\right) &= \frac{1}{16}\cdot\frac{160000}{(\pi+4)^{2}}+\frac{1}{4\pi}\cdot\frac{10000\pi^{2}}{(\pi+4)^{2}} \\ &= \frac{10000}{(\pi+4)^{2}}+\frac{2500\pi}{(\pi+4)^{2}} \\ &= \frac{2500(4+\pi)}{(\pi+4)^{2}} \\ &= \frac{2500}{\pi+4}\approx 350.06 . \end{aligned}

(a) Minimum. The smallest of 795.77795.77, 625625 and 350.06350.06 is the interior value: cut the wire so that

x=400π+456.01 cm goes to the square and 100ππ+443.99 cm to the circle,x=\frac{400}{\pi+4}\approx 56.01\ \text{cm goes to the square and } \frac{100\pi}{\pi+4}\approx 43.99\ \text{cm to the circle},

giving the minimum total area 2500π+4350.1 cm2\dfrac{2500}{\pi+4}\approx \mathbf{350.1\ \text{cm}^{2}}.

(b) Maximum. The largest of the three values is A(0)=2500π795.8 cm2A(0)=\dfrac{2500}{\pi}\approx\mathbf{795.8\ \text{cm}^{2}}: do not cut the wire at all — bend the whole 100100 cm into a circle.

Why the interior point can only be the minimum.

A(x)=18+12π>0for every x,A''(x)=\frac18+\frac{1}{2\pi}>0 \quad\text{for every }x,

so AA is concave up on [0,100][0,100]. A concave-up function's stationary point is its minimum, and its maximum is therefore forced to an endpoint. A student who solved A(x)=0A'(x)=0, found x56x\approx56 and reported it as "the optimum" would have part (b) completely wrong — this is exactly why the endpoints must be evaluated.

Checks. A(56)=313616+4424π=196+193612.566196+154.06=350.06A(56)=\dfrac{3136}{16}+\dfrac{44^{2}}{4\pi}=196+\dfrac{1936}{12.566}\approx196+154.06=350.06 ✓ (matching 2500/(π+4)2500/(\pi+4)). Nearby, A(50)=156.25+25004π156.25+198.94=355.19A(50)=156.25+\dfrac{2500}{4\pi}\approx156.25+198.94=355.19 and A(60)=225+16004π225+127.32=352.32A(60)=225+\dfrac{1600}{4\pi}\approx225+127.32=352.32, both larger ✓. And the circle really does beat the square: for a fixed length of wire the circle is the most area-efficient shape, 2500π795.8>625\dfrac{2500}{\pi}\approx795.8>625.

Find the dimensions and the volume of the right circular cylinder of largest volume that can be inscribed in a sphere of radius RR. Express your answer in terms of RR, 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 RR, 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 rr and height hh; by symmetry the optimal cylinder is centred in the sphere. A plane through the axis cuts the cylinder in a 2r×h2r\times h rectangle inscribed in a great circle of radius RR. Half the rectangle's diagonal is a radius of the sphere, so

r2+(h2)2=R2r2=R2h24.r^{2}+\left(\frac{h}{2}\right)^{2}=R^{2}\quad\Longrightarrow\quad r^{2}=R^{2}-\frac{h^{2}}{4}.

Objective, reduced to one variable.

V(h)=πr2h=π(R2h24)h=πR2hπh34.V(h)=\pi r^{2}h=\pi\left(R^{2}-\frac{h^{2}}{4}\right)h=\pi R^{2}h-\frac{\pi h^{3}}{4}.

Domain. h0h\ge0 and r2=R2h240r^{2}=R^{2}-\dfrac{h^{2}}{4}\ge0, i.e. h2Rh\le 2R. So I=[0,2R]I=[0,2R], a closed bounded interval on which the polynomial VV is continuous: the Extreme Value Theorem applies and the Closed Interval Method is valid.

Critical numbers.

V(h)=πR23πh24=0h2=4R23h=2R3=233R1.1547RV'(h)=\pi R^{2}-\frac{3\pi h^{2}}{4}=0 \quad\Longrightarrow\quad h^{2}=\frac{4R^{2}}{3}\quad\Longrightarrow\quad h=\frac{2R}{\sqrt3}=\frac{2\sqrt3}{3}R\approx1.1547R

(the negative root is outside the domain), and VV' exists everywhere.

Compare the candidates.

V(0)=0,V(2R)=πR2(2R)π(2R)34=2πR32πR3=0,V(0)=0,\qquad V(2R)=\pi R^{2}(2R)-\frac{\pi(2R)^{3}}{4}=2\pi R^{3}-2\pi R^{3}=0 ,

V(2R3)=π(R2144R23)2R3=π(R2R23)2R3=π2R232R3=4πR333=43πR392.4184R3.\begin{aligned} V\left(\frac{2R}{\sqrt3}\right) &= \pi\left(R^{2}-\frac{1}{4}\cdot\frac{4R^{2}}{3}\right)\cdot\frac{2R}{\sqrt3} \\ &= \pi\left(R^{2}-\frac{R^{2}}{3}\right)\cdot\frac{2R}{\sqrt3} \\ &= \pi\cdot\frac{2R^{2}}{3}\cdot\frac{2R}{\sqrt3} \\ &= \frac{4\pi R^{3}}{3\sqrt3}=\frac{4\sqrt3\pi R^{3}}{9}\approx 2.4184R^{3}. \end{aligned}

Answer. The largest inscribed cylinder has

h=233R1.155R,r=R2R23=R23=63R0.8165R,h=\frac{2\sqrt3}{3}R\approx1.155R,\qquad r=\sqrt{R^{2}-\frac{R^{2}}{3}}=R\sqrt{\frac23}=\frac{\sqrt6}{3}R\approx0.8165R,

and volume

Vmax=43πR392.4184R3.V_{\max}=\frac{4\sqrt3\,\pi R^{3}}{9}\approx 2.4184R^{3}.

Fraction of the sphere. The sphere has volume 43πR3\dfrac{4}{3}\pi R^{3}, so

Vmax43πR3=4πR3/(33)4πR3/3=13=330.5774,\frac{V_{\max}}{\tfrac43\pi R^{3}}=\frac{4\pi R^{3}/\left(3\sqrt3\right)}{4\pi R^{3}/3}=\frac{1}{\sqrt3}=\frac{\sqrt3}{3}\approx 0.5774 ,

i.e. the best cylinder fills about 57.7%57.7\% of the sphere — a ratio independent of RR.

Second justification and numeric check. V(h)=3πh2<0V''(h)=-\dfrac{3\pi h}{2}<0 for h>0h>0, so VV is concave down on (0,2R)(0,2R) and the unique stationary point is the absolute maximum, consistent with the two endpoint values of 00. Taking R=1R=1: V(1.1547)=π(10.3333)(1.1547)2.4184V(1.1547)=\pi(1-0.3333)(1.1547)\approx2.4184, while V(1)=π(10.25)(1)2.3562V(1)=\pi(1-0.25)(1)\approx2.3562 and V(1.3)=π(10.4225)(1.3)2.3586V(1.3)=\pi(1-0.4225)(1.3)\approx2.3586 — both smaller ✓.

Light travels from a point AA in one medium to a point BB in a second medium, crossing the flat interface between them. Its speed is v1>0v_{1}>0 in the first medium and v2>0v_{2}>0 in the second. Choose coordinates so that the interface is the xx-axis, A=(0,a)A=(0,a) with a>0a>0, and B=(d,b)B=(d,-b) with b>0b>0 and d>0d>0; suppose the light crosses the interface at the point (x,0)(x,0).

Using Fermat's principle (light follows the path of least time), prove Snell's law

sinθ1v1=sinθ2v2,\frac{\sin\theta_{1}}{v_{1}}=\frac{\sin\theta_{2}}{v_{2}},

where θ1\theta_{1} and θ2\theta_{2} 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 (0,d)(0,d).

Show hint

Write the total travel time as a function of xx using Pythagoras on each leg, then look carefully at the two terms of T(x)T'(x) — 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 A(x,0)BA\to(x,0)\to B. By Pythagoras the two legs have lengths

A(x,0)=a2+x2,(x,0)B=b2+(dx)2.\left|A(x,0)\right|=\sqrt{a^{2}+x^{2}},\qquad \left|(x,0)B\right|=\sqrt{b^{2}+(d-x)^{2}} .

Since time equals distance divided by speed on each leg,

T(x)=a2+x2v1+b2+(dx)2v2.T(x)=\frac{\sqrt{a^{2}+x^{2}}}{v_{1}}+\frac{\sqrt{b^{2}+(d-x)^{2}}}{v_{2}} .

The radicands are at least a2>0a^{2}>0 and b2>0b^{2}>0, so TT is defined and differentiable for every real xx; the domain is all of the real line, an interval.

Differentiate (chain rule on each square root, noting ddx(dx)=1\dfrac{d}{dx}(d-x)=-1):

T(x)=1v12x2a2+x2+1v22(dx)(1)2b2+(dx)2=xv1a2+x2dxv2b2+(dx)2.\begin{aligned} T'(x) &= \frac{1}{v_{1}}\cdot\frac{2x}{2\sqrt{a^{2}+x^{2}}}+\frac{1}{v_{2}}\cdot\frac{2(d-x)(-1)}{2\sqrt{b^{2}+(d-x)^{2}}} \\ &= \frac{x}{v_{1}\sqrt{a^{2}+x^{2}}}-\frac{d-x}{v_{2}\sqrt{b^{2}+(d-x)^{2}}} . \end{aligned}

Recognise the sines. The normal to the interface at the crossing point is vertical. The first segment has horizontal run xx and length a2+x2\sqrt{a^{2}+x^{2}}, and θ1\theta_{1} is measured from the vertical, so the opposite side is the horizontal run:

sinθ1=xa2+x2,and likewisesinθ2=dxb2+(dx)2.\sin\theta_{1}=\frac{x}{\sqrt{a^{2}+x^{2}}},\qquad\text{and likewise}\qquad \sin\theta_{2}=\frac{d-x}{\sqrt{b^{2}+(d-x)^{2}}} .

Therefore

T(x)=sinθ1v1sinθ2v2,T'(x)=\frac{\sin\theta_{1}}{v_{1}}-\frac{\sin\theta_{2}}{v_{2}} ,

so the equation T(x)=0T'(x)=0 says precisely

sinθ1v1=sinθ2v2.\frac{\sin\theta_{1}}{v_{1}}=\frac{\sin\theta_{2}}{v_{2}} .

It remains to show that a solution exists and that it minimises TT.

Existence of a critical point in (0,d)(0,d). TT' is continuous on [0,d][0,d], and

T(0)=0dv2b2+d2<0,T(d)=dv1a2+d20>0.T'(0)=0-\frac{d}{v_{2}\sqrt{b^{2}+d^{2}}}<0,\qquad T'(d)=\frac{d}{v_{1}\sqrt{a^{2}+d^{2}}}-0>0 .

By the Intermediate Value Theorem applied to TT' on [0,d][0,d], there is at least one xx^{*} with 0<x<d0<x^{*}<d and T(x)=0T'\left(x^{*}\right)=0.

Justification that xx^{*} is the absolute minimum. Differentiate once more. By the quotient rule,

ddx[xa2+x2]=a2+x2xxa2+x2a2+x2=(a2+x2)x2(a2+x2)3/2=a2(a2+x2)3/2.\frac{d}{dx}\left[\frac{x}{\sqrt{a^{2}+x^{2}}}\right]=\frac{\sqrt{a^{2}+x^{2}}-x\cdot\dfrac{x}{\sqrt{a^{2}+x^{2}}}}{a^{2}+x^{2}}=\frac{\left(a^{2}+x^{2}\right)-x^{2}}{\left(a^{2}+x^{2}\right)^{3/2}}=\frac{a^{2}}{\left(a^{2}+x^{2}\right)^{3/2}} .

The same computation with u=dxu=d-x gives ddu[ub2+u2]=b2(b2+u2)3/2\dfrac{d}{du}\left[\dfrac{u}{\sqrt{b^{2}+u^{2}}}\right]=\dfrac{b^{2}}{\left(b^{2}+u^{2}\right)^{3/2}}, and the extra factor dudx=1\dfrac{du}{dx}=-1 cancels the minus sign in front of the second term. Hence

T(x)=a2v1(a2+x2)3/2+b2v2(b2+(dx)2)3/2>0T''(x)=\frac{a^{2}}{v_{1}\left(a^{2}+x^{2}\right)^{3/2}}+\frac{b^{2}}{v_{2}\left(b^{2}+(d-x)^{2}\right)^{3/2}}>0

for every real xx, because a,b,v1,v2>0a,b,v_{1},v_{2}>0.

So TT' is strictly increasing on the whole real line. Consequently xx^{*} is its only zero, with T<0T'<0 for all x<xx<x^{*} and T>0T'>0 for all x>xx>x^{*}. Thus TT is strictly decreasing on (,x]\left(-\infty,x^{*}\right] and strictly increasing on [x,)\left[x^{*},\infty\right), and by the First Derivative Test for Absolute Extreme Values T(x)T\left(x^{*}\right) is the absolute minimum of TT, attained at that single point.

Therefore the least-time path is the one crossing at xx^{*}, and it satisfies sinθ1v1=sinθ2v2\dfrac{\sin\theta_{1}}{v_{1}}=\dfrac{\sin\theta_{2}}{v_{2}}, which is Snell's law.

Remarks.

  1. If v1=v2v_{1}=v_{2} the law reduces to sinθ1=sinθ2\sin\theta_{1}=\sin\theta_{2}; both angles lie in [0,π2)\left[0,\tfrac{\pi}{2}\right), where sin\sin is one-to-one, so θ1=θ2\theta_{1}=\theta_{2} and the path is a straight line — light in a uniform medium travels straight, as it must.
  2. Writing ni=cvin_{i}=\dfrac{c}{v_{i}} for the refractive indices turns the result into the familiar n1sinθ1=n2sinθ2n_{1}\sin\theta_{1}=n_{2}\sin\theta_{2}.
  3. 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 v1v2v_{1}\ne v_{2} — it never runs straight from AA to BB.
  4. Nothing in the argument needed AA and BB to be on opposite sides of the interface with the same kind of geometry: any least-time problem of the form T(x)=a2+x2v1+b2+(dx)2v2T(x)=\dfrac{\sqrt{a^{2}+x^{2}}}{v_{1}}+\dfrac{\sqrt{b^{2}+(d-x)^{2}}}{v_{2}} has a strictly convex TT, hence exactly one minimiser, found by solving T(x)=0T'(x)=0.