Integration by Parts

The product rule, integrated, says ∫u dv = uv − ∫v du: one integral exchanged for another. Pick a product and a choice of u, and the page runs the exchange round by round beside the other choice, so you can see one ladder close and the other get worse. Then step through one example and try your own.

Integration by parts
Definite
Loading interactive simulation...

Lesson

The theory — Integration by Parts

Integration by parts is the product rule integrated. From (uv)′ = u′v + uv′ it follows that ∫u dv = uv − ∫v du, where du = u′(x) dx and dv = v′(x) dx. It exchanges one integral for another, and helps when ∫v du is easier: u should become simpler when differentiated, and dv must be something you can integrate.

What each symbol means

u
the factor that is differentiated
dv
the rest of the integrand with dx, which is integrated to give v

Where the formula comes from

  1. Where the formula comes from. Integrate both sides of (uv)′ = u′v + uv′ to get uv = ∫v du + ∫u dv, and move ∫v du to the other side.
  2. Several rounds. Each round adds a boundary term, with alternating signs: ∫f dx = B1 − B2 + B3 − … ± ∫gK dx, where gK is the integral left after K rounds. That is the running equation the ladder prints. When gK is a multiple λ of f, the equation contains ∫f dx on both sides and can be solved unless the two cancel.

Problems solved in full

  1. One round 3 steps

    Find ∫x e2x dx.

    Open this problem in the tool

    1. The x gets simpler when differentiated, so it is u; e2x integrates easily, so it is dv:

    2. One round of uv − ∫v du:

    3. The integral left is in the table:

    Answer

    e2x(x/2 − 1/4) + C. Forgetting the second ½, the one that comes from integrating e2x again, gives −1/2 where −1/4 belongs.

  2. A power times a sine 3 steps

    Find ∫x sin 2x dx.

    Open this problem in the tool

    Show solution
    1. u = x again; dv = sin 2x dx integrates to −½ cos 2x:

    2. One round, with the sign of v carried through:

    3. The integral left is in the table:

    Answer

    −(x/2) cos 2x + (1/4) sin 2x + C. The minus in v = −½ cos 2x is where the sign goes wrong; the tool calls the answer with every sign flipped exactly that, a wrong sign.

  3. Two rounds 3 steps

    Find ∫x² cos x dx.

    Open this problem in the tool

    Show solution
    1. Round one, u = x²: the power drops to 1.

    2. Round two, on ∫x sin x, u = x: the power drops to 0.

    3. Put the two rounds together:

    Answer

    x² sin x + 2x cos x − 2 sin x + C. Each round lowers the power of x by one, so x² needs two rounds and xⁿ needs n. Keep the brackets until the end: the sign of the last term is where the slips happen.

  4. ln x is u, whatever it is multiplied by 3 steps

    Find ∫x² ln x dx for x > 0.

    Open this problem in the tool

    Show solution
    1. ln x has no simple antiderivative to use as v, so it must be u; dv = x² dx:

    2. One round. The x³ and the 1/x combine into a power:

    3. The integral left is a power:

    Answer

    (x³/3) ln x − x³/9 + C. LIATE puts the logarithm before the algebraic factor for the reason in the first step: differentiating ln x turns it into the power 1/x, which the x³ from v then absorbs.

  5. ∫arctan x, which ends in a substitution 3 steps

    Find ∫arctan x dx.

    Open this problem in the tool

    Show solution
    1. As with ln x, write it as 1·arctan x, with u = arctan x and dv = 1·dx:

    2. One round:

    3. The integral left is a substitution, w = 1 + x², dw = 2x dx:

    Answer

    x arctan x − ½ ln(1 + x²) + C. No bars on the logarithm, because 1 + x² is never negative.

  6. A cyclic integral with two different rates 3 steps

    Find ∫e2x sin x dx.

    Open this problem in the tool

    Show solution
    1. Call it I. Round one with u = sin x, dv = e2x dx:

    2. Round two on ∫e2x cos x dx, again with the trigonometric factor as u:

    3. The integral is back, a quarter of it. Solve for I:

    Answer

    e2x(2 sin x − cos x)/5 + C. The 5 is 2² + 1², which is how the two rates enter: for eax sin bx the divisor is a² + b². Keep u trigonometric in both rounds; switching to u = e2x in the second undoes the first, as the Undo preset shows for eˣ sin x.

  7. A definite integral, boundary term evaluated 2 steps

    Evaluate ∫0π x sin x dx.

    Show solution
    1. u = x, dv = sin x dx, v = −cos x. The boundary term is evaluated between the limits too:

    2. Both parts at the limits:

    Answer

    π. The boundary term gives all of it, π, and the integral left gives 0, because sin π = sin 0 = 0.

  8. A recurrence that is exact, and arithmetic that is not 4 steps

    One round of parts on In = ∫01 xⁿeˣ dx, with u = xⁿ, gives In = e − n·In−1. Use it to find I4. Then run it ten times from I0 = e − 1 rounded to 1.7183, and see what I10 comes out as. Press The power falls: the page finds I2 = 0.7183 in two rounds.

    Open this problem in the tool

    Show solution
    1. One round with u = xⁿ and dv = eˣ dx, between 0 and 1:

    2. Two more rounds from the page's I2:

    3. Now forward from the rounded start. Nine rounds in, the integral of a positive function has come out negative:

    4. The start was off by 1.8172×10⁻⁵, and every round multiplies the error by n, ten rounds by 10!:

    Answer

    I4 = 9e − 24 ≈ 0.4645, and I10 is really 0.2280. The recurrence is exact; run forwards, it multiplies a rounding error by n!. Run it backwards, In−1 = (e − In)/n, and the error is divided by n each step instead: starting from the crude guess I20 = 0 gives I10 = 0.2280 to four decimals. The page stops after three rounds.

Choose u badly and the power of x climbs 🖖

Press The power falls. The integral is x²eˣ, and u = x² is the choice that differentiates the power away: the first round leaves 2x·eˣ, the second leaves 2eˣ, which is in the table, and the answer (x² − 2x + 2)eˣ arrives in two rounds. From 0 to 1 it gives 0.7183, and so does Simpson's rule. The faded ladder makes the other choice, u = eˣ. Differentiating eˣ changes nothing, so nothing gets simpler, and the power is integrated upwards instead: x³eˣ/3, x⁴eˣ/12, x⁵eˣ/60, while the chart's dashed line climbs and the solid one falls to zero. LIATE (logarithmic, inverse trigonometric, algebraic, trigonometric, exponential) is that test written as a list: first comes whatever becomes simpler when differentiated. The table under the results runs it on fifteen products, and the LIATE choice lowers the power of x, or removes the ln or arctan, in all fifteen. Count symbols instead and it wins 13, ties x³eˣ and loses x³ sin x, 9 symbols against 8, so the length of the integral left is the wrong thing to measure.

∫eˣ sin x comes back as itself, and is solved as an equation 🖖

Press Comes back. Neither eˣ nor sin x gets simpler when differentiated, so take u = sin x and see what happens. One round leaves ∫eˣ cos x. A second round, with u = cos x, leaves −∫eˣ sin x: the integral you started with, carrying a minus sign. The ladder never reaches the table and does not have to. Call the integral I; the running equation now says I = eˣ sin x − eˣ cos x − I, so 2I = eˣ(sin x − cos x) and I = eˣ(sin x − cos x)/2. From 0 to 1 that gives 0.9093, which Simpson's rule confirms. Now press Undo: the same first round, then u = eˣ in the second. That round integrates back the cos x the first one produced, its boundary term eˣ sin x cancels the first one's, and the equation left is I = I, which is true and tells you nothing.

∫ln x needs a factor of 1 nobody wrote 🖖

Press ln x with dv = 1·dx. ln x looks like a single function, and parts seems to need two. Write it as 1·ln x, with u = ln x, which becomes 1/x when differentiated, and dv = 1·dx, which integrates to x. Then ∫ln x dx = x ln x − ∫x·(1/x) dx = x ln x − x, in one round, and from 1 to 2 the area is 2 ln 2 − 1 = 0.3863 both ways. The other assignment, u = 1 with dv = ln x dx, needs v = ∫ln x dx, the very integral being asked for, which is why the faded ladder stops before it starts. In the trainer, x ln x has been typed: its derivative is ln x + 1, one more than the integrand everywhere, the −∫1 dx that was forgotten. The same trick does ∫arctan x, and x arctan x shows where parts hands over: with u = arctan x one round leaves x²/(2(1 + x²)), a rational function, the next rung's job.

Learning path

Techniques of integration

References (2)