Mathematics · Book 2 · Grades 10–12

High School Mathematics

High School Mathematics · Grades 10–12

22Differentiation and Convexity

The derivative measures the instantaneous rate of change of a function; it is the slope of the tangent line to its graph. This chapter reviews and extends the differentiation rules, links the sign of ff' to the variations of ff, and introduces convexity, which is governed by the second derivative.

22.1 The derivative

Definition 22.1 (Derivative at a point)

Let ff be defined on an interval II and aIa \in I. The function ff is differentiable at aa if the difference quotient

f(a+h)f(a)h\frac{f(a+h) - f(a)}{h}

has a finite limit as h0h \to 0. This limit is called the derivative of ff at aa and written f(a)f'(a). If ff is differentiable at every point of II, the function f ⁣:xf(x)f' \colon x \mapsto f'(x) is the derivative of ff.

Definition 22.2 (Tangent line)

If ff is differentiable at aa, the tangent to the curve of ff at the point (a,f(a))(a, f(a)) is the line of equation

y=f(a)+f(a)(xa).y = f(a) + f'(a)(x - a).
As h decreases, the secant line through A = (a, f(a)) and (a+h, f(a+h)) (orange) rotates towards the tangent at A (red): its slope f(a+h)-f(a)/h tends to f'(a).
As hh decreases, the secant line through A=(a,f(a))A = (a, f(a)) and (a+h,f(a+h))(a+h, f(a+h)) (orange) rotates towards the tangent at AA (red): its slope f(a+h)f(a)h\frac{f(a+h)-f(a)}{h} tends to f(a)f'(a).

Proposition 22.3

A function differentiable at aa is continuous at aa. The converse is false.

Proof. For h0h \neq 0 small, f(a+h)f(a)=hf(a+h)f(a)hf(a+h) - f(a) = h \cdot \frac{f(a+h)-f(a)}{h}. As h0h \to 0, the right side tends to 0×f(a)=00 \times f'(a) = 0, so f(a+h)f(a)f(a+h) \to f(a). For the converse, xxx \mapsto \abs{x} is continuous at 00, but its difference quotient at 00 equals hh=±1\frac{\abs h}{h} = \pm 1 depending on the sign of hh, and has no limit.

22.1.1 Differentiation rules

Proposition 22.4 (Operations)

Let u,vu, v be differentiable on II and λR\lambda \in \R. Then u+vu + v, λu\lambda u, uvuv are differentiable on II, as is uv\frac{u}{v} where v0v \neq 0, and

(u+v)=u+v,(λu)=λu,(uv)=uv+uv,(uv)=uvuvv2.(u+v)' = u' + v', \quad (\lambda u)' = \lambda u', \quad (uv)' = u'v + uv', \quad \left(\frac{u}{v}\right)' = \frac{u'v - uv'}{v^2}.

Proof of the product rule. Write the difference quotient of uvuv at aa as

u(a+h)v(a+h)u(a)v(a)h=u(a+h)u(a)hv(a+h)+u(a)v(a+h)v(a)h.\frac{u(a+h)v(a+h) - u(a)v(a)}{h} = \frac{u(a+h) - u(a)}{h}\,v(a+h) + u(a)\,\frac{v(a+h) - v(a)}{h}.

As h0h \to 0, v(a+h)v(a)v(a+h) \to v(a) by continuity (Proposition 22.3), so the right side tends to u(a)v(a)+u(a)v(a)u'(a)v(a) + u(a)v'(a). The other rules are proved similarly.

Theorem 22.5 (Chain rule)

Let uu be differentiable on II with values in JJ, and gg differentiable on JJ. Then gug \circ u is differentiable on II and

(gu)=(gu)u.(g \circ u)' = (g' \circ u) \cdot u' .

In particular, for uu differentiable:

(un)=nuun1 (nZ),(u)=u2u (u>0),(eu)=ueu.(u^n)' = n\,u'\,u^{n-1} \ (n \in \Z), \qquad \left(\sqrt{u}\right)' = \frac{u'}{2\sqrt{u}} \ (u > 0), \qquad \left(\eu^{u}\right)' = u'\,\eu^{u}.

Proof sketch. When u(a+h)u(a)u(a+h) \neq u(a) for hh small, write

g(u(a+h))g(u(a))h=g(u(a+h))g(u(a))u(a+h)u(a)u(a+h)u(a)h.\frac{g(u(a+h)) - g(u(a))}{h} = \frac{g(u(a+h)) - g(u(a))}{u(a+h) - u(a)} \cdot \frac{u(a+h) - u(a)}{h}.

As h0h \to 0, u(a+h)u(a)u(a+h) \to u(a), so the first factor tends to g(u(a))g'(u(a)) and the second to u(a)u'(a). (A complete proof must handle the case where u(a+h)=u(a)u(a+h) = u(a) for hh arbitrarily small; this technical point is treated at university.)

Example 22.6

The usual derivatives, valid on the natural domains:

(xn)=nxn1,(1x)=1x2,(x)=12x,(cosx)=sinx,(sinx)=cosx.(x^n)' = nx^{n-1}, \quad \left(\frac{1}{x}\right)' = -\frac{1}{x^2}, \quad (\sqrt{x})' = \frac{1}{2\sqrt{x}}, \quad (\cos x)' = -\sin x, \quad (\sin x)' = \cos x .

The first is proved by induction from the product rule, and the last two in Chapter 24.

22.2 Variations and extrema

Theorem 22.7 (Sign of the derivative and variations)

Let ff be differentiable on an interval II.

  1. ff is increasing on II if and only if f0f' \geq 0 on II.
  2. ff is decreasing on II if and only if f0f' \leq 0 on II.
  3. If f>0f' > 0 on II except at finitely many points where it vanishes, then ff is strictly increasing on II.

Partial proof. If ff is increasing, every difference quotient f(a+h)f(a)h\frac{f(a+h)-f(a)}{h} is 0\geq 0, and passing to the limit gives f(a)0f'(a) \geq 0. The converse implications rest on the mean value theorem, proved at university; they are admitted at this level.

Definition 22.8 (Local extremum)

ff has a local maximum at aa if f(x)f(a)f(x) \leq f(a) for all xx near aa; local minima are defined symmetrically.

Proposition 22.9 (First-order condition)

If ff is differentiable on an open interval II and has a local extremum at aIa \in I, then f(a)=0f'(a) = 0. The converse is false (f(x)=x3f(x) = x^3 at a=0a = 0).

Proof. Say aa is a local maximum. For h>0h > 0 small, f(a+h)f(a)h0\frac{f(a+h)-f(a)}{h} \leq 0, so letting h0+h \to 0^+ gives f(a)0f'(a) \leq 0; for h<0h < 0 the quotient is 0\geq 0, giving f(a)0f'(a) \geq 0. Hence f(a)=0f'(a) = 0.

At a local extremum inside an open interval, the tangent (orange) is horizontal: f'(a) = 0. Here f(x) = x3 - 3x, with a local maximum at -1 and a local minimum at 1.
At a local extremum inside an open interval, the tangent (orange) is horizontal: f(a)=0f'(a) = 0. Here f(x)=x33xf(x) = x^3 - 3x, with a local maximum at 1-1 and a local minimum at 11.

Method 22.10 (Variation table)

To study a function ff: determine its domain and limits at the boundary; compute ff' and factor it; determine the sign of ff' on each subinterval; record everything in a variation table, marking extrema; deduce the number of solutions of f(x)=kf(x) = k using the bijection theorem (Theorem 21.15).

22.3 Convexity

Definition 22.11 (Convex function)

A function ff defined on an interval II is convex on II if every chord of its graph lies above the graph: for all a,bIa, b \in I and t[0,1]t \in \intcc{0}{1},

f((1t)a+tb)(1t)f(a)+tf(b).f\bigl((1-t)a + t b\bigr) \leq (1-t) f(a) + t f(b).

It is concave if the reverse inequality holds (f-f convex).

A convex function: every chord (red) lies above the graph, and the graph lies above each of its tangents (orange). The dashed segment shows the gap between f ((1-t)a+tb ) and (1-t)f(a)+tf(b).
A convex function: every chord (red) lies above the graph, and the graph lies above each of its tangents (orange). The dashed segment shows the gap between f((1t)a+tb)f\bigl((1-t)a+tb\bigr) and (1t)f(a)+tf(b)(1-t)f(a)+tf(b).

Theorem 22.12 (Convexity and derivatives)

Let ff be differentiable on an interval II. The following are equivalent:

  1. ff is convex on II;
  2. ff' is increasing on II;
  3. the graph of ff lies above each of its tangents.

If ff is twice differentiable, these are also equivalent to f0f'' \geq 0 on II.

Proof of (2) \Rightarrow (3). Fix aIa \in I and set g(x)=f(x)f(a)f(a)(xa)g(x) = f(x) - f(a) - f'(a)(x-a), the gap between the curve and the tangent at aa. Then gg is differentiable and g(x)=f(x)f(a)g'(x) = f'(x) - f'(a). If ff' is increasing, g0g' \leq 0 on I(,a]I \cap \intoc{-\infty}{a} and g0g' \geq 0 on I[a,+)I \cap \intco{a}{+\infty}: gg decreases before aa and increases after, so gg attains its minimum g(a)=0g(a) = 0, hence g0g \geq 0. The remaining implications are admitted at this level; the equivalence with f0f'' \geq 0 follows from Theorem 22.7 applied to ff'.

Definition 22.13 (Inflection point)

A point where the curve of ff crosses its tangent is an inflection point. For ff twice differentiable, inflection points are the points where ff'' changes sign.

Example 22.14

f(x)=x3f(x) = x^3 has f(x)=6xf''(x) = 6x: ff is concave on (,0]\intoc{-\infty}{0}, convex on [0,+)\intco{0}{+\infty}, with an inflection point at the origin, where the curve crosses its tangent (the xx-axis).

The inflection point of x x3 at the origin: the curve crosses its tangent (orange), concave on the left, convex on the right.
The inflection point of xx3x \mapsto x^3 at the origin: the curve crosses its tangent (orange), concave on the left, convex on the right.

Example 22.15 (Convexity inequalities)

The exponential is convex on R\R (its second derivative is itself, positive). Its tangent at 00 is y=1+xy = 1 + x, so

ex1+xfor all xR.\eu^x \geq 1 + x \quad \text{for all } x \in \R .

Such tangent line inequalities are a standard product of convexity.

Method 22.16 (Using convexity)

  • To prove an inequality f(x)ax+bf(x) \geq ax + b: identify the line as a tangent of a convex ff and invoke Theorem 22.12(3).
  • To locate inflection points: solve f(x)=0f''(x) = 0 and check that ff'' changes sign there.
  • In a variation table, convexity refines the sketch of the curve (which way it bends).

22.4 Exercises

Exercise 22.1

Differentiate the following functions on their domains:

f(x)=x35x+2,g(x)=xx2+1,h(x)=(2x+1)5,k(x)=x2+1.f(x) = x^3 - 5x + 2, \quad g(x) = \frac{x}{x^2+1}, \quad h(x) = (2x+1)^5, \quad k(x) = \sqrt{x^2 + 1}.
Solution

Solution of Exercise 22.1.

f(x)=3x25f'(x) = 3x^2 - 5.

Quotient rule: g(x)=(x2+1)x2x(x2+1)2=1x2(x2+1)2g'(x) = \dfrac{(x^2+1) - x\cdot 2x}{(x^2+1)^2} = \dfrac{1 - x^2}{(x^2+1)^2}.

Chain rule with u=2x+1u = 2x+1: h(x)=52(2x+1)4=10(2x+1)4h'(x) = 5 \cdot 2 \cdot (2x+1)^4 = 10(2x+1)^4.

Chain rule with u=x2+1u = x^2 + 1: k(x)=2x2x2+1=xx2+1k'(x) = \dfrac{2x}{2\sqrt{x^2+1}} = \dfrac{x}{\sqrt{x^2+1}}.

Exercise 22.2

Give the equation of the tangent to the curve of f(x)=x23x+1f(x) = x^2 - 3x + 1 at the point of abscissa a=2a = 2, and determine the positions of the curve relative to this tangent.

Solution

Solution of Exercise 22.2.

f(x)=2x3f'(x) = 2x - 3, so f(2)=1f(2) = -1 and f(2)=1f'(2) = 1: the tangent is y=1+(x2)=x3y = -1 + (x - 2) = x - 3. The gap is

f(x)(x3)=x24x+4=(x2)20,f(x) - (x - 3) = x^2 - 4x + 4 = (x-2)^2 \geq 0 ,

so the curve lies above the tangent everywhere, touching it only at x=2x = 2 (as expected: ff is convex).

Exercise 22.3

Using the definition of the derivative, compute

limx0(1+x)1001xandlimh04+h2h.\lim_{x \to 0} \frac{(1+x)^{100} - 1}{x} \qquad\text{and}\qquad \lim_{h \to 0} \frac{\sqrt{4+h} - 2}{h}.
Solution

Solution of Exercise 22.3.

Both are difference quotients. With f(x)=(1+x)100f(x) = (1+x)^{100} at 00: f(x)=100(1+x)99f'(x) = 100(1+x)^{99}, so the limit is f(0)=100f'(0) = 100. With g(x)=xg(x) = \sqrt{x} at 44: g(x)=12xg'(x) = \frac{1}{2\sqrt{x}}, so the limit is g(4)=14g'(4) = \frac14.

Exercise 22.4 ★★

Study the function f(x)=x2+3x1f(x) = \dfrac{x^2 + 3}{x - 1} on its domain: limits, derivative, variation table, local extrema.

Solution

Solution of Exercise 22.4.

Domain R{1}\R \setminus \{1\}. Limits: at ±\pm\infty, f(x)x±f(x) \sim x \to \pm\infty; at 1±1^\pm, numerator 4>0\to 4 > 0 and denominator 0±\to 0^\pm, so f±f \to \pm\infty; the line x=1x = 1 is a vertical asymptote.

f(x)=2x(x1)(x2+3)(x1)2=x22x3(x1)2=(x3)(x+1)(x1)2.f'(x) = \frac{2x(x-1) - (x^2+3)}{(x-1)^2} = \frac{x^2 - 2x - 3}{(x-1)^2} = \frac{(x-3)(x+1)}{(x-1)^2}.

Hence f>0f' > 0 on (,1)\intoo{-\infty}{-1} and (3,+)\intoo{3}{+\infty}, f<0f' < 0 on (1,1)\intoo{-1}{1} and (1,3)\intoo{1}{3}. The function increases to a local maximum f(1)=2f(-1) = -2, decreases to -\infty, jumps to ++\infty after the asymptote, decreases to a local minimum f(3)=6f(3) = 6, then increases.

Exercise 22.5 ★★

A box without a lid is made from a square sheet of cardboard of side 3030\,cm by cutting equal squares of side xx from the corners and folding up the sides. Determine xx maximizing the volume of the box.

Solution

Solution of Exercise 22.5.

For x(0,15)x \in \intoo{0}{15}, the box has a square base of side 302x30 - 2x and height xx, so

V(x)=x(302x)2.V(x) = x(30 - 2x)^2 .

V(x)=(302x)2+x2(302x)(2)=(302x)(302x4x)=(302x)(306x)V'(x) = (30-2x)^2 + x \cdot 2(30-2x)(-2) = (30-2x)(30 - 2x - 4x) = (30-2x)(30-6x). On (0,15)\intoo{0}{15}, 302x>030 - 2x > 0, so VV' has the sign of 306x30 - 6x: positive before x=5x = 5, negative after. The volume is maximal for x=5x = 5 cm, giving V(5)=5×202=2000 cm3V(5) = 5 \times 20^2 = 2000\ \text{cm}^3.

Exercise 22.6 ★★

Let f(x)=x44x3+10f(x) = x^4 - 4x^3 + 10.

  1. Compute ff'' and determine the convexity intervals and inflection points of ff.
  2. Show that the tangent at the inflection point of abscissa 22 crosses the curve there.
Solution

Solution of Exercise 22.6.

1. f(x)=4x312x2f'(x) = 4x^3 - 12x^2 and f(x)=12x224x=12x(x2)f''(x) = 12x^2 - 24x = 12x(x-2). Thus f>0f'' > 0 on (,0)\intoo{-\infty}{0} and on (2,+)\intoo{2}{+\infty} (convex), f<0f'' < 0 on (0,2)\intoo{0}{2} (concave). ff'' changes sign at 00 and at 22: both are inflection points.

2. At a=2a = 2: f(2)=1632+10=6f(2) = 16 - 32 + 10 = -6, f(2)=3248=16f'(2) = 32 - 48 = -16, tangent y=616(x2)=16x+26y = -6 - 16(x-2) = -16x + 26. The gap is

g(x)=f(x)+16x26=x44x3+16x16.g(x) = f(x) + 16x - 26 = x^4 - 4x^3 + 16x - 16 .

Since g(2)=g(2)=g(2)=0g(2) = g'(2) = g''(2) = 0, (x2)3(x-2)^3 divides gg; division gives g(x)=(x2)3(x+2)g(x) = (x-2)^3(x+2). Near x=2x = 2, x+2>0x + 2 > 0, so gg has the sign of (x2)3(x-2)^3: negative before 22, positive after. The curve crosses the tangent: 22 is indeed an inflection point.

Exercise 22.7 ★★

Using a tangent line inequality, show that for all x>0x > 0,

xx+12,\sqrt{x} \leq \frac{x + 1}{2},

and identify when equality holds. (Hint: the square root is concave.)

Solution

Solution of Exercise 22.7.

The function f(x)=xf(x) = \sqrt{x} satisfies f(x)=14x3/2<0f''(x) = -\frac{1}{4}x^{-3/2} < 0 on (0,+)\intoo{0}{+\infty}: it is concave, so its graph lies below each tangent. The tangent at a=1a = 1 is

y=f(1)+f(1)(x1)=1+12(x1)=x+12,y = f(1) + f'(1)(x - 1) = 1 + \tfrac12 (x-1) = \frac{x+1}{2},

whence xx+12\sqrt{x} \leq \frac{x+1}{2} for all x>0x > 0. Equality means the curve touches the tangent, which happens only at the point of tangency x=1x = 1. (Equivalently: (x1)20\left(\sqrt x - 1\right)^2 \geq 0.)

Exercise 22.8 ★★★

Let ff be convex and differentiable on R\R, and suppose that ff' vanishes at some point aa. Show that f(a)f(a) is the global minimum of ff on R\R.

Solution

Solution of Exercise 22.8.

By Theorem 22.12, the graph of a differentiable convex function lies above each of its tangents. The tangent at aa is horizontal (f(a)=0f'(a) = 0), of equation y=f(a)y = f(a). Hence f(x)f(a)f(x) \geq f(a) for all xRx \in \R: f(a)f(a) is the global minimum.

Exercise 22.9 ★★★

Show that among all rectangles of fixed perimeter pp, the square has the largest area. Then show that among all rectangles of fixed area AA, the square has the smallest perimeter, and explain how the two statements are related.

Solution

Solution of Exercise 22.9.

Fixed perimeter. A rectangle with sides xx and p2x\frac{p}{2} - x (0<x<p20 < x < \frac p2) has area S(x)=x(p2x)S(x) = x\left(\frac p2 - x\right). Then S(x)=p22xS'(x) = \frac p2 - 2x vanishes at x=p4x = \frac p4, positive before and negative after: the maximum is at x=p4x = \frac{p}{4}, where both sides equal p4\frac p4 — a square.

Fixed area. Sides xx and Ax\frac Ax give perimeter P(x)=2(x+Ax)P(x) = 2\left(x + \frac Ax\right), with P(x)=2(1Ax2)P'(x) = 2\left(1 - \frac{A}{x^2}\right), negative for x<Ax < \sqrt A and positive after: minimum at x=Ax = \sqrt{A}, a square again.

Relation. The two statements are dual. Suppose a non-square rectangle minimized the perimeter at fixed area AA; the square of the same perimeter would have area >A> A by the first statement, and shrinking it homothetically to area AA would strictly decrease its perimeter — contradicting minimality. Each statement thus implies the other.

22.5 Problem: The lifeguard’s calculation

Problem 22.1

Weekend problem — the fastest rescue path obeys Snell’s law of light, convexity certifies every optimum, and the ideal soda can is exactly as tall as it is wide

A lifeguard sees a swimmer in trouble — diagonally down the beach, out in the water. Running is faster than swimming: the straight line is not the fastest route. The route that minimizes time bends at the shoreline, and its bending law is precisely the law by which light refracts entering water: nature, too, differentiates. This problem trains the chain rule (Theorem 22.5), performs the rescue, harvests the inequalities of convexity (Theorem 22.12), and designs a tin can.

Part I — Chain-rule fluency.

  1. Differentiate: (3x2+1)5\left(3x^2 + 1\right)^5; x2+9\sqrt{x^2 + 9}; 1x2+1\dfrac{1}{x^2 + 1}.
  2. Give the tangent to y=x2+9y = \sqrt{x^2 + 9} at x=4x = 4.
  3. Build the variation table of f(x)=xx2+1f(x) = \dfrac{x}{x^2 + 1} on R\R (extrema included).
  4. For g(x)=x33x2+4g(x) = x^3 - 3x^2 + 4: variation table and convexity table (gg''), with the inflection point (Definition 22.13).
  5. Compute the tangent to gg at its inflection point, and show that g(x)(tangent)=(x1)3g(x) - (\text{tangent}) = (x - 1)^3: what does the sign change say about how the tangent meets the curve at an inflection?

Part II — The rescue. Shoreline along the xx-axis; the lifeguard stands on sand at A(0,30)A(0, 30), the swimmer waits at B(40,20)B(40, -20) (meters). The guard runs at 55 m/s on sand, swims at 22 m/s, and enters the water at a point (x,0)(x, 0) of her choice.

  1. Model: express the total rescue time T(x)T(x), and say why only x[0,40]x \in \intcc{0}{40} deserves consideration.
  2. Differentiate TT (chain rule at work — twice).
  3. Let θ1\theta_1 be the angle of the running leg with the perpendicular to the shore, θ2\theta_2 that of the swimming leg. Show that sinθ1=xx2+900\sin\theta_1 = \frac{x}{\sqrt{x^2 + 900}} and that the condition T(x)=0T'(x) = 0 reads

    sinθ15=sinθ22\frac{\sin\theta_1}{5} = \frac{\sin\theta_2}{2}

    Snell’s law, with the two speeds in place of the speeds of light in air and water.

  4. The straight segment [AB][AB] crosses the shore at x=24x = 24. Compute T(24)T(24), T(40)T(40) (run along the beach, then swim straight out) and T(0)T(0): is the geometric straight line the fastest? Is either extreme strategy?
  5. Locate the optimal entry point by dichotomy on TT' (it is 33.7\approx 33.7 m): give xx^* to the meter and the record time T(x)T(x^*) to the tenth of a second. How much does the optimal bend save over the straight line?
  6. Why is the critical point a global minimum? (Each term of TT is convex — admit that a sum of convex functions is convex — and apply Exercise 22.8.)
  7. Fermat’s principle states that light always travels the path of least time. Deduce why a light ray bends exactly at the surface when entering water (where light is slower), and name the everyday observation this explains about a pencil in a glass of water.

Part III — Convexity’s harvest.

  1. Show that xx2x \mapsto x^2 is convex, and prove the midpoint inequality (a+b2)2a2+b22\left(\frac{a + b}{2}\right)^2 \leq \frac{a^2 + b^2}{2} twice: once from convexity, once by expanding (ab)20(a - b)^2 \geq 0.
  2. Deduce that the quadratic mean a2+b22\sqrt{\frac{a^2 + b^2}{2}} dominates the arithmetic mean, and assemble the complete chain of the series — harmonic \leq geometric \leq arithmetic \leq quadratic — verifying all four on a=2a = 2, b=8b = 8.
  3. Tangent-below-the-curve: x1xx \mapsto \frac1x is convex on (0,+)\intoo{0}{+\infty}; write its tangent at 11 and deduce the inequality 1x2x\frac1x \geq 2 - x for all x>0x > 0. Where is it an equality?
  4. Inflection in the wild: during an epidemic, the cumulative case count follows an S-shaped curve. What happens at its inflection point, and why is that date the one epidemiologists watch for? Relate to the sign of the second derivative on each side.

Part IV — The ideal can. A cylindrical can must hold V=330V = 330 cm3^3 with the least metal: surface S=2πr2+2πrhS = 2\pi r^2 + 2\pi r h, constraint πr2h=V\pi r^2 h = V.

  1. Express S(r)=2πr2+2VrS(r) = 2\pi r^2 + \dfrac{2V}{r}, differentiate, and compute the optimal radius and height for V=330V = 330 (millimeter precision).
  2. Prove the elegant general law: at the optimum, h=2rh = 2r — the ideal can is exactly as tall as it is wide.
  3. Check S(r)>0S''(r) > 0 and conclude (via Exercise 22.8 again) that the optimum is global. Real soda cans are visibly taller than wide: name a non-mathematical reason.
  4. Finale — the optimization pipeline: model, ask the derivative, solve for critical points, certify with convexity or a table, interpret. Run the list over the lifeguard, the can, and grade 11’s strongest beam (Problem 12.1) — and state what Fermat’s principle says about who else runs this pipeline.
Solution

Solution of Problem 22.1.

1. 30x(3x2+1)430x\left(3x^2 + 1\right)^4; xx2+9\dfrac{x}{\sqrt{x^2 + 9}}; 2x(x2+1)2-\dfrac{2x}{\left(x^2 + 1\right)^2}.

2. y(4)=5y(4) = 5, slope 45\frac45: tangent y=5+45(x4)y = 5 + \frac45(x - 4), i.e. y=45x+95y = \frac45 x + \frac95.

3. f(x)=(x2+1)x2x(x2+1)2=1x2(x2+1)2f'(x) = \frac{(x^2 + 1) - x \cdot 2x}{(x^2+1)^2} = \frac{1 - x^2}{(x^2 + 1)^2}: negative, positive, negative across 1-1 and 11: minimum f(1)=12f(-1) = -\frac12, maximum f(1)=12f(1) = \frac12, with horizontal asymptote 00 on both sides.

4. g(x)=3x26x=3x(x2)g'(x) = 3x^2 - 6x = 3x(x - 2): increasing, decreasing, increasing across 00 and 22; local max g(0)=4g(0) = 4, local min g(2)=0g(2) = 0. g(x)=6x6g''(x) = 6x - 6: concave before 11, convex after: inflection at (1,2)(1, 2).

5. Tangent at 11: slope g(1)=3g'(1) = -3: y=23(x1)=3x+5y = 2 - 3(x - 1) = -3x + 5. Difference: x33x2+4(3x+5)=x33x2+3x1=(x1)3x^3 - 3x^2 + 4 - (-3x + 5) = x^3 - 3x^2 + 3x - 1 = (x - 1)^3, which changes sign at 11: the tangent crosses the curve — the signature behavior at an inflection point, where the curve switches sides.

6. T(x)=x2+9005+(40x)2+4002T(x) = \dfrac{\sqrt{x^2 + 900}}{5} + \dfrac{\sqrt{(40 - x)^2 + 400}}{2}. Entering before 00 or beyond 4040 lengthens both legs: pointless.

7. T(x)=x5x2+90040x2(40x)2+400T'(x) = \dfrac{x}{5\sqrt{x^2 + 900}} - \dfrac{40 - x}{2\sqrt{(40 - x)^2 + 400}}.

8. In the running triangle, the side along the shore is xx and the hypotenuse x2+900\sqrt{x^2 + 900}: the sine of the angle with the perpendicular is precisely their quotient (opposite over hypotenuse); likewise sinθ2=40x(40x)2+400\sin\theta_2 = \frac{40 - x}{\sqrt{(40-x)^2 + 400}}. Then T(x)=0T'(x) = 0 reads sinθ15=sinθ22\frac{\sin\theta_1}{5} = \frac{\sin\theta_2}{2} — Snell’s law with speeds 55 and 22.

9. T(24)20.5T(24) \approx 20.5 s; T(40)=10+10=20T(40) = 10 + 10 = 20 s; T(0)=6+2000/228.4T(0) = 6 + \sqrt{2000}/2 \approx 28.4 s. The straight line loses even to “run all the way, then swim straight” — and both lose to the refracted path.

10. Dichotomy on TT' (negative at 2424, positive at 4040) converges to x34x^* \approx 34 m, with T(x)19.5T(x^*) \approx 19.5 s: about one second faster than the straight line — the difference between a rescue and a tragedy.

11. Each leg-time is a convex function of xx (a quadratic\sqrt{\text{quadratic}} branch), so TT is convex, and a critical point of a convex differentiable function is its global minimum (Exercise 22.8): xx^* is not merely stationary, it is unbeatable.

12. Light in water is slower; by Fermat’s principle the fastest air-to-water path bends at the surface exactly by Snell’s law — so rays from a submerged pencil reach the eye bent, and the brain, extrapolating straight lines, sees the pencil broken at the waterline.

13. (x2)=2>0(x^2)'' = 2 > 0: convex. Convexity at the midpoint: f(a+b2)f(a)+f(b)2f\left(\frac{a+b}{2}\right) \leq \frac{f(a) + f(b)}{2}, which is the claim. By hand: a2+b22(a+b2)2=(ab)240\frac{a^2 + b^2}{2} - \left(\frac{a+b}{2}\right)^2 = \frac{(a - b)^2}{4} \geq 0.

14. Taking square roots (increasing) in question 13: a+b2a2+b22\frac{a + b}{2} \leq \sqrt{\frac{a^2 + b^2}{2}}. Full chain on 2,82, 8: harmonic 21610=3.2\frac{2 \cdot 16}{10} = 3.2; geometric 16=4\sqrt{16} = 4; arithmetic 55; quadratic 345.83\sqrt{34} \approx 5.83: each mean bows to the next.

15. Tangent to 1x\frac1x at 11: value 11, slope 1-1: y=2xy = 2 - x. Convex curves sit above their tangents (Theorem 22.12): 1x2x\frac1x \geq 2 - x for all x>0x > 0, with equality exactly at the contact point x=1x = 1.

16. At the inflection, the daily case count (the derivative) peaks: growth stops accelerating and begins to decelerate — the first mathematical signal that the wave is turning, long before the counts themselves fall. Before it, f>0f'' > 0 (each day worse than the last); after it, f<0f'' < 0 (still growing, but more slowly).

17. S(r)=4πr2Vr2=0S'(r) = 4\pi r - \frac{2V}{r^2} = 0 gives r3=V2π=3302πr^3 = \frac{V}{2\pi} = \frac{330}{2\pi}: r3.74r \approx 3.74 cm, and h=330πr27.49h = \frac{330}{\pi r^2} \approx 7.49 cm.

18. h=Vπr2=2πr3πr2=2rh = \frac{V}{\pi r^2} = \frac{2\pi r^3}{\pi r^2} = 2r at the optimum: height equals diameter, whatever the volume.

19. S(r)=4π+4Vr3>0S''(r) = 4\pi + \frac{4V}{r^3} > 0: convex, so the critical radius is the global minimum. Real cans stand taller for grip, stacking, shelf presence and the thicker top/bottom metal — optimization always minimizes exactly what you wrote, not what you meant.

20. Lifeguard: model T(x)T(x), differentiate, Snell, convexity, one second saved. Can: model S(r)S(r), differentiate, h=2rh = 2r, convexity, metal saved. Beam (Problem 12.1): model S(w)S(w), differentiate, d=w2d = w\sqrt2, table, stiffness gained. And by Fermat’s principle, light itself runs the pipeline at every surface it meets — nature was the first optimizer.