From First Derivatives to Repeated Differentiation
The derivative of a function is itself a function, wherever the original function is differentiable. It is therefore natural to ask whether that derivative is differentiable in turn. If so, its derivative is called the second derivative of the original function. Repeating this process gives higher derivatives. These derivatives describe more than a succession of calculations: the second derivative records how the first derivative changes, and higher derivatives describe further changes in that rate.
The Implicit Differentiation tutorial used the Chain Rule and Product Rule to find the first derivative of a branch defined by an equation. Repeated differentiation extends those tools, but it also requires care: the existence of \(f'(a)\) does not guarantee that \(f''(a)\) exists. We begin by defining precisely what repeated differentiability means.
This definition is recursive: \(f''\) is not obtained by differentiating \(f\) twice in one step. First \(f'\) must exist, and then \(f'\) must itself be differentiable. At a point \(a\), \(f''(a)\) is the derivative of \(f'\) at \(a\). In particular, \(f'\) must be defined at points sufficiently near \(a\) for that derivative to be formed.
Being \(k\) times differentiable is not the same as being \(C^k\): the latter also requires continuity of the derivatives through order \(k\). For instance, existence of \(f''\) does not, by definition alone, assert continuity of \(f''\). We will use “twice differentiable” for existence of the first and second derivatives, and “\(C^2\)” when continuity of those derivatives is also part of the hypothesis.
Calculating Successive Derivatives
To find higher derivatives, differentiate the formula for the preceding derivative, keeping track of where each rule is applied. A derivative formula is not merely a list of values at one point: it gives a function that can itself be differentiated, provided the required derivatives exist.
Worked Example: Repeated Derivatives of a Polynomial
Let \(f(x)=x^5-2x^3+4x-1\). By the Power Rule and Sum Rule,
Differentiate this expression to obtain the second derivative, and continue:
The next derivative is \(f^{(6)}(x)=0\), and every subsequent derivative is also zero. Each step differentiates the formula obtained at the preceding step. For example, differentiating \(60x^2-12\) gives \(120x\), and differentiating \(120x\) gives \(120\).
A particularly important higher derivative is \(f''\). If \(f'\) is increasing, then its slopes are nonnegative wherever those slopes exist, so \(f''\) is nonnegative there. Conversely, a second derivative gives information about how the first derivative changes. Such interpretations will be useful later, but they do not replace the definition: \(f''(a)\) is specifically the limit defining the derivative of \(f'\) at \(a\).
Worked Example: A First Derivative That Has No Derivative at the Origin
Define \(f(x)=x|x|\). For \(x>0\), \(f(x)=x^2\), and for \(x<0\), \(f(x)=-x^2\). At \(x=0\), \(f(0)=0\), and the difference quotient is
As \(h\to0\), \(|h|\to0\), so \(f'(0)=0\). Away from zero, differentiating the two formulas gives \(f'(x)=2x\) for \(x>0\) and \(f'(x)=-2x\) for \(x<0\). Together with the value at zero, this says \(f'(x)=2|x|\) for every \(x\).
To test whether \(f''(0)\) exists, take the difference quotient of \(f'\) at zero:
The right-hand and left-hand limits differ, so this quotient has no two-sided limit. Thus \(f'(0)\) exists, but \(f''(0)\) does not. This example shows why one must check each stage of the recursive definition rather than assume that a first derivative can automatically be differentiated again.
The Second-Order Chain Rule
The Chain Rule gives the first derivative of a composite function. Differentiating that formula once more produces a second-order version. The two terms in the result reflect two ways the first derivative can change: the outer derivative can change as its input changes, and the inner derivative can change.
Proof. By the Chain Rule, at every \(x\in I\),
Since \(f\) is twice differentiable, \(f'\) is differentiable; since \(u\) is twice differentiable, \(u'\) is differentiable. Differentiate the displayed product using the Product Rule. Applying the Chain Rule to the first factor gives
Both terms exist under the stated hypotheses, which also proves that the composite is twice differentiable. \(\square\)
The square on \(u'(x)\) is essential. One factor comes from differentiating \(f'(u(x))\) by the Chain Rule; the other remains in the product from the first-derivative formula. Omitting either factor gives an incorrect second derivative.
Worked Example: A Composite Polynomial
Let \(g(x)=(x^2+1)^3\). Regard this as \(f(u(x))\), where \(u(x)=x^2+1\) and \(f(t)=t^3\). The needed derivatives are
The Second-Order Chain Rule gives
For a check, the first derivative is \(g'(x)=6x(x^2+1)^2\). Differentiating by the Product Rule gives \(6(x^2+1)^2+24x^2(x^2+1)\), which agrees with the expression above. In particular, at \(x=0\), the formula gives \(g''(0)=6\), and the direct expression gives \(6(1)^2+0=6\).
The Product Rule at Every Order
Repeatedly applying the ordinary Product Rule produces a pattern. When differentiating a product \(n\) times, a term appears for every way of assigning some of the \(n\) differentiations to the first factor and the rest to the second. The binomial coefficients count how many assignments produce each pair of derivative orders.
Proof. We prove the formula by induction on \(n\). For \(n=0\), it says \((fg)^{(0)}=f^{(0)}g^{(0)}\), which is the definition of \(fg\). For \(n=1\), it is the Product Rule:
Now suppose the formula holds for some nonnegative integer \(n\), and suppose \(f\) and \(g\) have derivatives through order \(n+1\). Differentiate each term in the formula for \((fg)^{(n)}\), using the Product Rule:
In the first sum, set \(j=k+1\); in the second, set \(j=k\). For each interior index \(1\le j\le n\), the coefficient of \(f^{(j)}g^{(n+1-j)}\) becomes \(\binom{n}{j-1}+\binom{n}{j}=\binom{n+1}{j}\), by Pascal’s identity. At the endpoints, the terms are \(f^{(n+1)}g\) and \(fg^{(n+1)}\), each with coefficient \(1\). Therefore
This proves the formula for \(n+1\), completing the induction. The same calculation shows that the product has the required derivatives at each stage. \(\square\)
Worked Example: A Third Derivative of a Product
Take \(f(x)=x^2\) and \(g(x)=x^3\). Their derivatives are
The Generalized Product Rule for \(n=3\) gives
As a direct check, \(fg=x^5\), so \((fg)'''=5\cdot4\cdot3\,x^2=60x^2\). The coefficients \(1,3,3,1\) in the product formula are the binomial coefficients for order three.
What Higher Derivatives Do—and Do Not—Guarantee
The generalized Product Rule and second-order Chain Rule are practical tools because they let us differentiate expressions without expanding them first. They also clarify the hypotheses needed: to use a second derivative, the first derivative must itself be differentiable; to use the order-\(n\) product formula, both factors must have derivatives through order \(n\).
A common pitfall is to confuse higher differentiability with smoothness. A function can have a second derivative without that second derivative being continuous, because continuity of \(f''\) is an additional condition in the definition of \(C^2\). Another pitfall is to treat a formal expression for \(f''\) as proof that it exists at every point. The example \(x|x|\) shows why the derivative limit must be checked where the formula changes.
When applying these ideas, first identify the function whose derivative is being taken. For a composite, use the Chain Rule before differentiating again; for a product, decide whether successive Product Rule steps or the generalized formula is more efficient. In either case, verify that the derivatives required by the rule exist on the relevant interval.
Check Your Understanding
Use the definitions and results in this tutorial to answer the following.
- State the recursive definition of \(f^{(k)}\) in terms of \(f^{(k-1)}\).
- What additional requirement distinguishes a \(C^2\) function from a twice differentiable function?
- Use the Second-Order Chain Rule to find the second derivative of \(h(x)=(3x+1)^4\).
- Write the Generalized Product Rule for \((fg)^{(4)}\), including its coefficients.
- For \(f(x)=x|x|\), why does \(f'(0)\) exist while \(f''(0)\) does not?