When Integration by Parts Comes Back to Its Starting Point
Integration by parts is especially useful when differentiating one factor makes it simpler, while integrating the other factor is manageable. Sometimes, however, the process does not simplify the remaining integral. Instead, it produces another integral of a closely related form. A second application may then bring back the original integral.
This return is not a failure. It creates an equation involving the integral we want. If the coefficient of that integral allows us to isolate it, the cycle gives an efficient solution.
Products of exponentials and sine or cosine are common examples. Differentiating sine and cosine alternates between them, while integrating an exponential preserves its form. The factors therefore keep reappearing in a predictable pattern.
What Counts as a Cycle?
For this tutorial, a cyclic integration-by-parts pattern is a sequence of integrations by parts in which the remaining integral returns to the starting integral, possibly with a coefficient, plus terms that can be integrated or evaluated directly.
For example, let \(I\) denote an antiderivative of \(e^x\sin x\), and let \(J\) denote an antiderivative of \(e^x\cos x\). The first integration by parts relates \(I\) to \(J\); the next relates \(J\) back to \(I\). The two equations can then be combined to find \(I\).
For indefinite integrals, equations between antiderivatives are understood up to an additive constant. In the calculations below, we choose particular antiderivatives while deriving the formula, then include \(+C\) in the final answer to represent the full family.
A Complete Cycle: Exponential Times Sine
Consider \(I=\int e^x\sin x\,dx\). Choose \(u=\sin x\) and \(dv=e^x\,dx\). Then \(du=\cos x\,dx\) and \(v=e^x\), so integration by parts gives
Set \(J=\int e^x\cos x\,dx\). For \(J\), choose \(u=\cos x\) and \(dv=e^x\,dx\). Then \(du=-\sin x\,dx\) and \(v=e^x\), giving
The last integral is \(I\). Substitute the expression for \(J\) into the equation for \(I\):
Now the original integral appears on both sides. Add \(I\) to each side and divide by \(2\):
The cycle made the problem solvable because collecting the two copies of \(I\) gave the nonzero coefficient \(2\).
Worked Example: Solve a Cycle for \(\int e^x\sin x\,dx\)
Let \(I=\int e^x\sin x\,dx\) and \(J=\int e^x\cos x\,dx\). The first integration by parts gives
For \(J\), use \(u=\cos x\), \(dv=e^x\,dx\), \(du=-\sin x\,dx\), and \(v=e^x\):
Substitute the second equation into the first, then isolate \(I\):
To check, differentiate the proposed antiderivative. The product rule gives
This is the original integrand, so the antiderivative is verified.
Why the Cycle Produces an Equation
The method rests on the integration-by-parts identity, which follows from the product rule. If \(u\) and \(v\) are differentiable, then \((uv)'=u'v+uv'\). Integrating both sides gives \(\int u\,dv=uv-\int v\,du\), with the usual understanding that indefinite antiderivatives are determined up to constants.
In a cycle, this identity is applied to related products. Each application is valid under the usual conditions for integration by parts on the interval in question. Because the differentiated and integrated factors repeat, the resulting equations contain the same unknown integral. Substitution or rearrangement then reduces the cycle to an algebraic equation.
Use symbols such as \(I\) and \(J\) to keep track of the related integrals.
Choose factors whose derivatives and antiderivatives keep the product structure manageable.
Express the new integral in terms of the original one and known terms.
Move all copies of the unknown integral to one side, then divide only if its coefficient is nonzero.
Differentiate the proposed antiderivative and compare it with the original integrand.
A General Exponential–Trigonometric Formula
The same cycle works for \(e^{ax}\sin(bx)\) and \(e^{ax}\cos(bx)\), where \(a\) and \(b\) are constants and \(a\ne 0\). Define
In the first integral, take \(u=\sin(bx)\) and \(dv=e^{ax}\,dx\). Then \(du=b\cos(bx)\,dx\) and \(v=e^{ax}/a\). In the second, take \(u=\cos(bx)\) and \(dv=e^{ax}\,dx\). These choices give the pair of equations
Substituting the second equation into the first yields
Since \(1+b^2/a^2=(a^2+b^2)/a^2\), and \(a^2+b^2>0\) when \(a\ne0\), the coefficient is nonzero. Solving gives the formulas below. The cosine formula follows by substituting the expression for \(I_s\) into the equation for \(I_c\).
The derivation above assumes \(a\ne0\), because it divides by \(a\). If \(a=0\), the integrands reduce to sine or cosine alone, and their elementary antiderivatives can be found directly. The displayed formulas also give the correct expressions when \(a=0\) and \(b\ne0\), but that case does not require a cycle.
Worked Example: Integrate \(e^{2x}\cos(3x)\)
Let \(I=\int e^{2x}\cos(3x)\,dx\) and \(J=\int e^{2x}\sin(3x)\,dx\). For \(I\), take \(u=\cos(3x)\), \(dv=e^{2x}\,dx\). Then \(du=-3\sin(3x)\,dx\) and \(v=e^{2x}/2\), so
For \(J\), take \(u=\sin(3x)\), \(dv=e^{2x}\,dx\). Then \(du=3\cos(3x)\,dx\) and \(v=e^{2x}/2\), so
Substitute this expression for \(J\) into the equation for \(I\):
Add \(9I/4\) to both sides, then multiply by \(4/13\):
For the check, differentiate. The derivative of the numerator product is
Dividing by \(13\) gives the original integrand, as required.
Worked Example: Evaluate a Definite Integral Using the Cycle
Evaluate \(\int_0^{\pi/4} e^{2x}\cos(2x)\,dx\). The general formula, with \(a=2\) and \(b=2\), gives the antiderivative
At the upper endpoint, \(2x=\pi/2\), so \(\cos(\pi/2)=0\) and \(\sin(\pi/2)=1\). At the lower endpoint, \(\cos(0)=1\) and \(\sin(0)=0\). Therefore
To check the antiderivative, differentiate the expression for \(F\):
The derivative matches the integrand, and the endpoint evaluations use the stated bounds.
When the Cycle Does Not Give a Solution
Not every return to the original integral is useful. Suppose algebra gives \(I=A+\lambda I\), where \(A\) is an expression already known. Rearranging gives \((1-\lambda)I=A\). The cycle determines \(I\) only if \(1-\lambda\ne0\). If \(1-\lambda=0\), the equation either reduces to an identity or signals an inconsistency in the calculation; it does not justify dividing by zero or conclude that the integral has no antiderivative.
In the exponential–sine cycle above, substitution gives a nonzero coefficient because \(a^2+b^2>0\) under the stated condition \(a\ne0\). A useful cycle is therefore more than a visual return: it must produce an equation that can actually be isolated.
A Common Sign Error
The sign in the second integration by parts is easy to lose. For \(J=\int e^x\cos x\,dx\), using \(u=\cos x\) gives \(du=-\sin x\,dx\). Thus
A common incorrect calculation drops the negative sign in \(du\) and writes \(J=e^x\cos x-I\). Substituting that wrong equation would give \(I=e^x\sin x-e^x\cos x+I\), which cancels \(I\) from both sides and leaves the false claim \(0=e^x(\sin x-\cos x)\). The contradiction is a warning to check the sign of \(du\), not evidence that the method failed. Correcting the sign gives \(J=e^x\cos x+I\), and then \(2I=e^x(\sin x-\cos x)\).
Recognizing When to Try This Method
Look for a product in which one factor has a derivative cycle and the other remains manageable when integrated. Exponentials paired with sine or cosine are a strong signal: the exponential retains its form, and the trigonometric factor alternates between sine and cosine. If the first application creates another integral of the same family, name it and continue only far enough to see whether the original integral returns.
By contrast, when differentiating a factor makes it progressively simpler, repeated integration by parts may reduce the problem rather than create a cycle. The choice of strategy depends on the behavior of the factors and on the algebraic equation the cycle produces. In either case, differentiation of the final antiderivative is a direct check on the result.
Check Your Understanding
Use the cycle structure and the conditions discussed above to answer these questions.
- In \(\int e^x\sin x\,dx\), what related integral appears after the first integration by parts?
- Why can a returned integral be moved to the other side and solved only when its resulting coefficient is nonzero?
- For which condition on \(a\) does the displayed integration-by-parts derivation for \(\int e^{ax}\sin(bx)\,dx\) divide by \(a\)?
- What sign should appear in \(\int e^x\cos x\,dx=e^x\cos x+\int e^x\sin x\,dx\), and where does it come from?
- How can differentiation check a proposed antiderivative obtained from a cycle?