The derivative ϕ′ is a function, so we can ask whether it has a derivative. Repeating the process gives the second derivative ϕ′′, the third, and in general the nth, ϕ(n). Second derivatives measure how the slope changes: acceleration in dynamics, bending in geometry, and in §124 they give a test for maxima and minima. The whole sequence of derivatives at a point is the raw material of Taylor’s theorem in Chapter VII. §121 collects the cases where ϕ(n) can be written down for every n, and proves Leibniz’s rule for a product.
The idea
Differentiating twice is just differentiating the derivative. If ϕ(t) is the position of a particle at time t, then ϕ′(t) is its velocity and ϕ′′(t) its acceleration, the rate at which the velocity changes. For most functions the successive derivatives quickly become unmanageable, but a few families follow a visible pattern, and spotting the pattern is the whole skill.
ExploreClimb the ladder of derivatives
Try this.With sinx, step n from 0 up to 4 and watch the purple curve. Then choose x5 and step up to 6, and 1/(1−x2) and step up to 8, watching the scale on the vertical axis.
ϕ(x)=sinx
xy
φ
previous derivative φ
φ⁽1⁾
ϕ(1)(x)=sin(x+21π)=cosx
Each differentiation moves the graph a quarter period (½π) to the left.
What to notice
For sinx each derivative is the previous graph moved a quarter period to the left, so sin(n)x=sin(x+21nπ), and after four steps you are back at the start. A polynomial of degree 5 loses one degree per step and is 0 from the sixth derivative on. For 1/(1−x2) the shape stabilises but the size grows like n!.
Precise statements
DefinitionHigher derivativesHardy: §121
If ϕ′ has a derivative at x, it is called the second derivative of ϕ, written ϕ′′(x), Dx2y or dx2d2y. Inductively, the nth derivativeϕ(n)(x), also written Dxny or dxndny, is the derivative of ϕ(n−1).
The existence of ϕ′′ is a genuinely new assumption. It does not follow from the existence of ϕ′, any more than differentiability follows from continuity. For example ϕ(x)=x∣x∣ has ϕ′(x)=2∣x∣ everywhere, and 2∣x∣ has no derivative at 0.
dxndnxm=m(m−1)⋯(m−n+1)xm−n for rational m (and x=0 if m−n<0). If m is a positive integer and n>m, this is 0.
dxndn(ax+b)m=m(m−1)⋯(m−n+1)an(ax+b)m−n.
dxndnx−α1=(x−α)n+1(−1)nn!, for real or complex α.
dxndnsinx=sin(x+21nπ) and dxndncosx=cos(x+21nπ).
With partial fractions, the third formula gives the nth derivative of any rational function. Differentiating n times is no harder than differentiating once, and this is where Hardy’s preference for partial fractions pays off.
TheoremLeibniz’s theoremHardy: Examples XLV, 7
If u and v have nth derivatives at x, then so does uv, and
The coefficients are the binomial coefficients, exactly as in (a+b)n. The resemblance is no accident. Each differentiation of a product splits every term into two, one with an extra derivative on u and one with an extra derivative on v, just as multiplying by a+b does.
Proofs
Proofsin(n)x=sin(x+21nπ)
Strategy
Induction on n. The only fact needed is that differentiating sin(x+c) gives cos(x+c)=sin(x+c+21π): one differentiation adds 21π to the angle.
Case n=1
(sinx)′=cosx=sin(x+21π).
Inductive step
Suppose sin(n)x=sin(x+21nπ). By the chain rule (the inner function x+c has derivative 1), sin(n+1)x=cos(x+21nπ)=sin(x+21nπ+21π)=sin{x+21(n+1)π}.
Cosine
In the same way cos(x+c)′=−sin(x+c)=cos(x+c+21π), so cos(n)x=cos(x+21nπ).
∎
ProofLeibniz’s theorem
Strategy
Induction on n, as Hardy does. Differentiating the formula for (uv)(n) term by term with the product rule produces each term of the formula for n+1 twice, and the two coefficients add up by Pascal’s rule (rn)+(r−1n)=(rn+1).
Case n=1
(uv)′=u′v+uv′, the product rule, with coefficients (01)=(11)=1.
Differentiate the case n
Assume (uv)(n)=∑r=0n(rn)u(n−r)v(r). Differentiating each term by the product rule gives (rn){u(n+1−r)v(r)+u(n−r)v(r+1)}.
Collect the terms u(n+1−r)v(r)
This product arises from the term with index r (first part) and from the term with index r−1 (second part). So its coefficient is (rn)+(r−1n), with the convention (−1n)=(n+1n)=0 at the ends.
Pascal’s rule
(rn)+(r−1n)=(rn+1). Hence (uv)(n+1)=∑r=0n+1(rn+1)u(n+1−r)v(r), which is the formula for n+1. By induction it holds for all n.
∎
Leibniz’s theorem is most useful when one factor is a polynomial, because then only a few of the n+1 terms are non-zero.
ExploreLeibniz’s theorem with a polynomial factor
Try this.This is x2sinx. Step n from 1 to 8 and read the formula: which binomial coefficients appear, and why only three terms?
ϕ(x)=x2sinx
xy
φ
previous derivative φ
φ⁽1⁾
ϕ(1)=(01)x2sin(1)x+(11)2xsin(0)x+(21)2sin(0)x
Leibniz with u = sin x, v = x²: for n = 1 there are 2 terms, all present. From n = 3 on, v‴ = 0 and only three terms survive.
What to notice
With u=sinx and v=x2, every term with v(r) for r≥3 vanishes, so (x2sinx)(n)=x2sin(x+21nπ)+2nxsin{x+21(n−1)π}+n(n−1)sin{x+21(n−2)π}. The coefficients 1, n and (2n) come from the start of row n of Pascal’s triangle.
Worked examples and exercises
Exercise●○○Hardy: Examples XLV, 1–2
Find the nth derivative of (ax+b)m, and show that it is 0 when m is a positive integer and n>m.
Hint
Differentiate once and twice, and spot the pattern: each step brings down the current exponent and a factor a.
Solution
By the chain rule, {(ax+b)m}′=ma(ax+b)m−1, and again {(ax+b)m}′′=m(m−1)a2(ax+b)m−2. By induction, {(ax+b)m}(n)=m(m−1)⋯(m−n+1)an(ax+b)m−n. If m is a positive integer and n>m, the product m(m−1)⋯(m−n+1) contains the factor m−m=0.
Exercise●●○Hardy: Examples XLV, 4
Prove that the nth derivative of 1−x21 is 21n!{(1−x)−n−1+(−1)n(1+x)−n−1}.
Hint
Split into partial fractions first.
Solution
1−x21=21(1−x1+1+x1). Now (1−x)−1 has nth derivative (−1)(−2)⋯(−n)(−1)n(1−x)−1−n=n!(1−x)−n−1 (the formula for (ax+b)m with a=−1, m=−1: the signs pair off), and (1+x)−1 has nth derivative (−1)nn!(1+x)−n−1. Adding and halving gives the result.
Exercise●○○Hardy: Examples XLV, 11
If y=Acosmx+Bsinmx, show that y′′+m2y=0.
Solution
y′=−mAsinmx+mBcosmx, and y′′=−m2Acosmx−m2Bsinmx=−m2y. (This is the equation of simple harmonic motion: the acceleration is proportional to the displacement and opposite to it.)
Exercise●●●Hardy: Examples XLV, 14
Let u=arctanx. Show that (1+x2)u′′+2xu′=0, and hence find every derivative of u at x=0.
Hint
Start from (1+x2)u′=1 and differentiate. Then differentiate the new equation n times by Leibniz’s theorem and put x=0.
Hint
You should obtain (1+x2)u(n+2)+2(n+1)xu(n+1)+n(n+1)u(n)=0.
Solution
Since u′=1/(1+x2), we have (1+x2)u′=1, and differentiating gives (1+x2)u′′+2xu′=0. Now differentiate n times by Leibniz. In {(1+x2)u′′}(n) only three terms survive: (1+x2)u(n+2)+2nxu(n+1)+n(n−1)u(n). In {2xu′}(n) only two: 2xu(n+1)+2nu(n). Adding,
(1+x2)u(n+2)+2(n+1)xu(n+1)+n(n+1)u(n)=0.
At x=0: u(n+2)(0)=−n(n+1)u(n)(0). Since u(0)=0, all even derivatives vanish at 0. Since u′(0)=1, we get u′′′(0)=−2, u(5)(0)=−3⋅4⋅(−2)=24, and in general u(2k+1)(0)=(−1)k(2k)!. (These are exactly the coefficients that will give the series arctanx=x−31x3+51x5−… in Chapter IX.)
Exercisenth derivative of a complex partial fraction●●○Hardy: Examples XLV, 3
Find the nth derivative of 1+x21 by splitting it as 2i1(x−i1−x+i1), and check the case n=1.
Solution
The splitting is correct: x−i1−x+i1=x2+12i. By the formula for 1/(x−α) with α=±i (valid for complex α, §115),
dxndn1+x21=2i(−1)nn!{(x−i)n+11−(x+i)n+11}.
For n=1: −2i1⋅(x2+1)2(x+i)2−(x−i)2=−2i1⋅(x2+1)24ix=−(1+x2)22x, which is correct. The bracket is 2i times the imaginary part of (x−i)−n−1, so the answer is real, as it must be. Hardy’s Examples XLV, 15 turns this into a formula in terms of sin and cos of an angle.
Check yourself
Check yourselfEnter a number
What is the 7th derivative of sinx at x=0?
Why
sin(7)x=sin(x+27π), and sin27π=sin(23π+2π)=−1. Equivalently, the derivatives cycle with period 4: sin,cos,−sin,−cos, and 7=4+3 gives −cosx, which is −1 at 0.
Check yourselfTrue or false?
If ϕ′(x) exists for every x, then ϕ′′(x) exists for every x.
Why
False. ϕ(x)=x∣x∣ has derivative 2∣x∣ everywhere, which has a corner at 0. Worse, x2sin(1/x) has a derivative everywhere that is not even continuous at 0 (§125).
Check yourselfChoose one
What is (uv)′′?
Why
Leibniz with n=2: the coefficients are 1,2,1. Directly: (uv)′=u′v+uv′, and differentiating again gives u′′v+u′v′+u′v′+uv′′. The two middle terms come from differentiating each of the two terms once more.
Check yourselfEnter a number
What is the 10th derivative of (3x+1)9?
Why
It is a polynomial of degree 9; its 9th derivative is the constant 9!⋅39, and the 10th derivative is 0.
Hardy’s language
Summary
Summary
ϕ′′ is the derivative of ϕ′, and ϕ(n) of ϕ(n−1). Each exists only if the previous one is differentiable.