Sums, products, quotients, composite and inverse functions, each rule proved from the definition, including the case that most proofs of the chain rule get wrong.
Computing every derivative from the definition would be hopeless. §114 supplies seven rules that build the derivative of a complicated function from the derivatives of its parts. Together with a handful of standard derivatives (§§117–120) they let us differentiate every function met in this book. Each rule is a theorem about limits, and one of them, the rule for a function of a function, hides a trap that Hardy points out: many textbooks of his day, including the first three editions of his own book, proved it wrongly.
The idea
Throughout, f and F are functions with derivatives f′(x) and F′(x) at the point x in question. Sums are easy: the chord slope of f+F is the sum of the chord slopes of f and F, so the limits add. Products are more interesting. If f and F are positive, think of f(x)F(x) as the area of a rectangle with sides f(x) and F(x).
ExploreThe product rule as a growing rectangle
Try this.Make h smaller and smaller with the lower slider, and watch the three numbers in the read-out. Then move x and repeat.
f(x)=1+x,F(x)=1+21x2: the area of the rectangle is f(x)F(x)
f(x)F(x)
the strips f·δF and F·δf
the corner δf·δF
hδ(fF)=fδF/h2.5+Fδf/h1.5+δfδF/h0.625=4.625
As h→0: the strips tend to fF′=2 and Ff′=1.5, the corner term to 0, so the total tends to f′F+fF′=3.5.
What to notice
The increase of the area is two strips plus a small corner. Divided by h, each strip tends to a finite limit (fF′ and Ff′), but the corner, δf⋅δF/h, tends to 0. The corner is a product of two small increments, and one factor of h is not enough to rescue it. That is why the product rule has two terms, not three.
The same picture explains why (fF)′=f′F′. The product f′F′ would correspond to the corner alone, which is exactly the part that disappears.
Precise statements
Hardy numbers the rules (1) to (7). In each, the conclusion includes the claim that the derivative exists, not just a formula for it.
At any x where f′(x) and F′(x) exist, and k is a constant:
(1) (f+F)′(x)=f′(x)+F′(x);
(2) (kf)′(x)=kf′(x);
(4) if f(x)=0, then (f1)′(x)=−{f(x)}2f′(x);
(5) if F(x)=0, then (Ff)′(x)={F(x)}2f′(x)F(x)−f(x)F′(x).
TheoremProduct ruleHardy: §114 (3)
(fF)′(x)=f′(x)F(x)+f(x)F′(x).
TheoremChain rule (function of a function)Hardy: §114 (6)
Let ϕ(x)=F{f(x)}. If f has a derivative at x and F has a derivative at y=f(x), then ϕ has a derivative at x, and
ϕ′(x)=F′{f(x)}f′(x).
TheoremInverse functionsHardy: §114 (7)
Let ψ be continuous and strictly increasing (or strictly decreasing) on an interval, and let ϕ be its inverse, so that y=ϕ(x) exactly when x=ψ(y). If ψ′(y) exists and is not zero, then ϕ has a derivative at x=ψ(y), and
ϕ′(x)=ψ′(y)1.
The condition ψ′(y)=0 in (7) is essential. For ψ(y)=y3 we have ψ′(0)=0, and the inverse ϕ(x)=3x has a vertical tangent at 0 and no derivative there (Fig. 36 (a)). Reflecting the graph in the line y=x turns a horizontal tangent into a vertical one.
Proofs
Every proof follows the same pattern: write the chord slope of the new function in terms of the chord slopes of the old ones, then use the theorems on limits of sums, products and quotients (§92).
ProofThe product rule
Strategy
Add and subtract a mixed term, f(x+h)F(x), so that the change in fF splits into a change in F alone plus a change in f alone.
Split the increment
f(x+h)F(x+h)−f(x)F(x)=f(x+h){F(x+h)−F(x)}+F(x){f(x+h)−f(x)}. Check by expanding: the mixed terms ±f(x+h)F(x) cancel.
As h→0: f(x+h)→f(x), because f is differentiable and therefore continuous (§112). The two quotients tend to F′(x) and f′(x). So the right side tends to f(x)F′(x)+F(x)f′(x). Continuity of f was essential: it is what makes the “corner” of the rectangle disappear.
∎
ProofThe reciprocal rule
Strategy
Put the difference 1/f(x+h)−1/f(x) over a common denominator, which brings out the chord slope of f.
f(x+h)=0 for small h
f is continuous at x and f(x)=0, so f(x+h) is close to f(x), and in particular not zero, when ∣h∣ is small enough. So 1/f(x+h) is defined for such h.
Common denominator
h1{f(x+h)1−f(x)1}=−hf(x+h)−f(x)⋅f(x+h)f(x)1.
Take limits
The first factor tends to f′(x) and the second to 1/{f(x)}2, again by continuity of f. The quotient rule (5) follows by applying the product rule to f⋅(1/F).
∎
Now the chain rule. The natural argument is short. Put y=f(x) and k=f(x+h)−f(x), so that k→0 as h→0, and write
hϕ(x+h)−ϕ(x)=kF(y+k)−F(y)⋅hk.
The first factor tends to F′(y) and the second to f′(x). The flaw is that we have divided by k, and k may be zero for values of h as small as we please, even though h=0. It happens whenever f takes the value f(x) again, arbitrarily close to x.
ExploreWhen the increment k keeps vanishing
Try this.This is f(x)=x2sin(1/x), with f(0)=0, close to x=0. Move the trace point and find values of h near 0 at which k=f(0+h)−f(0)=f(h) is exactly zero.
y=x2sinx1Hardy: Examples XLIV, 16
xy
x² sin(1/x)
trace point (drag)
At x=0.048: y=0.0021103
Differentiable at 0 with f'(0) = 0, but f' is not continuous there.
What to notice
The curve crosses the axis at h=1/(nπ) for every integer n, infinitely often in every interval around 0. At each of these h the factor {F(y+k)−F(y)}/k is 0/0, so the short proof breaks down. Note that f′(0)=0 here (as in the previous lesson), which is why Hardy’s case (b) is the delicate one.
Hardy repairs the argument by splitting into two cases, according to whether f′(x) is zero.
ProofThe chain rule, carefully
Strategy
If f′(x)=0, then k=0 for all small h=0, and the short proof is valid. If f′(x)=0, the answer should be 0. For h with k=0 the chord slope of ϕ is exactly 0; for h with k=0 it is a bounded factor times the small factor k/h.
k→0 as h→0
f is differentiable at x, hence continuous there, so k=f(x+h)−f(x)→0.
Case (a): f′(x)=0
Since k/h→f′(x)=0, we have k/h=0, and so k=0, for all h=0 with ∣h∣ small enough. For those h the factorisation above is legitimate. As h→0, k→0 through non-zero values, so {F(y+k)−F(y)}/k→F′(y), and the product tends to F′(y)f′(x).
Case (b): f′(x)=0, and h with k=0
Then ϕ(x+h)=F(y+0)=ϕ(x), so the chord slope of ϕ is exactly 0.
Case (b): f′(x)=0, and h with k=0
Here the factorisation is valid. Because {F(y+k)−F(y)}/k→F′(y) as k→0, there is an η>0 such that this quotient has absolute value less than M=∣F′(y)∣+1 whenever 0<∣k∣<η. Given ε>0, choose δ>0 so small that ∣h∣<δ implies both ∣k∣<η and ∣k/h∣<ε/M (possible because k→0 and k/h→0). Then the chord slope of ϕ has absolute value less than M⋅ε/M=ε.
Conclude
In case (b), for 0<∣h∣<δ the chord slope of ϕ is less than ε in absolute value, whether k=0 or not. So ϕ′(x)=0=F′(y)f′(x). Together with case (a), the chain rule holds in every case.
∎
ProofThe inverse-function rule
Strategy
Run the chord backwards. A chord of the graph of ϕ is also a chord of the graph of ψ, with run and rise exchanged, so the slopes are reciprocal. Here, unlike the chain rule, the increment k can never vanish.
Set up the increments
Let x=ψ(y), and for h=0 put ϕ(x+h)=y+k, so that x+h=ψ(y+k). Since ϕ is one-to-one, h=0 forces k=0. Since ϕ is continuous (the inverse of a continuous strictly monotonic function is continuous, §110), k→0 as h→0.
Exchange run and rise
hϕ(x+h)−ϕ(x)=ψ(y+k)−ψ(y)k=1/kψ(y+k)−ψ(y).
Take limits
As h→0, k→0 through non-zero values, so the denominator tends to ψ′(y). Since ψ′(y)=0, the reciprocal tends to 1/ψ′(y).
∎
Now put the rules to work. Each item below is checked against a derivative computed directly from chord slopes, so the widget does not need to know the answer in symbolic form to tell you whether yours is right.
ExploreRule-by-rule drill
Try this.For each function, decide which rule applies, work out the derivative on paper, then click the matching formula. Try the wrong ones too, and read why each is wrong.
1 of 6: differentiate ϕ(x)=x2sinx
xy
φ′(x) from chord slopes
Hint: use the product rule. The dashed curve is the true derivative, found numerically; pick the formula you think matches it.
Right first time: 0 of 0 tried.
What to notice
A correct formula lies exactly on the dashed curve. The typical wrong answers come from three misconceptions: differentiating a product or quotient factor by factor, forgetting the inner derivative in the chain rule, and evaluating the outer derivative at the wrong place.
Worked examples and exercises
Exercise●○○Hardy: §114 (1), (2); Examples XXXV, 1
Prove rules (1) and (2) from the theorems on limits of sums and products.
Hint
Write the chord slope of f+F as the sum of the chord slopes of f and F.
because the limit of a sum is the sum of the limits. Similarly the chord slope of kf is k times the chord slope of f, which tends to kf′(x).
Exercise●○○Hardy: Examples XL, 1
Show that if y=y1y2y3 then y′=y1′y2y3+y1y2′y3+y1y2y3′, and state the result for n factors. Deduce that (zn)′=nzn−1z′, and in particular (xn)′=nxn−1.
Hint
Apply the product rule to (y1y2)⋅y3, then use induction on n.
Solution
(y1y2y3)′=(y1y2)′y3+y1y2y3′=y1′y2y3+y1y2′y3+y1y2y3′. In general, (y1⋯yn)′ is the sum of n terms, the r-th of which is the product with only the factor yr differentiated. The induction step is the product rule applied to (y1⋯yn−1)⋅yn. When all factors equal z, each of the n terms is zn−1z′, so (zn)′=nzn−1z′; with z=x, z′=1 and (xn)′=nxn−1, as in Examples XXXIX, 3.
Exercise●●○Hardy: Examples XL, 2
If y=y1y2⋯yn and no yr vanishes, show that
yy′=y1y1′+y2y2′+⋯+ynyn′.
Use it to differentiate x(x−1)(x−2) quickly.
Hint
Divide the formula of the previous exercise by y.
Solution
Dividing the r-th term y1⋯yr′⋯yn by y=y1⋯yn leaves yr′/yr. Summing gives the formula. For y=x(x−1)(x−2) (where no factor vanishes): y′/y=1/x+1/(x−1)+1/(x−2), so y′=(x−1)(x−2)+x(x−2)+x(x−1)=3x2−6x+2. The result is a polynomial identity, so it holds at the excluded points as well. (The quantity y′/y is called the logarithmic derivative; the name will make sense in Chapter IX.)
ExerciseRoots from the inverse-function rule●●○Hardy: §114 (7)
Use rule (7) to find the derivative of x for x>0 and of 3x for x=0. What does (7) say at x=0?
Hint
y=x is the inverse of x=ψ(y)=y2 on y≥0, and 3x is the inverse of y3.
Solution
For y>0, ψ(y)=y2 is continuous and strictly increasing with ψ′(y)=2y=0. So (x)′=1/(2y)=1/(2x). Similarly ψ(y)=y3 is strictly increasing on the whole line, with ψ′(y)=3y2, which is non-zero for y=0. So (3x)′=1/(3y2)=31x−2/3 for x=0.
At x=0 we have y=0 and ψ′(0)=0, so (7) does not apply, and it could not: 3x has a vertical tangent at 0 and no derivative there. For x at 0, ψ is defined only for y≥0, and again ψ′(0)=0.
Exercise●○○Hardy: Examples XLIV, 10
Show that the derivative of F[f{ϕ(x)}] is F′[f{ϕ(x)}]f′{ϕ(x)}ϕ′(x), and use it to differentiate sin{(1+x2)3}.
Hint
Apply the chain rule twice: first with inner function f{ϕ(x)}, then to that inner function itself.
Solution
Let g(x)=f{ϕ(x)}. By the chain rule, (F∘g)′(x)=F′{g(x)}g′(x), and again by the chain rule g′(x)=f′{ϕ(x)}ϕ′(x). Substituting gives the formula. For sin{(1+x2)3}, take F=sin, f(u)=u3, ϕ(x)=1+x2: the derivative is cos{(1+x2)3}⋅3(1+x2)2⋅2x=6x(1+x2)2cos{(1+x2)3}.
Check yourself
Check yourselfTrue or false?
If neither f nor F has a derivative at x, then f+F has no derivative at x.
Why
False. Take f(x)=∣x∣ and F(x)=−∣x∣: neither is differentiable at 0, but f+F=0 is. The rules say “if the parts are differentiable, so is the combination”; they say nothing in the other direction.
Check yourselfChoose one
What exactly is wrong with the short proof of the chain rule that writes the chord slope of F{f(x)} as kF(y+k)−F(y)⋅hk?
Why
k→0 by continuity of f, and k/h→f′(x) by hypothesis, so the first and third options are wrong. The formula ϕ′(x)=F′(y)f′(x) is correct in every case, including f′(x)=0. The flaw is only in the proof: dividing by k is illegitimate when k=0, which happens infinitely often near 0 for f(x)=x2sin(1/x).
Check yourselfEnter a number
ψ(y)=y3+y is strictly increasing. Let ϕ be its inverse. What is ϕ′(2)? (Note that ψ(1)=2.)
Why
ϕ(2)=1, and ψ′(y)=3y2+1, so ψ′(1)=4=0. By rule (7), ϕ′(2)=1/ψ′(1)=1/4. There is no need to find a formula for ϕ.
Check yourselfChoose one
Which is the derivative of Ff?
Why
Check with f=x, F=1: the quotient is x, with derivative 1. The correct formula gives (1⋅1−x⋅0)/1=1; the second option gives −1. Checking a general rule against a simple special case is a good habit.