How fast does a function change? The answer at a single point is the derivative, the single most useful number in all of applied mathematics. This chapter constructs it from average rates of change, computes it for the reference functions, and uses its sign to read the variations of a function. Everything here is extended and deepened in Chapter 22.
12.1 The average rate of change
Definition 12.1(Average rate of change)
Let f be defined on an intervalI, and a=b in I. The average rate of change of f between a and b is
b−af(b)−f(a).
It is the slope of the secant line through the points (a,f(a)) and (b,f(b)) of the curve.
Example 12.2
A car travels 140 km between 2 p.m. and 4 p.m.: its average speed is 2140=70 km/h. The speedometer, however, displays an instantaneous speed at every moment — that is exactly the notion that the derivative makes precise.
If r(h) approaches a single fixed number as h gets arbitrarily close to 0, we say that f is differentiable at a; this number is the derivative of f at a, written f′(a):
As h approaches 0, this approaches 2: the functionx2 is differentiable at 1 and f′(1)=2. Note the strategy: simplify the quotient until h no longer appears in a denominator, then let h→0.
Example 12.5(A non-differentiable point)
Let f(x)=∣x∣ and a=0. Then hf(h)−f(0)=h∣h∣, which equals 1 for h>0 and −1 for h<0: no single number is approached, and ∣x∣ is not differentiable at 0. Its curve has a corner there.
12.3 The tangent line
Definition 12.6(Tangent)
If f is differentiable at a, the tangent to the curve at the point A=(a,f(a)) is the line through A with slopef′(a). Its equation is
y=f(a)+f′(a)(x−a).
The tangent is the limiting position of the secants through A: as h→0, the second point (a+h,f(a+h)) slides along the curve towards A, and the secant’s slopehf(a+h)−f(a) approaches f′(a).
The secant through A and B=(a+h,f(a+h)) has slopehf(a+h)−f(a). As B slides towards A, the secant tilts into the tangent, whose slope is f′(a).
General power. The pattern 2a, 3a2 continues: expanding(a+h)n, the terms after an+nan−1h all carry h2, so the rate tends to nan−1. (A complete induction is given in Chapter 22.) ∎
12.5 Differentiation rules
Theorem 12.9(Operations)
Let u and v be differentiable on I and λ∈R. Then u+v, λu, uv are differentiable on I, as is vu wherever v=0, and
If f′>0 on I (except possibly at finitely many points where it vanishes), then f is strictly increasing on I.
Proof. The intuition is clear — a curve whose tangents all point upward must climb — but a rigorous proof needs the mean value theorem. The result is admitted at this level; see Theorem 22.7. ∎
Proposition 12.12(Extrema)
If f′ changes sign at a from + to −, then f has a local maximum at a; from − to +, a local minimum. At such a point, f′(a)=0 and the tangent is horizontal.
Proof. If f′≥0 on an interval ending at a and f′≤0 on an interval starting at a, then f increases up to f(a) and decreases afterwards (Theorem 12.11): f(a) is largest nearby. Since f′ changes sign at a and is defined there, f′(a)=0. ∎
Method 12.13(Studying a function)
Compute f′(x) and simplify it — ideally into a factored form.
Determine the sign of f′(x) on each interval (for a quadratic f′, use Theorem 10.11).
Record the results in a variation table: one row for the sign of f′, one row of arrows for f, with the values of f at the turning points.
Conclude: extrema, number of solutions of f(x)=k, inequalities.
Example 12.14
Study f(x)=x3−3x+1 on R. First, f′(x)=3x2−3=3(x−1)(x+1): a quadratic with roots−1 and 1, positive outside them. So f is increasing on (−∞,−1], decreasing on [−1,1], increasing on [1,+∞), with a local maximumf(−1)=−1+3+1=3 and a local minimumf(1)=1−3+1=−1.
The curve of f(x)=x3−3x+1 (Example 12.14): horizontal tangents (orange) at the local maximum(−1,3) and the local minimum(1,−1), where f′ changes sign.
Example 12.15(Optimization)
An open box is made from a 12×12 cm sheet by cutting a square of side x from each corner and folding. Its volume is V(x)=x(12−2x)2 for 0<x<6. Expanding, V(x)=4x3−48x2+144x, so
V′(x)=12x2−96x+144=12(x2−8x+12)=12(x−2)(x−6).
On (0,6), the factor x−6 is negative, so V′(x) has the sign of −(x−2): positive before 2, negative after. The volume is maximal for x=2 cm, giving V(2)=2×82=128 cm3.
12.7 Exercises
Exercise 12.1★
Using the definition (rate of change, then h→0), compute f′(2) for f(x)=x2, then g′(1) for g(x)=x2+3x.
Study the variations of f(x)=x3−6x2+9x−2 on R (variation table, local extrema).
Solution
Solution of Exercise 12.5.
f′(x)=3x2−12x+9=3(x2−4x+3)=3(x−1)(x−3): positive outside [1,3], negative inside. So f is increasing on (−∞,1], decreasing on [1,3], increasing on [3,+∞), with a local maximumf(1)=1−6+9−2=2 and a local minimumf(3)=27−54+27−2=−2.
For x>−1, both x+3 and (x+1)2 are positive, so f′(x) has the sign of x−1: f is decreasing on (−1,1] and increasing on [1,+∞), with minimumf(1)=24=2.
Exercise 12.7★★
Let f(x)=x2−4x+5.
Find the point of the curve where the tangent is horizontal.
Find the point(s) where the tangent is parallel to the line y=2x+1.
Solution
Solution of Exercise 12.7.
f′(x)=2x−4.
1. Horizontal tangent: f′(x)=0 at x=2; the point is (2,f(2))=(2,1) (the vertex of the parabola).
2. Parallel to y=2x+1 means slope2: 2x−4=2, so x=3, giving the point (3,f(3))=(3,2).
Exercise 12.8★★
A rectangular enclosure is built against a wall with 60 m of fence (three sides). Express the area as a function of the width x, and use the derivative to find the dimensions of maximal area. (Compare with the vertex method of Chapter 10.)
Solution
Solution of Exercise 12.8.
With width x (two fenced sides) and length 60−2x: A(x)=x(60−2x)=60x−2x2 on (0,30). Then A′(x)=60−4x, positive before x=15 and negative after: the area is maximal for x=15, giving a 15×30 m enclosure of area 450 m2. The vertex formula α=−2×(−2)60=15 of Chapter 10 gives the same answer without calculus.
Exercise 12.9★★
Show that for all x>0, x≤2x+1, by studying the functionf(x)=2x+1−x on (0,+∞).
Solution
Solution of Exercise 12.9.
Let f(x)=2x+1−x on (0,+∞). Then
f′(x)=21−2x1=2xx−1,
which has the sign of x−1: negative on (0,1), positive on (1,+∞). So f decreases then increases, with minimumf(1)=1−1=0. Hence f(x)≥0 for all x>0, that is x≤2x+1, with equality only at x=1.
Exercise 12.10★★
A cylindrical can must hold 500 cm3. Its surface area (two disks plus the side) is S=2πr2+2πrh with πr2h=500. Express S as a function of r alone, and show that S′(r)=4πr−r21000. Deduce the radius that minimizes the surface, as an exact expression.
S′(r)=0 when 4πr3=1000, i.e. r3=π250, so r=3250/π (≈4.3 cm). Since S′(r)=r24πr3−1000 is negative before this value and positive after, it is a minimum.
Exercise 12.11★★★
How many tangents to the parabolay=x2 pass through the external point P(1,−3)? Determine their equations. (Let a be the abscissa of the contact point and express that the tangent at a passes through P.)
Solution
Solution of Exercise 12.11.
The tangent to y=x2 at the point of abscissaa is y=a2+2a(x−a)=2ax−a2. It passes through P(1,−3) when −3=2a−a2, i.e. a2−2a−3=0, whose roots are a=3 and a=−1 (Δ=16). There are therefore twotangents through P:
From Example 12.14, f increases up to the local maximumf(−1)=3, decreases to the local minimumf(1)=−1, then increases again; for x large positive (resp. negative), x3 dominates and f takes arbitrarily large (resp. small) values. Reading horizontal lines y=k across the variation table:
k>3 or k<−1: the line meets the curve once — 1 solution;
k=3 or k=−1: the line touches a turning point and crosses one other branch — 2 solutions;
−1<k<3: the line crosses all three branches — 3 solutions.
12.8 Problem: The tangent’s three jobs
Problem 12.1
Weekend problem — the parabolic mirror proved, Newton’s root-finding machine, and the strongest beam in the log
A derivative draws tangents; that sounds like a modest talent. This problem shows the tangent holding three jobs at once: it proves the headlight theorem left pending in Problem 10.1 (every ray parallel to a parabola’s axis reflects through the focus), it powers the fastest equation-solving algorithm in common use — inside every calculator and neural network — and it finds the strongest rectangular beam that a round log can yield.
Differentiate f(x)=3x2−5x+1 and g(x)=x3−12x (Theorem 12.9); and recover (x2)′ at x=1 from the definition (rate of change, then h→0).
Find the tangent to y=x3−12x at a=2. What is special about it, and what does that signal (Proposition 12.12)?
Establish the general tangent to the parabolay=x2 at the point (a,a2):
y=2ax−a2.
Where does that tangent cross the y-axis? Deduce the draftsman’s recipe: to draw the tangent at a point P of height h on the parabola, join P to the point of the axis at depth … below the origin. State it.
Build the complete variation table of g(x)=x3−12x (sign of g′, local extrema and their values, Method 12.13).
Part II — The mirror theorem. Let P(a,a2) be a point of the parabolay=x2 (take a=0), F(0,41) the focus, and T the point where the tangent at P crosses the y-axis (question 4). Recall from Problem 10.1 that PF=a2+41.
Compute the distance FT.
Conclude that the triangle FPT is isosceles at F. Which two angles are therefore equal?
The incoming ray through P, parallel to the axis, is parallel to the line (TF) (both vertical). Using alternate angles, show that the tangent at P makes equal angles with the incoming vertical ray and with the segment [PF].
Physics: light reflects off a curve as off its tangent, leaving at the same angle it arrived (the law of reflection). Conclude the mirror theorem: every ray parallel to the axis reflects through the focus — and, reversing time, a bulb at the focus beams out parallel light. The dish and the headlight of Problem 10.1 are now theorems.
Check the isosceles triangle numerically at a=1: compute T, FP and FT.
Part III — Newton’s machine. To solve f(x)=0, Newton proposed: start from a guess x0, follow the tangent at x0 down to the axis, and let its x-intercept be the next guess.
Derive the formula of the method:
xn+1=xn−f′(xn)f(xn).
Run it on f(x)=x2−2 from x0=1: compute x1, x2, x3 as exact fractions. Which two-thousand-year-old sequence — and which machine from Problem 3.1 — have you just rebuilt? Prove the identity behind the coincidence:
x−2xx2−2=21(x+x2).
Solve x3=100 (the savings crossover of Problem 4.1): apply two Newton steps to f(x)=x3−100 from x0=5 (four decimals), and compare with the calculator’s 3100.
Sabotage: try to launch the method on f(x)=x3−12x at x0=2. What goes wrong, and why (question 2)? State the practical caveat.
In question 12 the correct decimals went roughly 1→3→6. Compare with bisection (halving an interval each step) and say in one sentence why calculators, GPS receivers and neural-network training all run on Newton’s idea.
Part IV — The strongest beam. A rectangular beam of width w and depth d is sawn from a round log of diameter 30 cm, so w2+d2=900. A beam’s stiffness is proportional to wd2 (depth counts twice: joists stand on edge!).
Express the stiffness as a function of w alone: S(w)=900w−w3, on which interval?
Differentiate, build the variation table, and find the optimal w and d (exact values, then to the millimeter).
Show that the optimal proportions satisfy d=w2 — the old carpenters’ ratio. (Bonus lore: dividing the log’s diameter in three equal parts and raising perpendiculars to the circle constructs exactly this rectangle.)
The naive choice is the square beam (w=d). Compute its stiffness and the optimal beam’s, and give the carpenter’s gain in percent.
Finale — the tangent’s three jobs, one sentence each: geometry (the mirror theorem), numerics (Newton’s machine), optimization (the beam), all powered by the same object. And the forward pointer: grade 12 adds convexity — the tangent’s side of the curve — to sharpen all three.
Solution
Solution of Problem 12.1.
1.f′(x)=6x−5; g′(x)=3x2−12. Definition: h(1+h)2−1=2+h→2: the derivative of x2 at 1 is 2.
2.g(2)=8−24=−16 and g′(2)=12−12=0: the tangent is the horizontal line y=−16. A horizontal tangent signals a critical point — here a local minimum, as the variation table of question 5 confirms.
4. At x=0: y=−a2: the tangent crosses the axis at depth a2 below the origin — exactly as far below zero as P sits above it. Recipe: to draw the tangent at a point of height h, join it to the axis point at depth h below the origin. (No derivative needed at the drawing board.)
5.g′(x)=3(x2−4): positive on (−∞,−2), negative on (−2,2), positive beyond. g increases to a local maximumg(−2)=16, falls to a local minimumg(2)=−16, then increases.
6.F(0,41) and T(0,−a2): FT=41+a2.
7.FP=a2+41=FT: isosceles at F, so the base angles are equal: FTP=FPT.
8. The incoming ray at P is vertical, hence parallel to the line (TF) (the y-axis). The tangent(TP) crosses both parallels, so the angle between the ray and the tangent equals FTP (alternate angles) — which equals FPT, the angle between [PF] and the tangent. Equal angles on the two sides of the tangent at P.
9. By the law of reflection, the ray arriving vertically at P leaves along the line making the equal angle on the other side — by question 8, along [PF]: through the focus, whatever a is. Reversed, light born at F leaves every point of the mirror parallel to the axis. Dishes collect, headlights beam: proved.
10.a=1: tangenty=2x−1, T(0,−1); FP=1+(1−41)2=1625=45; FT=41+1=45: isosceles, as promised.
11. The tangent at xn is y=f(xn)+f′(xn)(x−xn); it crosses y=0 where x=xn−f′(xn)f(xn).
12.x1=1−2−1=23; x2=23−31/4=1217; x3=408577: Heron’s approximations of 2, i.e. the fixed-point machine of Problem 3.1. Identity: x−2xx2−2=2x2x2−x2+2=2xx2+2=21(x+x2) — Heron’s recipe is Newton’s method applied to x2−2, two millennia early.
13.x1=5−75125−100=314≈4.6667; x2≈4.6667−65.331.63≈4.6417. Calculator: 3100=4.6416… — four correct decimals in two steps.
14.f′(2)=0: the tangent at the starting point is horizontal (question 2) and never crosses the axis — the formula divides by zero. Caveat: start Newton away from critical points (and, more generally, close enough to the root you want).
15. Bisection gains one binary digit per step; Newton roughly doubles the number of correct digits each step (1→3→6 here). When each step is costly — millions of parameters, real-time navigation — doubling beats inching, which is why the tangent line runs inside so much silicon.
16.d2=900−w2, so S(w)=w(900−w2)=900w−w3, for 0<w<30.
17.S′(w)=900−3w2=0 at w=300=103≈17.3 cm (S′>0 before, <0 after: a maximum). Then d=600=106≈24.5 cm.
18.w2d2=300600=2, so d=w2: depth is width times 2 — the carpenter’s ratio (and the diameter-in-thirds construction delivers it with a compass, no algebra on site).
19. Square beam: w=d=450≈21.2 cm, stiffness w3=4503/2≈9546. Optimal beam: S=103×600=60003≈10392. Gain: about 8.9% stiffer from the same log — the derivative pays for the sawmill.
20. Geometry: the tangent’s equal angles turned a paraboloid into a light-gatherer. Numerics: sliding down tangents solves equations at digit-doubling speed. Optimization: a vanishing derivative found the log’s strongest rectangle. One object, three trades — and grade 12’s convexity will tell, in addition, on which side of every tangent the curve lies.