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 to the variations of , and introduces convexity, which is governed by the second derivative.
22.1 The derivative
Definition 22.1 (Derivative at a point)
Let be defined on an interval and . The function is differentiable at if the difference quotient
has a finite limit as . This limit is called the derivative of at and written . If is differentiable at every point of , the function is the derivative of .
Definition 22.2 (Tangent line)
If is differentiable at , the tangent to the curve of at the point is the line of equation
Proposition 22.3
A function differentiable at is continuous at . The converse is false.
Proof. For small, . As , the right side tends to , so . For the converse, is continuous at , but its difference quotient at equals depending on the sign of , and has no limit. ∎
22.1.1 Differentiation rules
Proposition 22.4 (Operations)
Let be differentiable on and . Then , , are differentiable on , as is where , and
Proof of the product rule. Write the difference quotient of at as
As , by continuity (Proposition 22.3), so the right side tends to . The other rules are proved similarly. ∎
Theorem 22.5 (Chain rule)
Let be differentiable on with values in , and differentiable on . Then is differentiable on and
In particular, for differentiable:
Proof sketch. When for small, write
As , , so the first factor tends to and the second to . (A complete proof must handle the case where for arbitrarily small; this technical point is treated at university.) ∎
Example 22.6
The usual derivatives, valid on the natural domains:
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 be differentiable on an interval .
- is increasing on if and only if on .
- is decreasing on if and only if on .
- If on except at finitely many points where it vanishes, then is strictly increasing on .
Partial proof. If is increasing, every difference quotient is , and passing to the limit gives . The converse implications rest on the mean value theorem, proved at university; they are admitted at this level. ∎
Definition 22.8 (Local extremum)
has a local maximum at if for all near ; local minima are defined symmetrically.
Proposition 22.9 (First-order condition)
If is differentiable on an open interval and has a local extremum at , then . The converse is false ( at ).
Proof. Say is a local maximum. For small, , so letting gives ; for the quotient is , giving . Hence . ∎
Method 22.10 (Variation table)
To study a function : determine its domain and limits at the boundary; compute and factor it; determine the sign of on each subinterval; record everything in a variation table, marking extrema; deduce the number of solutions of using the bijection theorem (Theorem 21.15).
22.3 Convexity
Definition 22.11 (Convex function)
A function defined on an interval is convex on if every chord of its graph lies above the graph: for all and ,
It is concave if the reverse inequality holds ( convex).
Theorem 22.12 (Convexity and derivatives)
Let be differentiable on an interval . The following are equivalent:
- is convex on ;
- is increasing on ;
- the graph of lies above each of its tangents.
If is twice differentiable, these are also equivalent to on .
Proof of (2) (3). Fix and set , the gap between the curve and the tangent at . Then is differentiable and . If is increasing, on and on : decreases before and increases after, so attains its minimum , hence . The remaining implications are admitted at this level; the equivalence with follows from Theorem 22.7 applied to . ∎
Definition 22.13 (Inflection point)
A point where the curve of crosses its tangent is an inflection point. For twice differentiable, inflection points are the points where changes sign.
Example 22.14
has : is concave on , convex on , with an inflection point at the origin, where the curve crosses its tangent (the -axis).
Example 22.15 (Convexity inequalities)
The exponential is convex on (its second derivative is itself, positive). Its tangent at is , so
Such tangent line inequalities are a standard product of convexity.
Method 22.16 (Using convexity)
- To prove an inequality : identify the line as a tangent of a convex and invoke Theorem 22.12(3).
- To locate inflection points: solve and check that 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:
Solution
Solution of Exercise 22.1.
.
Quotient rule: .
Chain rule with : .
Chain rule with : .
Exercise 22.2 ★
Give the equation of the tangent to the curve of at the point of abscissa , and determine the positions of the curve relative to this tangent.
Exercise 22.3 ★
Using the definition of the derivative, compute
Solution
Solution of Exercise 22.3.
Both are difference quotients. With at : , so the limit is . With at : , so the limit is .
Exercise 22.4 ★★
Study the function on its domain: limits, derivative, variation table, local extrema.
Solution
Solution of Exercise 22.4.
Domain . Limits: at , ; at , numerator and denominator , so ; the line is a vertical asymptote.
Hence on and , on and . The function increases to a local maximum , decreases to , jumps to after the asymptote, decreases to a local minimum , then increases.
Exercise 22.5 ★★
A box without a lid is made from a square sheet of cardboard of side cm by cutting equal squares of side from the corners and folding up the sides. Determine maximizing the volume of the box.
Solution
Solution of Exercise 22.5.
For , the box has a square base of side and height , so
. On , , so has the sign of : positive before , negative after. The volume is maximal for cm, giving .
Exercise 22.6 ★★
Let .
- Compute and determine the convexity intervals and inflection points of .
- Show that the tangent at the inflection point of abscissa crosses the curve there.
Solution
Solution of Exercise 22.6.
1. and . Thus on and on (convex), on (concave). changes sign at and at : both are inflection points.
2. At : , , tangent . The gap is
Since , divides ; division gives . Near , , so has the sign of : negative before , positive after. The curve crosses the tangent: is indeed an inflection point.
Exercise 22.7 ★★
Using a tangent line inequality, show that for all ,
and identify when equality holds. (Hint: the square root is concave.)
Exercise 22.8 ★★★
Let be convex and differentiable on , and suppose that vanishes at some point . Show that is the global minimum of on .
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 is horizontal (), of equation . Hence for all : is the global minimum.
Exercise 22.9 ★★★
Show that among all rectangles of fixed perimeter , the square has the largest area. Then show that among all rectangles of fixed area , 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 and () has area . Then vanishes at , positive before and negative after: the maximum is at , where both sides equal — a square.
Fixed area. Sides and give perimeter , with , negative for and positive after: minimum at , a square again.
Relation. The two statements are dual. Suppose a non-square rectangle minimized the perimeter at fixed area ; the square of the same perimeter would have area by the first statement, and shrinking it homothetically to area 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.
- Differentiate: ; ; .
- Give the tangent to at .
- Build the variation table of on (extrema included).
- For : variation table and convexity table (), with the inflection point (Definition 22.13).
- Compute the tangent to at its inflection point, and show that : what does the sign change say about how the tangent meets the curve at an inflection?
Part II — The rescue. Shoreline along the -axis; the lifeguard stands on sand at , the swimmer waits at (meters). The guard runs at m/s on sand, swims at m/s, and enters the water at a point of her choice.
- Model: express the total rescue time , and say why only deserves consideration.
- Differentiate (chain rule at work — twice).
Let be the angle of the running leg with the perpendicular to the shore, that of the swimming leg. Show that and that the condition reads
— Snell’s law, with the two speeds in place of the speeds of light in air and water.
- The straight segment crosses the shore at . Compute , (run along the beach, then swim straight out) and : is the geometric straight line the fastest? Is either extreme strategy?
- Locate the optimal entry point by dichotomy on (it is m): give to the meter and the record time to the tenth of a second. How much does the optimal bend save over the straight line?
- Why is the critical point a global minimum? (Each term of is convex — admit that a sum of convex functions is convex — and apply Exercise 22.8.)
- 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.
- Show that is convex, and prove the midpoint inequality twice: once from convexity, once by expanding .
- Deduce that the quadratic mean dominates the arithmetic mean, and assemble the complete chain of the series — harmonic geometric arithmetic quadratic — verifying all four on , .
- Tangent-below-the-curve: is convex on ; write its tangent at and deduce the inequality for all . Where is it an equality?
- 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 cm with the least metal: surface , constraint .
- Express , differentiate, and compute the optimal radius and height for (millimeter precision).
- Prove the elegant general law: at the optimum, — the ideal can is exactly as tall as it is wide.
- Check 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.
- 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. ; ; .
3. : negative, positive, negative across and : minimum , maximum , with horizontal asymptote on both sides.
4. : increasing, decreasing, increasing across and ; local max , local min . : concave before , convex after: inflection at .
5. Tangent at : slope : . Difference: , which changes sign at : the tangent crosses the curve — the signature behavior at an inflection point, where the curve switches sides.
6. . Entering before or beyond lengthens both legs: pointless.
7. .
8. In the running triangle, the side along the shore is and the hypotenuse : the sine of the angle with the perpendicular is precisely their quotient (opposite over hypotenuse); likewise . Then reads — Snell’s law with speeds and .
9. s; s; s. The straight line loses even to “run all the way, then swim straight” — and both lose to the refracted path.
10. Dichotomy on (negative at , positive at ) converges to m, with 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 (a branch), so is convex, and a critical point of a convex differentiable function is its global minimum (Exercise 22.8): 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. : convex. Convexity at the midpoint: , which is the claim. By hand: .
14. Taking square roots (increasing) in question 13: . Full chain on : harmonic ; geometric ; arithmetic ; quadratic : each mean bows to the next.
15. Tangent to at : value , slope : . Convex curves sit above their tangents (Theorem 22.12): for all , with equality exactly at the contact point .
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, (each day worse than the last); after it, (still growing, but more slowly).
17. gives : cm, and cm.
18. at the optimum: height equals diameter, whatever the volume.
19. : 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 , differentiate, Snell, convexity, one second saved. Can: model , differentiate, , convexity, metal saved. Beam (Problem 12.1): model , differentiate, , table, stiffness gained. And by Fermat’s principle, light itself runs the pipeline at every surface it meets — nature was the first optimizer.