Why Higher Derivatives of Products Need Care
The product rule gives the derivative of a product of two functions, but differentiating that product again creates several new terms. By the third and fourth derivatives, some terms occur more than once. Collecting those repeated terms produces coefficients that are easy to miss if each differentiation is done mentally.
A reliable method is to apply the product rule one derivative at a time, then organize the result by how many derivatives fall on each factor. This works for products of powers, exponentials, and trigonometric functions, provided the factors have all the derivatives being used.
The Third and Fourth Derivative Formulas
Start with the product rule, \((fg)'=f'g+fg'\). Differentiating a second time gives \((fg)''=f''g+2f'g'+fg''\). Differentiating again and collecting terms gives the third-derivative formula:
Differentiating once more gives the fourth-derivative formula:
The coefficients \(1,3,3,1\) and \(1,4,6,4,1\) reflect how many times the same derivative combination appears during repeated applications of the product rule. They are not extra factors attached by a separate differentiation rule; they come from collecting like terms.
Why the Coefficients Appear
The second derivative is a useful starting point for seeing the pattern. Differentiate each term in \((fg)''=f''g+2f'g'+fg''\). Each differentiation uses the product rule:
For the fourth derivative, differentiate the four terms in the third-derivative formula. Again, collect terms that have the same derivatives on the two factors:
For instance, \(f'''g'\) appears once from differentiating \(f'''g\), and three more times from differentiating \(3f''g'\). Its total coefficient is \(1+3=4\). The same collecting process gives the coefficient \(6\) on \(f''g''\).
Apply the product rule to both factors in every term of the current derivative.
Terms with the same derivative on each factor are like terms and must be combined.
In every term of the \(n\)th derivative, the derivative orders on the two factors add to \(n\).
This also explains why the coefficients follow the familiar pattern from Pascal’s triangle: when moving from one derivative to the next, each existing term contributes to two terms, and matching contributions are added. The direct derivations above establish the formulas needed here without requiring a memorized higher-order rule.
Worked Example: A Power Times an Exponential
Worked Example: Find the Third and Fourth Derivatives of \(x^2e^{3x}\)
Let \(f(x)=x^2\) and \(g(x)=e^{3x}\). Their derivatives are
Use the third-derivative formula and substitute each factor derivative:
For the fourth derivative:
Check by differentiating the third derivative. The product rule gives
which agrees with the fourth derivative.
Worked Example: A Power Times a Trigonometric Function
Worked Example: Find the Third and Fourth Derivatives of \(x^3\sin x\)
Take \(f(x)=x^3\) and \(g(x)=\sin x\). The derivatives needed are
Apply the third-derivative formula:
For the fourth derivative:
Check by differentiating the expression for \(y'''\). Set \(A=18x-x^3\) and \(B=6-9x^2\), so \(y'''=A\cos x+B\sin x\). Then \(A'=18-3x^2\) and \(B'=-18x\), giving
This matches the result from the fourth-derivative product formula.
Worked Example: Evaluate Derivatives at a Point
Worked Example: Find the Third and Fourth Derivatives of \(e^x\cos(2x)\) at \(x=0\)
Let \(f(x)=e^x\) and \(g(x)=\cos(2x)\). Every derivative of \(f\) is \(e^x\). The derivatives of \(g\) through order four are
At \(x=0\), \(e^0=1\), \(\cos(0)=1\), and \(\sin(0)=0\). Thus the factor values are \(f=f'=f''=f'''=f''''=1\), \(g=1\), \(g'=0\), \(g''=-4\), \(g'''=0\), and \(g''''=16\). Substitute them into the formulas:
Check by differentiating explicitly. First,
For example, differentiating \(y'''=e^x(-11\cos(2x)+2\sin(2x))\) gives \(y''''=e^x(-7\cos(2x)+24\sin(2x))\). At \(x=0\), this equals \(1(-7+0)=-7\), agreeing with the formula calculation; similarly \(y'''(0)=1(-11+0)=-11\).
A Common Coefficient Mistake
A frequent error is to differentiate the product correctly in some terms but fail to combine repeated terms. For the third derivative, one might write
This expression includes the four possible derivative placements, but it ignores the fact that \(f''g'\) and \(f'g''\) arise in more than one way during repeated differentiation. The complete calculation is
The correction is to differentiate every existing term and collect like terms before writing the result. A useful check is that the derivative orders in each term add to the total: for example, the orders in \(f''g'\) add to \(2+1=3\).
Choosing an Efficient Approach
For a product of two factors, the formulas are most useful when the derivatives of each factor are easy to list. A power eventually has zero derivatives; an exponential has a predictable derivative pattern; and sine and cosine cycle through a short sequence of derivatives. Write those factor derivatives first, then substitute into the organized formula.
For a fourth derivative, a final check is especially valuable: differentiate the expression for the third derivative and compare it with the result from the fourth-derivative formula. This check can reveal a missing coefficient or a sign error in a trigonometric derivative. If the problem asks only for a derivative at a point, it is often efficient to evaluate the factor derivatives at that point and substitute those values directly, as in the last example.
Check Your Understanding
Use the product-rule formulas and show enough intermediate steps to track each coefficient.
- Find the third derivative of \(x^2\sin x\).
- Find the fourth derivative of \(x e^{2x}\).
- For \(y=e^x\sin x\), use the product formulas to find \(y'''(0)\).
- Explain why the coefficient of \(f''g''\) in the fourth derivative is \(6\).
- Identify the error in writing \((fg)''''=f''''g+f'''g'+f''g''+f'g'''+fg''''\).