Why These Products Need the Product Rule
When an exponential function and a trigonometric function are multiplied, both factors usually change as \(x\) changes. The derivative must account for the change in each factor. For example, differentiating \(e^x\sin x\) requires one term for the changing exponential and another for the changing sine.
The product rule combines those two contributions. A key detail is that the derivative of \(a^x\) includes \(\ln a\), where \(a\) is the base. Leaving out that factor gives an incorrect derivative whenever the base is not \(e\).
For the basic functions used here, the needed derivative formulas are \(\frac{d}{dx}e^x=e^x\), \(\frac{d}{dx}a^x=a^x\ln a\) for \(a>0\), \(\frac{d}{dx}\sin x=\cos x\), and \(\frac{d}{dx}\cos x=-\sin x\). Trigonometric angles are measured in radians. The formula for \(a^x\) also gives zero when \(a=1\), since \(\ln 1=0\).
Why the Product Rule Works
The product rule follows from the definition of a derivative. The key is to split the change in a product into two parts: first change one factor while holding the other at its original value, then account for the change in the other factor.
For differentiable functions \(u\) and \(v\), consider the quotient for \(u(x)v(x)\).
Add and subtract \(u(x+h)v(x)\) in the numerator, then group the two resulting differences.
As \(h\) approaches zero, differentiability makes \(u\) continuous, so \(u(x+h)\) approaches \(u(x)\). The two difference quotients approach \(v'(x)\) and \(u'(x)\).
In equations, the split is
As \(h\to 0\), the first term approaches \(u(x)v'(x)\), and the second approaches \(v(x)u'(x)\). Therefore, the derivative is \(u(x)v'(x)+v(x)u'(x)\), which is the product rule. This argument requires both functions to be differentiable at \(x\); differentiability also ensures that \(u(x+h)\) approaches \(u(x)\).
Differentiate the Exponential Factor and the Trigonometric Factor
A reliable way to apply the rule is to name the two factors before differentiating. Then write both contributions explicitly: derivative of the first factor times the second, plus the first factor times derivative of the second. This prevents either contribution from disappearing.
Worked Example: Differentiate \(e^x\sin x\)
Let \(u(x)=e^x\) and \(v(x)=\sin x\). Their derivatives are \(u'(x)=e^x\) and \(v'(x)=\cos x\). Applying the product rule gives
Check the two contributions: differentiating \(e^x\) supplies \(e^x\sin x\), and differentiating \(\sin x\) supplies \(e^x\cos x\). At \(x=0\), the original function is \(e^0\sin 0=0\), while the derivative formula gives \(e^0(\sin 0+\cos 0)=1(0+1)=1\).
The same method works when the trigonometric factor is cosine, but the derivative of cosine has a negative sign. That sign affects the second product-rule term.
Worked Example: Differentiate \(e^x\cos x\)
Set \(u(x)=e^x\), \(v(x)=\cos x\), so \(u'(x)=e^x\) and \(v'(x)=-\sin x\). Then
Check the signs by matching each term to its source: \(e^x\cos x\) comes from differentiating the exponential, and \(-e^x\sin x\) comes from differentiating the cosine. At \(x=0\), the derivative is \(1(1-0)=1\). This agrees with the two product-rule contributions \(1\cdot 1+1\cdot 0=1\).
When the Exponential Base Is \(a\)
For a positive base \(a\), the derivative of \(a^x\) is \(a^x\ln a\). Thus the first product-rule contribution includes \(\ln a\). The trigonometric contribution does not acquire this factor: it comes from differentiating the sine or cosine, not the exponential.
Worked Example: Differentiate \(2^x\cos x\) and evaluate at zero
Use \(u(x)=2^x\), \(v(x)=\cos x\). Their derivatives are \(u'(x)=2^x\ln 2\) and \(v'(x)=-\sin x\). Therefore,
At \(x=0\), substitute \(2^0=1\), \(\cos 0=1\), and \(\sin 0=0\):
Check by evaluating the two product-rule contributions separately at zero: \((2^0\ln 2)(\cos 0)=\ln 2\), and \(2^0(-\sin 0)=0\). Their sum is \(\ln 2+0=\ln 2\), as in the derivative formula.
Another Base and a Useful Sign Check
The same steps apply to a product with sine. Keeping the two terms visible makes it easier to see both where \(\ln a\) belongs and how the sign of the trigonometric derivative affects the result.
Worked Example: Differentiate \(4^x\sin x\)
Let \(u(x)=4^x\) and \(v(x)=\sin x\). Then \(u'(x)=4^x\ln 4\) and \(v'(x)=\cos x\). The product rule gives
At \(x=0\), the first contribution is \(4^0\ln 4\sin 0=1\cdot\ln 4\cdot 0=0\). The second is \(4^0\cos 0=1\cdot 1=1\). Thus the derivative at zero is \(0+1=1\), which also follows from the formula \(4^0(\ln 4\sin 0+\cos 0)=1(0+1)=1\).
A Common Mistake: Multiplying the Derivatives
The product rule is not the rule \((uv)'=u'v'\). A tempting but incorrect calculation for \(e^x\sin x\) is to differentiate both factors and multiply their derivatives:
This omits the contribution from the changing exponential factor. The correction is to include both terms in the product rule:
A related error is to omit \(\ln a\) when differentiating \(a^x\). For example, writing \((2^x)'=2^x\) incorrectly treats base \(2\) as base \(e\). The correct derivative is \(2^x\ln 2\), so both terms must be retained in the product derivative.
A Consistent Procedure
For a product of an exponential and a sine or cosine, use this sequence:
- Identify the exponential factor and the trigonometric factor.
- Differentiate each factor using its own basic derivative formula.
- Write “derivative of the first times the second, plus the first times derivative of the second.”
- Check for \(\ln a\) if the exponential is \(a^x\), and check for a negative sign if the trigonometric factor is cosine.
- Simplify only after both contributions have been written.
These derivatives are useful because products of oscillating trigonometric functions and changing exponential functions occur naturally in calculus models and expressions. The product rule describes how their rates of change combine: one contribution reflects the exponential’s change, while the other reflects the trigonometric factor’s change. Keeping those roles distinct makes the formulas easier to remember and helps prevent sign and logarithm-factor errors.
Check Your Understanding
For each question, write both product-rule contributions before simplifying.
- Find \(\frac{d}{dx}(e^x\sin x)\).
- Find \(\frac{d}{dx}(e^x\cos x)\), taking care with the sign.
- Find \(\frac{d}{dx}(3^x\sin x)\). Where does \(\ln 3\) appear?
- Find the value of \(\frac{d}{dx}(2^x\cos x)\) at \(x=0\).
- Explain why multiplying the derivatives of the two factors does not give the product rule.