Calculus · Differential Calculus
The derivative of a function is itself a function, so nothing stops us from differentiating it again. The second derivative tells us about acceleration and curvature, and higher derivatives are the building blocks of Taylor series. This post covers how to compute them, including Leibniz's formula for products and the formulas for curves given in parametric form.
Notation: the first three are usually written with primes, \(y', y'', y'''\); from the fourth on, with the order in brackets, \(y^{(4)}, y^{(5)}, \dots\) (brackets, so that \(y^{(4)}\) isn't confused with the power \(y^4\)). In Leibniz's notation, \( y'' = \frac{d^2y}{dx^2} \) and \( y^{(n)} = \frac{d^ny}{dx^n} \).
For many functions, a pattern appears after a few derivatives. The technique: compute the first three or four, guess the pattern, and confirm it by induction.
| Function | n-th derivative |
|---|---|
| \( x^m \) | \( m(m-1)\cdots(m-n+1)\,x^{m-n} \) |
| \( e^{ax} \) | \( a^ne^{ax} \) |
| \( \sin x \) | \( \sin\big(x + \frac{n\pi}{2}\big) \) |
| \( \cos x \) | \( \cos\big(x + \frac{n\pi}{2}\big) \) |
| \( \frac{1}{x} \) | \( \frac{(-1)^nn!}{x^{n+1}} \) |
The product rule gives \( (uv)' = u'v + uv' \). Differentiate once more:
\[ (uv)'' = u''v + 2u'v' + uv'', \qquad (uv)''' = u'''v + 3u''v' + 3u'v'' + uv'''. \]The coefficients \(1, 2, 1\) and \(1, 3, 3, 1\) are rows of Pascal's triangle, exactly as in \((a + b)^2\) and \((a + b)^3\). This is no accident.
Memory aid: expand \((u + v)^n\) with the binomial theorem, then turn powers into orders of derivatives (\(u^{n-k}v^k \to u^{(n-k)}v^{(k)}\), with \(u^{(0)} = u\)). The proof is by induction, using the product rule and the Pascal identity \( \binom nk + \binom n{k-1} = \binom{n+1}k \), the same argument that proves the binomial theorem.
When it is most useful: when one factor is a polynomial. A polynomial of degree \(m\) has only \(m + 1\) non-zero derivatives, so the sum stops after \(m + 1\) terms, however large \(n\) is.
Many curves are easier to describe with a parameter \(t\) (often time) than as \(y = f(x)\):
\[ x = \varphi(t), \qquad y = \psi(t). \]We'll write derivatives with respect to \(t\) with dots (Newton's notation), common in physics:
\[ \dot x = \frac{dx}{dt},\quad \dot y = \frac{dy}{dt},\quad \ddot x = \frac{d^2x}{dt^2},\quad \ddot y = \frac{d^2y}{dt^2}. \]From the previous posts, the first derivative is a quotient of differentials:
\[ y'_x = \frac{dy}{dx} = \frac{dy/dt}{dx/dt} = \frac{\dot y}{\dot x}. \]The key point for the second derivative: \(y'_x\) is again given as a function of \(t\). So we apply the same rule to it: differentiate with respect to \(t\), then divide by \(\dot x\).
Derivation of the compact form: \( \frac{d}{dt}\left(\frac{\dot y}{\dot x}\right) = \frac{\ddot y\,\dot x - \dot y\,\ddot x}{\dot x^2} \); dividing by \(\dot x\) gives the cube in the denominator.
The third (and every higher) derivative follows the same pattern:
\[ y'''_x = \frac{\dfrac{d(y''_x)}{dt}}{\dfrac{dx}{dt}}, \quad \text{etc.} \]Check: the upper half of the circle is \( y = \sqrt{a^2 - x^2} \), with \( y'' = -\frac{a^2}{(a^2 - x^2)^{3/2}} \). Substituting \( a^2 - x^2 = a^2\sin^2t \) gives \( -\frac{a^2}{a^3\sin^3t} \), the same. Negative, as it should be: the upper half-circle bends downward.
If \(x\) is the independent variable, then \(dx = \Delta x\) is a fixed increment that does not depend on \(x\). So when we differentiate again, \(dx\) behaves like a constant: \( d^2x = d^3x = \cdots = d^nx = 0 \), and
\[ d^2y = d(y'\,dx) = dx\cdot d(y') = dx\cdot y''\,dx = y''\,dx^2. \]Continuing in the same way:
This formula justifies Leibniz's notation \( \frac{d^ny}{dx^n} \): the \(n\)-th derivative is literally the quotient of the \(n\)-th differential of \(y\) by the \(n\)-th power of \(dx\).
Using the formula \( y''dx^2 \) alone: \( 2\cdot(2t\,dt)^2 = 8t^2\,dt^2 \), which is wrong.
With the correction: \( y'\,d^2x = 2x\cdot 2\,dt^2 = 4t^2\,dt^2 \), and \( 8t^2\,dt^2 + 4t^2\,dt^2 = 12t^2\,dt^2 \). ✓
| Concept | Formula |
|---|---|
| n-th derivative | \( y^{(n)} = \big\{y^{(n-1)}\big\}' \) |
| Leibniz's formula | \( (uv)^{(n)} = \sum_{k=0}^n \binom nk u^{(n-k)}v^{(k)} \) |
| Parametric, 1st derivative | \( y'_x = \frac{\dot y}{\dot x} \) |
| Parametric, 2nd derivative | \( y''_x = \frac{\dot x\ddot y - \ddot x\dot y}{\dot x^3} \) |
| Parametric, higher | \( y^{(n)}_x = \frac{d\big(y^{(n-1)}_x\big)/dt}{dx/dt} \) |
| Higher differentials | \( d^ny = d(d^{n-1}y) \) |
| \(x\) independent | \( d^ny = y^{(n)}dx^n,\ \ y^{(n)} = \frac{d^ny}{dx^n} \) |
| \(x\) dependent | \( d^2y = y''dx^2 + y'd^2x \) |
Try these before opening the solution. More solved problems are in Differential Calculus.
\( y' = 5x^4 - 9x^2 \), \( y'' = 20x^3 - 18x \), \( y''' = 60x^2 - 18 \).
\( y' = \frac{1}{(1-x)^2} \), \( y'' = \frac{2}{(1-x)^3} \), \( y''' = \frac{6}{(1-x)^4} \), so \( y^{(n)} = \dfrac{n!}{(1 - x)^{n+1}} \).
\( (xe^x)^{(n)} = x\,e^x + n\cdot 1\cdot e^x = e^x(x + n) \).
All terms contain a power of \(x\) except the one where \(x^3\) is differentiated three times: \( \binom{20}{3}\cdot 6\cdot\cos\big(x + \frac{17\pi}{2}\big) \). At \(x = 0\): \( \cos\frac{17\pi}{2} = \cos\frac{\pi}{2} = 0 \). So the value is \(0\). (Makes sense: \(x^3\cos x\) is odd, and even-order derivatives of odd functions vanish at \(0\).)
\( \dot x = 2t \), \( \dot y = 3t^2 \), \( \ddot x = 2 \), \( \ddot y = 6t \): \( y''_x = \dfrac{2t\cdot 6t - 2\cdot 3t^2}{(2t)^3} = \dfrac{6t^2}{8t^3} = \dfrac{3}{4t} \). Check: \( y = x^{3/2} \) (for \(t > 0\)), \( y'' = \frac34x^{-1/2} = \frac{3}{4t} \). ✓
\( d^2y = (\sin x)''\,dx^2 = -\sin x\,dx^2 \).
\( y' = -A\sin x + B\cos x \), \( y'' = -A\cos x - B\sin x = -y \). Hence \( y'' + y = 0 \). (This is the equation of a harmonic oscillator, such as a mass on a spring.)
Higher derivatives are just the first derivative applied repeatedly, but they unlock new information: acceleration, curvature, and (later) Taylor polynomials, which approximate functions using \(f', f'', f''', \dots\). The two tools worth remembering from this post are Leibniz's formula, which turns a long chain of product rules into a single binomial-style sum, and the parametric rule: differentiate with respect to \(t\), then divide by \(\dot x\), as many times as needed.
Next in the series: the mean value theorems and Taylor's formula.