Why This Product Needs a Cyclic Method
For a product such as \(e^{ax}\sin(bx)\), integration by parts does not simplify the integrand in the way it does for a polynomial times an exponential: differentiating the exponential preserves its form, and integrating the sine produces a cosine. A further integration by parts brings the sine back. The resulting pair of integrals can be solved together, which is the key step behind the formula in this tutorial.
The constants \(a\) and \(b\) affect the answer in different ways. The parameter \(a\) describes the exponential factor, while \(b\) controls the sine's frequency. Keeping these parameters visible makes the coefficient pattern easier to derive and check than memorizing a formula for one particular product.
The General Formula
When \(a\) and \(b\) are not both zero, the antiderivative is
The denominator is the sum of two squares, so it is positive whenever \((a,b)\ne(0,0)\). The numerator combines a sine term with coefficient \(a\) and a cosine term with coefficient \(-b\). Both the coefficients and the denominator are important: omitting either contribution generally means the derivative will not equal the original integrand.
Deriving the Coefficients by Integration by Parts
First suppose \(b\ne0\), so integration of the sine or cosine introduces a factor of \(1/b\). Use the following notation for antiderivatives:
Integration by parts gives two linked equations. For \(I\), take \(e^{ax}\) as the factor to differentiate and integrate \(\sin(bx)\). For \(J\), do the same with \(\cos(bx)\). Since indefinite antiderivatives are defined up to constants, include constants \(C_1,C_2\) in the equations:
Substitute the second equation into the first. Then collect the terms involving \(I\) on one side. This isolates the sine integral without needing to determine \(J\) separately.
Replace \(J\) in the first integration-by-parts equation with its expression in terms of \(I\) and elementary functions.
Move the term \(-\dfrac{a^2}{b^2}I\) to the left. The combined coefficient is \(1+\dfrac{a^2}{b^2}\).
Multiply through by \(b^2\) and divide by \(a^2+b^2\), which is nonzero in the stated parameter case.
In equations, the substitution and rearrangement are
In the final line, the terms involving \(C_1\) and \(C_2\) have been combined into a single arbitrary constant \(C\). This is valid because they do not depend on \(x\). The derivation uses division by \(b\), so it directly covers \(b\ne0\). If \(b=0\) but \(a\ne0\), the integrand is \(e^{ax}\sin(0)=0\), and the displayed general formula also gives zero. If both parameters are zero, its denominator vanishes, so that case must be treated separately: the integrand is zero and the antiderivative is any constant.
Why the Formula Works: Differentiate It
Integration by parts produces the coefficients, but differentiation gives a direct check that no sign or factor has been lost. Write the proposed antiderivative without its constant as \(F(x)\). The product rule applies to the exponential and the expression in parentheses. The chain rule supplies the factors of \(b\) when differentiating the trigonometric functions.
The cancellation is the essential check: the \(-ab\cos(bx)\) from differentiating the exponential is canceled by the \(+ab\cos(bx)\) from differentiating the trigonometric expression. The remaining sine terms add to \((a^2+b^2)\sin(bx)\), which cancels the denominator. Thus the proposed function is indeed an antiderivative. Any other antiderivative differs from it by a constant, since two functions with the same derivative on an interval differ by a constant.
Worked Examples
Worked Example: An Exponential with Positive Growth
Find \(\int e^{2x}\sin(3x)\,dx\). Here \(a=2\), \(b=3\), and \(a^2+b^2=2^2+3^2=4+9=13\). Substituting these values gives
To check, differentiate the expression before \(C\). The derivative of \(2\sin(3x)-3\cos(3x)\) is \(6\cos(3x)+9\sin(3x)\). The product rule therefore gives
The derivative is the original integrand, so the antiderivative is verified.
Worked Example: A Decaying Exponential
Find \(\int e^{-x}\sin(2x)\,dx\). The parameters are \(a=-1\) and \(b=2\), so the denominator is \((-1)^2+2^2=1+4=5\). The coefficient of the sine is \(a=-1\), and the coefficient of the cosine is \(-b=-2\). Hence
For a check, set \(G(x)=-\sin(2x)-2\cos(2x)\). Then \(G'(x)=-2\cos(2x)+4\sin(2x)\), and the product rule yields
The negative growth parameter changes both the exponential and the sine coefficient. The differentiation check confirms that the signs are consistent.
Worked Example: Zero Exponential Rate
Find \(\int \sin(4x)\,dx\) using the general formula. This is the case \(a=0\), \(b=4\). The denominator is \(0^2+4^2=16\), and the numerator is \(e^0(0\sin(4x)-4\cos(4x))\). Thus
Differentiate to check. Since \(\dfrac{d}{dx}\cos(4x)=-4\sin(4x)\),
This agrees with the integrand. The example also shows that the formula remains valid when \(a=0\), provided \(b\ne0\).
A Common Sign Error
A frequent mistake is to use \(+b\cos(bx)\) in the numerator instead of \(-b\cos(bx)\). For example, with \(a=2\) and \(b=3\), the incorrect expression would be
It does not differentiate to \(e^{2x}\sin(3x)\). The product rule gives
which contains an unwanted cosine term and has the wrong sine coefficient. The correction is to use \(-b\cos(bx)\). With this sign, the cosine contributions cancel when differentiating, as the general check showed.
Using the Formula Reliably
Before applying the formula, identify \(a\) and \(b\) from the factors \(e^{ax}\) and \(\sin(bx)\); the number multiplying \(x\) inside the sine is \(b\), not \(b^2\). Then calculate \(a^2+b^2\), substitute into both numerator coefficients, and retain the constant of integration for an indefinite integral. These steps help prevent common substitution errors.
The formula also gives a useful diagnostic. If a proposed answer has a denominator other than \(a^2+b^2\), or has a different coefficient on either trigonometric term, differentiate it before trusting it. A short product-rule check is often faster than trying to repair a lengthy integration-by-parts calculation.
Check Your Understanding
Use the formula and the differentiation check where appropriate.
- Find \(\int e^{3x}\sin(2x)\,dx\), and state the denominator before simplifying.
- For \(a=-2\) and \(b=1\), what are the coefficients of the sine and cosine in the numerator?
- Explain why the derivation using integration by parts divides by \(b\), and how the case \(b=0\) is handled.
- Differentiate \(\dfrac{e^{x}( \sin(2x)-2\cos(2x))}{5}\) to check whether it is an antiderivative of \(e^x\sin(2x)\).
- What goes wrong when \(a=b=0\) in the displayed general formula, and what are the antiderivatives in that case?