Chapter 14: Higher-Order Derivatives
Introduction
14.1 What Are Higher-Order Derivatives?
Differentiating the derivative $f'(x)$ of a function $f(x)$ gives the second derivative, written as $f''(x)$.
Similarly, differentiating a function $n$ times gives its $n$th derivative, written as $f^{(n)}(x)$.
Notation
- First derivative: $f'(x)$, $\dfrac{df}{dx}$, $\dfrac{dy}{dx}$, $Df$
- Second derivative: $f''(x)$, $\dfrac{d^2f}{dx^2}$, $\dfrac{d^2y}{dx^2}$, $D^2f$
- Third derivative: $f'''(x)$, $\dfrac{d^3f}{dx^3}$
- $n$th derivative: $f^{(n)}(x)$, $\dfrac{d^n f}{dx^n}$
14.2 Meaning of the Second Derivative
$f''(x)$ describes the concavity (the way a graph curves) of a function.
- $f''(x) > 0$: concave up (curving upward); the slope is increasing
- $f''(x) < 0$: concave down (curving downward); the slope is decreasing
- $f''(x) = 0$: a possible inflection point
A point where the concavity of a curve changes is called an inflection point. If we can find $f''$, look for points where the sign of $f''(x)$ changes. At such a point, $f''(x) = 0$, but a point where $f''(x) = 0$ is not always an inflection point (for example, $x = 0$ for $f(x) = x^4$).
14.3 Examples of Higher-Order Derivatives
Differentiate one step at a time:
$$f(x) = x^4$$ $$f'(x) = 4x^3$$ $$f''(x) = 12x^2$$ $$f'''(x) = 24x$$ $$f^{(4)}(x) = 24$$ $$f^{(5)}(x) = 0$$All derivatives from the fifth onward are $0$.
After four differentiations, we get the original function back. In general:
$$f^{(n)}(x) = \sin\left(x + \dfrac{n\pi}{2}\right)$$The pattern is:
$$f^{(n)}(x) = \dfrac{(-1)^{n-1}(n-1)!}{x^n} \quad (n \geq 1)$$14.4 Leibniz's Formula
This formula gives the $n$th derivative of a product.
If $f(x)$ and $g(x)$ are differentiable $n$ times:
$$(fg)^{(n)} = \displaystyle\sum_{k=0}^{n} \binom{n}{k} f^{(k)} g^{(n-k)}$$Expanding gives:
$$(fg)^{(n)} = f^{(n)}g + \binom{n}{1}f^{(n-1)}g' + \binom{n}{2}f^{(n-2)}g'' + \cdots + fg^{(n)}$$For $n = 1$: This is the product rule.
$$(fg)' = f'g + fg'$$Assume it holds for $n = k$, and show that it holds for $n = k+1$.
$$(fg)^{(k+1)} = \dfrac{d}{dx}(fg)^{(k)} = \dfrac{d}{dx}\displaystyle\sum_{j=0}^{k}\binom{k}{j}f^{(j)}g^{(k-j)}$$Differentiating each term and combining like terms gives the result, using the identity $\binom{k}{j} + \binom{k}{j-1} = \binom{k+1}{j}$ for binomial coefficients.
Let $f(x) = x$ and $g(x) = e^x$.
$f^{(0)} = x$, $f^{(1)} = 1$, $f^{(k)} = 0$ ($k \geq 2$)
$g^{(k)} = e^x$ (for all $k$)
By Leibniz's formula:
$$(xe^x)^{(n)} = \displaystyle\sum_{k=0}^{n}\binom{n}{k}f^{(k)}g^{(n-k)}$$Since $f^{(k)} = 0$ for $k \geq 2$, only the terms for $k = 0, 1$ remain:
$$= \binom{n}{0}x \cdot e^x + \binom{n}{1} \cdot 1 \cdot e^x$$ $$= xe^x + ne^x = (x + n)e^x$$14.5 Applications of Higher-Order Derivatives
First derivative
$$f'(x) = 3x^2 - 12x + 9 = 3(x^2 - 4x + 3) = 3(x-1)(x-3)$$From $f'(x) = 0$, we get $x = 1, 3$.
Second derivative
$$f''(x) = 6x - 12 = 6(x - 2)$$Finding local extrema (second derivative test)
- $f''(1) = 6(1-2) = -6 < 0$ → local maximum at $x = 1$
- $f''(3) = 6(3-2) = 6 > 0$ → local minimum at $x = 3$
Inflection point
From $f''(x) = 0$, we get $x = 2$.
For $x < 2$, $f''(x) < 0$ (concave down); for $x > 2$, $f''(x) > 0$ (concave up).
So $x = 2$ is an inflection point. $f(2) = 8 - 24 + 18 + 1 = 3$
Conclusion
- Local maximum: $(1, 5)$ ($f(1) = 1 - 6 + 9 + 1 = 5$)
- Local minimum: $(3, 1)$ ($f(3) = 27 - 54 + 27 + 1 = 1$)
- Inflection point: $(2, 3)$
When $f'(a) = 0$:
- If $f''(a) > 0$, there is a local minimum at $x = a$.
- If $f''(a) < 0$, there is a local maximum at $x = a$.
- If $f''(a) = 0$, this test does not determine the result.
14.6 Summary of Higher-Order Derivative Formulas
| Function | $n$th derivative |
|---|---|
| $x^m$ ($m \geq n$) | $\dfrac{m!}{(m-n)!}x^{m-n}$ |
| $e^x$ | $e^x$ |
| $e^{ax}$ | $a^n e^{ax}$ |
| $\sin x$ | $\sin(x + \dfrac{n\pi}{2})$ |
| $\cos x$ | $\cos(x + \dfrac{n\pi}{2})$ |
| $\ln x$ | $\dfrac{(-1)^{n-1}(n-1)!}{x^n}$ |
Frequently Asked Questions
How do we write the $n$th derivative?
It is written as $f^{(n)}(x)$ or $\dfrac{d^n y}{dx^n}$. For $n = 2$, it is $f''(x)$ or $\dfrac{d^2 y}{dx^2}$ (the second derivative), and for $n = 3$, it is $f'''(x)$ or $\dfrac{d^3 y}{dx^3}$. For $n \geq 4$, use parentheses around the superscript, as in $f^{(4)}(x)$.
What are the higher-order derivatives of $e^x$, $\sin x$, and $\cos x$?
Every derivative of $e^x$ is $e^x$. The derivatives of $\sin x$ cycle every $4$ steps: $\sin x \to \cos x \to -\sin x \to -\cos x \to \sin x$, and can be written as $f^{(n)} = \sin(x + n\pi/2)$. The derivatives of $\cos x$ also cycle every $4$ steps.
What is Leibniz's formula?
It gives the $n$th derivative of a product $fg$: $(fg)^{(n)} = \displaystyle\sum_{k=0}^{n} \binom{n}{k} f^{(k)} g^{(n-k)}$. Its coefficients have the same structure as those in the binomial theorem. For example, $(x e^x)^{(3)} = e^x(x + 3)$.
Practice Problems
Find the second derivative of each function.
- $f(x) = x^5 - 3x^3 + 2x$
- $f(x) = e^{2x}$
- $f(x) = x \ln x$
Find the $n$th derivative $f^{(n)}(x)$ of $f(x) = \sin(2x)$.
For $f(x) = x^4 - 4x^3 + 6x^2 - 4x + 1$:
- Find $f'(x)$ and $f''(x)$.
- Find the local extrema.
- Find the inflection points.
Use Leibniz's formula to find $(x^2 e^x)^{(3)}$.
Show Answers
Answers to Practice 1
- $f'(x) = 5x^4 - 9x^2 + 2$
$f''(x) = 20x^3 - 18x$ - $f'(x) = 2e^{2x}$
$f''(x) = 4e^{2x}$ - $f'(x) = \ln x + 1$
$f''(x) = \dfrac{1}{x}$
Answer to Practice 2
$f(x) = \sin(2x)$
$f'(x) = 2\cos(2x)$
$f''(x) = -4\sin(2x)$
$f'''(x) = -8\cos(2x)$
$f^{(4)}(x) = 16\sin(2x)$
From the pattern: $f^{(n)}(x) = 2^n \sin(2x + \dfrac{n\pi}{2})$
Answers to Practice 3
Note: $f(x) = (x-1)^4$
- $f'(x) = 4(x-1)^3$
$f''(x) = 12(x-1)^2$ - From $f'(x) = 0$, we get $x = 1$. Since $f''(1) = 0$, the second derivative test cannot be used.
$f'(x) = 4(x-1)^3$ is negative for $x < 1$ and positive for $x > 1$.
So there is a local minimum at $x = 1$, and the minimum value is $f(1) = 0$. - $f''(x) = 12(x-1)^2 \geq 0$, and $f''(x) = 0$ only at $x = 1$.
Since the sign does not change around $x = 1$, there is no inflection point.
Answer to Practice 4
Let $f = x^2$ and $g = e^x$.
$f^{(0)} = x^2$, $f^{(1)} = 2x$, $f^{(2)} = 2$, $f^{(3)} = 0$
$g^{(k)} = e^x$
$(x^2 e^x)^{(3)} = \binom{3}{0}x^2 e^x + \binom{3}{1}(2x)e^x + \binom{3}{2}(2)e^x + \binom{3}{3}(0)e^x$
$= x^2 e^x + 6xe^x + 6e^x = (x^2 + 6x + 6)e^x$