When Integration by Parts Comes Back to Its Starting Point
Some integrals do not become simpler after one use of integration by parts. Instead, a second use produces the original integral again. This is not a dead end: the repeated appearance of the original integral creates an equation that can be solved for it.
This happens naturally with products of an exponential function and a sine or cosine function. Differentiating sine and cosine moves back and forth between them, while integrating an exponential reproduces an exponential. After two integrations by parts, the first trigonometric function returns. The method is therefore called cyclic integration by parts.
The Paired Integrals
Let \(a\) and \(b\) be real constants, and first assume \(a\ne 0\). Define \(I\) and \(J\) to be antiderivatives of the two integrands:
Equivalently, we can write \(I=\int e^{ax}\cos(bx)\,dx\) and \(J=\int e^{ax}\sin(bx)\,dx\), understanding that indefinite antiderivatives are determined up to an additive constant. For the first integration by parts, take \(u=\cos(bx)\) and \(dv=e^{ax}\,dx\). Then \(du=-b\sin(bx)\,dx\) and \(v=e^{ax}/a\), giving
For the second integral, take \(u=\sin(bx)\) and \(dv=e^{ax}\,dx\). Now \(du=b\cos(bx)\,dx\), so
The cycle is visible: the equation for \(I\) contains \(J\), and the equation for \(J\) contains \(I\). The constants \(C_1\) and \(C_2\) do not affect the integration-by-parts relationships between derivatives; when we solve for an indefinite antiderivative, their contributions combine into a single arbitrary constant.
Deriving the General Formulas
Substitute the second relation into the first. Keeping track of the coefficients gives
Move the term involving \(I\) to the left and multiply through by \(a^2\):
The same elimination can be done for \(J\). Substitute the first relation into the second, or use the first solved formula in the second. This gives the paired antiderivatives below. In each formula, the arbitrary constant is written once at the end.
The cyclic integration-by-parts derivation used \(a\ne0\), because it required integrating \(e^{ax}\) as \(e^{ax}/a\). If \(a=0\) and \(b\ne0\), the formulas still hold, but the integrals are found directly from the basic antiderivatives of sine and cosine. If \(b=0\) and \(a\ne0\), the formulas reduce to the antiderivative of \(e^{ax}\) for the cosine integral and zero for the sine integral. If \(a=b=0\), the integrands are \(1\) and \(0\), respectively, and the displayed formulas do not apply because their denominator is zero.
Worked Examples
Worked Example: Integrate an Exponential Times a Cosine
Find \(\int e^{2x}\cos(3x)\,dx\) by cyclic integration by parts. Write \(I=\int e^{2x}\cos(3x)\,dx\) and \(J=\int e^{2x}\sin(3x)\,dx\). Integrating the exponential factor gives
For \(J\), integration by parts gives
Substitute the expression for \(J\) into the expression for \(I\), combining additive constants into \(C\):
Therefore \(\frac{13}{4}I=e^{2x}\bigl(\frac12\cos(3x)+\frac34\sin(3x)\bigr)+C\), so
Check by differentiating. The derivative of the numerator’s product, before division by \(13\), is \(e^{2x}\bigl(2(2\cos(3x)-3\sin(3x))+3(2\sin(3x)+3\cos(3x))\bigr)\). The cosine coefficient is \(4+9=13\), and the sine coefficient is \(-6+6=0\). Dividing by \(13\) leaves \(e^{2x}\cos(3x)\), as required.
Worked Example: Integrate an Exponential Times a Sine
Find \(\int e^x\sin(2x)\,dx\). Set \(J=\int e^x\sin(2x)\,dx\) and \(I=\int e^x\cos(2x)\,dx\). Integration by parts gives
Substitute the expression for \(I\) into the equation for \(J\), absorbing constants into \(C\):
Thus \(5J=e^x\bigl(\sin(2x)-2\cos(2x)\bigr)+C\), and
For a check, differentiate the proposed antiderivative. The product rule gives \(e^x/5\) times \(\sin(2x)-2\cos(2x)+2\cos(2x)+4\sin(2x)\). The cosine terms cancel and the sine terms total \(5\sin(2x)\), so the derivative is \(e^x\sin(2x)\).
Worked Example: Evaluate a Definite Integral
Evaluate \(\int_0^{\pi/2}e^x\cos x\,dx\). From the paired formula with \(a=b=1\), an antiderivative is \(F(x)=\frac12e^x(\cos x+\sin x)\). Apply the Fundamental Theorem of Calculus by evaluating at both endpoints:
Differentiate \(F(x)\) to check the antiderivative: \(F'(x)=\frac12e^x(\cos x+\sin x)+\frac12e^x(-\sin x+\cos x)=e^x\cos x\). The endpoint subtraction and the antiderivative are both verified.
Why Solving the Cycle Works
Integration by parts is an identity that follows from the product rule. For differentiable functions \(u\) and \(v\), the product rule says \((uv)'=u'v+uv'\). Integrating both sides over an interval gives the integration-by-parts identity, and the same relationship holds for antiderivatives up to a constant. In the trigonometric-exponential case, the first integration creates the paired integral, and the second creates the original one. Because the original integral appears with a coefficient, the result is an ordinary linear equation in that integral.
The denominator \(a^2+b^2\) records the coefficient produced when the cycle is closed. It is positive whenever \(a\) and \(b\) are not both zero, so dividing by it is valid in the stated cases. The formulas can also be checked independently: differentiating each right-hand side uses the product rule and the derivatives of sine and cosine, and the terms involving the unwanted trigonometric function cancel.
A Sign Error to Avoid
The signs in the second integration by parts matter. For example, let \(I=\int e^x\cos x\,dx\) and \(J=\int e^x\sin x\,dx\). Correctly applying integration by parts gives \(I=e^x\cos x+J+C_1\) and \(J=e^x\sin x-I+C_2\). The minus sign in the second equation comes from differentiating \(\sin x\): its derivative is \(+\cos x\), so the integration-by-parts subtraction produces \(-I\).
A common incorrect step is to write \(J=e^x\sin x+I\), changing that minus sign to a plus. Substituting this false equation into \(I=e^x\cos x+J\) would give \(I=e^x(\cos x+\sin x)+I\), and hence \(0=e^x(\cos x+\sin x)\), which is not an identity. The contradiction is a warning to revisit the integration by parts. With the correct sign, substitution gives \(I=e^x(\cos x+\sin x)-I+C\), so \(2I=e^x(\cos x+\sin x)+C\), as expected.
Using the Method Efficiently
Before beginning, check whether the integrand has the form \(e^{ax}\cos(bx)\) or \(e^{ax}\sin(bx)\), with constant rates \(a\) and \(b\). Set up both paired integrals, and keep the signs from differentiating the trigonometric factor explicit. After substituting one equation into the other, gather all copies of the target integral on the same side. Finally, verify the result by differentiation; this is particularly useful because a sign error can leave a plausible-looking expression that is nevertheless incorrect.
Use one for the cosine product and one for the sine product so the returning integral is easy to identify.
Record the derivative of each trigonometric factor carefully, including its factor of \(b\).
Replace the paired integral, collect the target integral, and divide by its resulting coefficient.
Use the product rule to confirm that the proposed antiderivative differentiates to the original integrand.
Cyclic integration by parts is useful because it turns a repeated procedure into a finite algebraic calculation. Once the cycle has returned to its starting point, continuing to integrate by parts is unnecessary: solving the equation is the step that completes the method.
Check Your Understanding
For each question, keep track of the signs and verify any antiderivative by differentiation.
- For \(\int e^{3x}\cos(2x)\,dx\), what are the two paired integrals and the integration-by-parts equations?
- Use the paired formulas to find \(\int e^{2x}\sin x\,dx\).
- Why does the cyclic method require a separate direct check when \(a=0\)?
- What antiderivative does the cosine formula give when \(b=0\) and \(a\ne0\)?
- For \(a=b=1\), identify the sign in the equation for \(\int e^x\sin x\,dx\) that is essential to closing the cycle.