Chapter 14: Higher-Order Derivatives

Introduction

14.1 What Are Higher-Order Derivatives?

Definition of 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}$
The Chain of Higher-Order Derivatives ... Position Velocity Acceleration Jerk Physical interpretation (for a position function)
$f(x)$
$f'(x)$
$f''(x)$
$f'''(x)$
$\frac{d}{dx}$
$\frac{d}{dx}$
$\frac{d}{dx}$
Figure 1: The chain of higher-order derivatives. If $f(x)$ gives position, then $f'(x)$ gives velocity, $f''(x)$ gives acceleration, and $f'''(x)$ gives jerk. Jerk is the rate at which acceleration changes.

14.2 Meaning of the Second Derivative

Geometric 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
The Second Derivative and Concavity Tangent slopes increase Tangent slopes decrease
Concave up ($f'' \gt 0$)
Concave down ($f'' \lt 0$)
$f''$ gives the rate of change of slope: how the curve bends
Figure 2: On the left, the curve is concave up and the tangent slopes increase from left to right, so $f''(x) \gt 0$. On the right, the curve is concave down and the slopes decrease, so $f''(x) \lt 0$.
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

Example 1: Higher-Order Derivatives of $f(x) = x^4$

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$.

Example 2: Higher-Order Derivatives of $f(x) = e^x$
$$f(x) = e^x$$ $$f'(x) = e^x$$ $$f''(x) = e^x$$ $$f^{(n)}(x) = e^x \quad \text{(the same for all $n$)}$$
Example 3: Higher-Order Derivatives of $f(x) = e^{ax}$
$$f'(x) = ae^{ax}$$ $$f''(x) = a^2 e^{ax}$$ $$f'''(x) = a^3 e^{ax}$$ $$f^{(n)}(x) = a^n e^{ax}$$
Example 4: Higher-Order Derivatives of $f(x) = \sin x$
$$f(x) = \sin x$$ $$f'(x) = \cos x$$ $$f''(x) = -\sin x$$ $$f'''(x) = -\cos x$$ $$f^{(4)}(x) = \sin x$$

After four differentiations, we get the original function back. In general:

$$f^{(n)}(x) = \sin\left(x + \dfrac{n\pi}{2}\right)$$
Example 5: Higher-Order Derivatives of $f(x) = \ln x$
$$f(x) = \ln x$$ $$f'(x) = x^{-1}$$ $$f''(x) = -x^{-2}$$ $$f'''(x) = 2x^{-3}$$ $$f^{(4)}(x) = -6x^{-4}$$

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.

Leibniz's Formula

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)}$$
Proof (Mathematical Induction)

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.

Leibniz's Formula and the Binomial Theorem Binomial Theorem Similar Leibniz's Formula Products replace multiplication; derivatives replace powers The formulas have the same structure
$\displaystyle (a+b)^n = \sum_{k=0}^{n} \binom{n}{k} a^k b^{n-k}$
$\displaystyle (fg)^{(n)} = \sum_{k=0}^{n} \binom{n}{k} f^{(k)} g^{(n-k)}$
Replace $a^k$ with $f^{(k)}$ and $b^{n-k}$ with $g^{(n-k)}$
Figure 3: The binomial theorem and Leibniz's formula have matching terms. In Leibniz's formula, $a^k b^{n-k}$ is replaced by $f^{(k)} g^{(n-k)}$.
Example: Find $(xe^x)^{(n)}$

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

Example: Local Extrema and Inflection Point of $f(x) = x^3 - 6x^2 + 9x + 1$

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)$
Second Derivative Test (Finding Local Extrema)

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

$n$th Derivatives of Basic Functions
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

Practice 1

Find the second derivative of each function.

  1. $f(x) = x^5 - 3x^3 + 2x$
  2. $f(x) = e^{2x}$
  3. $f(x) = x \ln x$
Practice 2

Find the $n$th derivative $f^{(n)}(x)$ of $f(x) = \sin(2x)$.

Practice 3

For $f(x) = x^4 - 4x^3 + 6x^2 - 4x + 1$:

  1. Find $f'(x)$ and $f''(x)$.
  2. Find the local extrema.
  3. Find the inflection points.
Practice 4

Use Leibniz's formula to find $(x^2 e^x)^{(3)}$.

Show Answers

Answers to Practice 1

  1. $f'(x) = 5x^4 - 9x^2 + 2$
    $f''(x) = 20x^3 - 18x$
  2. $f'(x) = 2e^{2x}$
    $f''(x) = 4e^{2x}$
  3. $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$

  1. $f'(x) = 4(x-1)^3$
    $f''(x) = 12(x-1)^2$
  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$.
  3. $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$