lesson

Unit 2 - Integration Methods as Structural Rewriting · AP

Repeated and Cyclic Integration by Parts

Use repeated integration by parts when it reduces an algebraic factor, and solve a cyclic integral by returning the original integral to one side.

Overview

Central question: When does repeated integration by parts terminate or cycle? You will recognize two different patterns. In one, repeated differentiation eventually turns a polynomial into zero. In the other, repeated differentiation and integration return to the original integral, which can then be solved algebraically. These patterns look similar at first because both use the same rule, but their stopping logic is different.

Notice the factor x2x^2 in ∫x2cos⁡(x) dx\int x^2\cos(x)\,dx. Each derivative makes it simpler: x2x^2, then 2x2x, then 22, then 00. Predict what that sequence means before calculating. If one factor will disappear after a few derivatives, repeated parts has a natural endpoint.

Reduction to zero

Choose u=x2u=x^2 and dv=cos⁡(x) dxdv=\cos(x)\,dx. Then du=2x dxdu=2x\,dx and v=sin⁡(x)v=\sin(x), giving

∫x2cos⁡(x) dx=x2sin⁡(x)−∫2xsin⁡(x) dx.\int x^2\cos(x)\,dx =x^2\sin(x)-\int2x\sin(x)\,dx.

Apply the rule again to the remaining integral, now with u=2xu=2x and dv=sin⁡(x) dxdv=\sin(x)\,dx. Because an antiderivative of sin⁡(x)\sin(x) is −cos⁡(x)-\cos(x),

∫2xsin⁡(x) dx=−2xcos⁡(x)+∫2cos⁡(x) dx.\int2x\sin(x)\,dx =-2x\cos(x)+\int2\cos(x)\,dx.

Combining the terms gives

∫x2cos⁡(x) dx=x2sin⁡(x)+2xcos⁡(x)−2sin⁡(x)+C.\int x^2\cos(x)\,dx =x^2\sin(x)+2x\cos(x)-2\sin(x)+C.
L2-V01 - Derivative-integral ladder. Place it beside this calculation. It is a static two-column diagram: the left column differentiates x2→2x→2→0x^2\to2x\to2\to0x2→2x→2→0; the right integrates cos⁡(x)→sin⁡(x)→−cos⁡(x)→−sin⁡(x)\cos(x)\to\sin(x)\to-\cos(x)\to-\sin(x)cos(x)→sin(x)→−cos(x)→−sin(x). Alternating signs are shown between diagonal pairingsA derivative ladder ends at zero while the matching integral ladder cycles through sine and cosine.
L2-V01 - Derivative-integral ladder. Place it beside this calculation. It is a static two-column diagram: the left column differentiates x2→2x→2→0x^2\to2x\to2\to0x2→2x→2→0; the right integrates cos⁡(x)→sin⁡(x)→−cos⁡(x)→−sin⁡(x)\cos(x)\to\sin(x)\to-\cos(x)\to-\sin(x)cos(x)→sin(x)→−cos(x)→−sin(x). Alternating signs are shown between diagonal pairings

The tabular method is a compact way to organize this repeated pattern. It does not replace reasoning. Before using it, verify that the differentiated column will end at zero and that repeated integration on the other side remains manageable. If either condition fails, a table can hide a poor choice rather than repair it.

When the integral comes back

Now consider

I=∫exsin⁡(x) dx.I=\int e^x\sin(x)\,dx.

Choose u=sin⁡(x)u=\sin(x) and dv=ex dxdv=e^x\,dx. One application gives

I=exsin⁡(x)−∫excos⁡(x) dx.I=e^x\sin(x)-\int e^x\cos(x)\,dx.

Call the remaining integral JJ. Applying integration by parts to JJ with u=cos⁡(x)u=\cos(x) and dv=ex dxdv=e^x\,dx gives

J=excos⁡(x)+∫exsin⁡(x) dx=excos⁡(x)+I.J=e^x\cos(x)+\int e^x\sin(x)\,dx =e^x\cos(x)+I.

Substitute this result into the expression for II:

I=exsin⁡(x)−excos⁡(x)−I.I=e^x\sin(x)-e^x\cos(x)-I.

The original integral has returned. Add II to both sides, then divide by two:

I=ex2(sin⁡(x)−cos⁡(x))+C.I=\frac{e^x}{2}\left(\sin(x)-\cos(x)\right)+C.
L2-V02 - Cyclic loop. Place it at the substitution step. It is a static loop diagram with arrows from III to JJJ and back to III, each arrow labeled by the chosen uuu and dvdvdv. The final arrow points to the equation 2I=ex(sin⁡x−cos⁡x)2I=e^x(\sin x-\cos x)2I=ex(sinx−cosx)Two applications of integration by parts return the original integral, allowing it to be isolated algebraically.
L2-V02 - Cyclic loop. Place it at the substitution step. It is a static loop diagram with arrows from III to JJJ and back to III, each arrow labeled by the chosen uuu and dvdvdv. The final arrow points to the equation 2I=ex(sin⁡x−cos⁡x)2I=e^x(\sin x-\cos x)2I=ex(sinx−cosx)

Do not confuse recurrence with failure

The reappearance of II is not an error. It becomes useful only when the returned copy has a coefficient that can be moved to the other side. If the original integral reappears unchanged in an equation such as I=I+I=I+ a nonzero expression, check the signs and antiderivatives; that would be contradictory. If it appears as I=A−II=A-I, the cycle has created solvable algebra.

L2-V03 - Terminating versus cyclic patterns. Place it after the comparison. It is a two-panel diagram on the same background: the left ends in 000 after differentiating a polynomial; the right closes a loop and highlights “move the returned integral.” Alt text: “Repeated parts either ends because a derivative becomes zero or closes a cycle that is solved by algebra.”Repeated parts either ends because a derivative becomes zero or closes a cycle that is solved by algebra.
L2-V03 - Terminating versus cyclic patterns. Place it after the comparison. It is a two-panel diagram on the same background: the left ends in 000 after differentiating a polynomial; the right closes a loop and highlights “move the returned integral.” Alt text: “Repeated parts either ends because a derivative becomes zero or closes a cycle that is solved by algebra.”

Check the sign pattern by differentiation

The compact form of repeated parts can make a sign error look respectable. Verify the terminating example by differentiating

x2sin⁡(x)+2xcos⁡(x)−2sin⁡(x).x^2\sin(x)+2x\cos(x)-2\sin(x).

The derivative of the first term is 2xsin⁡(x)+x2cos⁡(x)2x\sin(x)+x^2\cos(x). The derivative of the second is 2cos⁡(x)−2xsin⁡(x)2\cos(x)-2x\sin(x). The derivative of the third is −2cos⁡(x)-2\cos(x). Everything except x2cos⁡(x)x^2\cos(x) cancels. This is the desired integrand, and the cancellation explains why the alternating signs in the tabular arrangement were necessary.

The cyclic result can be checked the same way. Differentiate

ex2(sin⁡(x)−cos⁡(x)).\frac{e^x}{2}\left(\sin(x)-\cos(x)\right).

Use the product rule. Differentiating exe^x reproduces the bracket, while differentiating the bracket gives cos⁡(x)+sin⁡(x)\cos(x)+\sin(x). Adding them cancels the negative cosine and doubles sine, leaving exsin⁡(x)e^x\sin(x). A check is especially important in cyclic work because one wrong sign may not become obvious until the final algebraic isolation.

A table is an abbreviation, not an argument

For a polynomial times an exponential or trigonometric factor, a table can record repeated derivatives and antiderivatives efficiently. It should never be the first line on paper. First identify the factor that terminates under differentiation and the factor whose antiderivatives stay controlled. Then make one full application of integration by parts in ordinary notation. Only after the relationship is clear should a table replace repeated lines.

This policy also tells you when not to use the tabular shortcut. It is poor for ∫ln⁡(x)sin⁡(x) dx\int\ln(x)\sin(x)\,dx, because differentiating ln⁡(x)\ln(x) never reaches zero and produces increasingly complicated negative powers of xx. The table may be visually neat while the mathematics is getting worse. Choose a representation because it reveals a pattern, not because it reduces the amount of writing.

Stop and check

A common wrong turn is to keep applying parts to ∫exsin⁡(x) dx\int e^x\sin(x)\,dx after II returns, hoping the expression will eventually end. The misconception is assuming every repeated method must terminate. The targeted correction is to name the returned integral, substitute it into the first equation, and solve the equation for that named quantity.

Retrieval check

Explain which pattern applies to ∫x3ex dx\int x^3e^x\,dx and which applies to ∫excos⁡(x) dx\int e^x\cos(x)\,dx. In the first, repeated differentiation of the polynomial reaches zero. In the second, the sine-cosine derivative cycle returns the original form. Differentiate any final antiderivative to verify the sign pattern.

The next lesson changes the structural signal. Instead of a product-rule reversal, powers of sine and cosine invite identity choices that expose a usable derivative factor.

Knowledge Map

Where this lesson fits

Prerequisites

Unit 2 - Integration Techniques and VerificationIntegration by Parts from the Product Rule

Next lessons

Unit 2 - Integration Techniques and VerificationTrigonometric IntegralsUnit 2 - Integration Techniques and VerificationTrigonometric Substitution