Unit 3, lesson 28

Higher-Order Derivatives

How to differentiate a derivative again, what second and third derivatives mean for motion, how to differentiate a product many times, and what smoothness classes measure.

  • Theory part 55
  • Practice part 56
  • Differentiation Rules

Theory, part 55

Practice, part 56

A derivative is itself a function, so you can ask how fast it changes. For a car, velocity is the rate of change of position, and acceleration is the rate of change of velocity. When you press the brake harder, the acceleration itself changes, and that rate has a name too. Repeating differentiation gives a whole ladder of functions, each describing how the one before it changes.

Key terms

Second derivative

Definition Suppose ff is differentiable on an open interval containing aa. If the derivative f′f' is itself differentiable at aa, the second derivative of ff at aa is

f′′(a)=(f′)′(a)=lim⁡h→0f′(a+h)−f′(a)h.f''(a) = (f')'(a) = \lim_{h \to 0} \frac{f'(a + h) - f'(a)}{h}.

Then ff is called twice differentiable at aa.

In plain words The second derivative measures how fast the slope is changing. A positive f′′f'' means the slope is going up as you move right.

Example For f(x)=x4−3x2f(x) = x^4 - 3x^2 the first derivative is f′(x)=4x3−6xf'(x) = 4x^3 - 6x, and differentiating again gives f′′(x)=12x2−6f''(x) = 12x^2 - 6. So f′′(1)=6f''(1) = 6 and f′′(0)=−6f''(0) = -6.

Higher derivatives defined recursively

Definition Set f(0)=ff^{(0)} = f. For n≥1n \ge 1, if f(n−1)f^{(n-1)} is defined on an open interval containing aa and is differentiable at aa, the nnth derivative of ff at aa is

f(n)(a)=(f(n−1))′(a).f^{(n)}(a) = \left(f^{(n-1)}\right)'(a).

A function is nn times differentiable on an open interval II if f(n)(x)f^{(n)}(x) exists for every xx in II.

In plain words To get the nnth derivative, differentiate nn times in a row, one step at a time. Often a pattern shows up after a few steps and lets you jump ahead.

Example The derivatives of sin⁡x\sin x repeat with period 4.

nn0011223344
f(n)(x)f^{(n)}(x)sin⁡x\sin xcos⁡x\cos x−sin⁡x-\sin x−cos⁡x-\cos xsin⁡x\sin x

Since 27=4⋅6+327 = 4 \cdot 6 + 3, the 27th derivative of sin⁡x\sin x is −cos⁡x-\cos x. For a polynomial the ladder ends. If f(x)=x5f(x) = x^5 then f(5)(x)=5!=120f^{(5)}(x) = 5! = 120 and f(6)(x)=0f^{(6)}(x) = 0.

Notation

Definition For y=f(x)y = f(x) the common notations for higher derivatives are

f′′(x)=y′′=d2ydx2=D2f(x),f′′′(x)=y′′′=d3ydx3,f(n)(x)=y(n)=dnydxn.f''(x) = y'' = \frac{d^2 y}{dx^2} = D^2 f(x), \qquad f'''(x) = y''' = \frac{d^3 y}{dx^3}, \qquad f^{(n)}(x) = y^{(n)} = \frac{d^n y}{dx^n}.

Primes are used up to the third derivative. From the fourth on, the order goes in parentheses, f(4)f^{(4)}, to avoid confusion with a power f4f^4.

In plain words The Leibniz form d2ydx2\frac{d^2 y}{dx^2} reads as “differentiate twice with respect to xx”. The 2 sits on dd in the top and on xx in the bottom because it counts the steps, not a power of xx.

Example For y=1xy = \frac{1}{x} with x≠0x \neq 0,

dydx=−x−2,d2ydx2=2x−3,d3ydx3=−6x−4,\frac{dy}{dx} = -x^{-2}, \qquad \frac{d^2 y}{dx^2} = 2x^{-3}, \qquad \frac{d^3 y}{dx^3} = -6x^{-4},

and in general, for every n≥1n \ge 1,

dnydxn=(−1)nn! x−(n+1).\frac{d^n y}{dx^n} = (-1)^n n! \, x^{-(n+1)}.

Acceleration and jerk

Definition If s(t)s(t) is the position of an object moving along a line at time tt, then its velocity is v(t)=s′(t)v(t) = s'(t), its acceleration is

a(t)=v′(t)=s′′(t),a(t) = v'(t) = s''(t),

and its jerk is j(t)=a′(t)=s′′′(t)j(t) = a'(t) = s'''(t), whenever these derivatives exist.

In plain words Acceleration tells you how quickly the velocity changes. Jerk tells you how quickly the acceleration changes, which is what you feel as a sudden lurch in a train or an elevator.

Example Let s(t)=t3−6t2+9ts(t) = t^3 - 6t^2 + 9t meters after tt seconds. Then v(t)=3t2−12t+9v(t) = 3t^2 - 12t + 9, a(t)=6t−12a(t) = 6t - 12 and j(t)=6j(t) = 6. At t=1t = 1 the object is momentarily at rest, v(1)=0v(1) = 0, but its acceleration is a(1)=−6a(1) = -6 meters per second squared, so it is about to move backwards.

Higher derivatives of products

Definition If ff and gg are nn times differentiable on an open interval II, then so is fgfg, and on II

(fg)(n)=∑k=0n(nk)f(k)g(n−k).(fg)^{(n)} = \sum_{k=0}^{n} \binom{n}{k} f^{(k)} g^{(n-k)}.

This is the general Leibniz rule. For n=2n = 2 it reads

(fg)′′=f′′g+2f′g′+fg′′.(fg)'' = f''g + 2f'g' + fg''.

In plain words The pattern is the same as in the binomial expansion of (a+b)n(a + b)^n, with powers replaced by numbers of derivatives. It is proved by applying the product rule repeatedly.

Example Take f(x)=x2f(x) = x^2 and g(x)=exg(x) = e^x with n=3n = 3. Since f′=2xf' = 2x, f′′=2f'' = 2 and f′′′=0f''' = 0, while every derivative of gg is exe^x,

(x2ex)′′′=x2ex+3⋅2xex+3⋅2ex+0=(x2+6x+6)ex.(x^2 e^x)''' = x^2 e^x + 3 \cdot 2x e^x + 3 \cdot 2 e^x + 0 = (x^2 + 6x + 6)e^x.

Smoothness classes

Definition Let II be an open interval. The class C0(I)C^0(I) is the set of functions continuous on II. For k≥1k \ge 1, Ck(I)C^k(I) is the set of functions that are kk times differentiable on II with f(k)f^{(k)} continuous on II. The class C∞(I)C^\infty(I) is the set of functions with derivatives of every order on II. These classes are nested,

C∞(I)⊂⋯⊂C2(I)⊂C1(I)⊂C0(I).C^\infty(I) \subset \cdots \subset C^2(I) \subset C^1(I) \subset C^0(I).

In plain words The class number says how many times you can differentiate and still get a continuous function. Polynomials, exe^x, sin⁡x\sin x and cos⁡x\cos x are in C∞(R)C^\infty(\mathbb{R}).

Example Let f(x)=x∣x∣f(x) = x \lvert x \rvert. For x>0x > 0, f(x)=x2f(x) = x^2 and f′(x)=2xf'(x) = 2x. For x<0x < 0, f(x)=−x2f(x) = -x^2 and f′(x)=−2xf'(x) = -2x. At 00 the difference quotient is

f(h)−f(0)h=h∣h∣h=∣h∣→0as h→0,\frac{f(h) - f(0)}{h} = \frac{h \lvert h \rvert}{h} = \lvert h \rvert \to 0 \quad \text{as } h \to 0,

so f′(0)=0f'(0) = 0. Hence f′(x)=2∣x∣f'(x) = 2\lvert x \rvert for every xx, which is continuous but has a corner at 00, so f′′(0)f''(0) does not exist. Therefore ff is in C1(R)C^1(\mathbb{R}) but not in C2(R)C^2(\mathbb{R}).

Check yourself

  1. Find f′′(x)f''(x) for f(x)=ln⁡xf(x) = \ln x, x>0x > 0.
Show the answer

The first derivative is f′(x)=1x=x−1f'(x) = \frac{1}{x} = x^{-1}, so f′′(x)=−x−2=−1x2f''(x) = -x^{-2} = -\frac{1}{x^2}.

  1. What is the 100th derivative of e2xe^{2x}?
Show the answer

Each differentiation multiplies by 2, so

d100dx100e2x=2100e2x.\frac{d^{100}}{dx^{100}} e^{2x} = 2^{100} e^{2x}.
  1. A particle has position s(t)=t4s(t) = t^4. Find its acceleration and jerk at t=2t = 2.
Show the answer

Differentiating gives s′=4t3s' = 4t^3, then s′′=12t2s'' = 12t^2 and s′′′=24ts''' = 24t, so a(2)=48a(2) = 48 and j(2)=48j(2) = 48.

How this lesson connects