Euler Hall — free maths guides

Applying by parts more than once

Apply parts repeatedly, once per degree of the polynomial. The idea in plain words, a worked example, and a check with the answers shown — part of the free Calculus II guides.

A polynomial of degree n needs n applications

Each application of parts differentiates the polynomial once, lowering its degree by one. So

∫x3ex dx\int x^3 e^x\,dx

needs three applications:x3→x2→x→1x^3 \to x^2 \to x \to 1. After the last one the remaining integral is just∫ex dx\int e^x\,dx, which is immediate.

The structure of the answer. Each application contributes a term, and they alternate in sign:

∫x2ex dx=x2ex−2xex+2ex+C.\int x^2e^x\,dx = x^2e^x - 2xe^x + 2e^x + C.

Note the pattern: the polynomial's power falls, the coefficients1,2,21, 2, 2 are the falling factorials, and the signs alternate. That is not a coincidence — each application brings down the current power.

The stopping condition is the degree. Once the polynomial is a constant, one more application finishes it. Continuing past that point creates work rather than removing it.

A useful bookkeeping device is the table: differentiate down one column, integrate down the other, and multiply diagonally with alternating signs. It is the same computation arranged so the signs and coefficients cannot drift.

Why the sign alternates

Track the signs. Each application producesuv−∫v duuv - \int v\,du. The minus sign in front of the new integral means the next application's result enters with a minus, and the one after that with a plus.

So the terms alternate:+x2ex+x^2e^x,−2xex-2xe^x,+2ex+2e^x. The signs come from the recursion, not from the functions.

The coefficients1,2,21, 2, 2 are the falling factorials2!/(2−k)!2!/(2-k)! — that is,22, then2⋅12\cdot1, then nothing left. For degreenn the coefficients aren!n! divided by the remaining factorial, and forn=3n=3 they are3,6,63, 6, 6.

That structure is why the tabular method works: the table's diagonal products automatically carry the right coefficients and signs, so the bookkeeping is done by the layout.

Worked example: degree three

∫x3ex dx\int x^3e^x\,dx, three applications, giving

ex(x3−3x2+6x−6)+C.e^x\left(x^3 - 3x^2 + 6x - 6\right) + C.

Factoring outexe^x is worth doing: the bracket is the whole answer's structure, and writing it that way makes the coefficients visible as the falling factorials3,6,63, 6, 6.

Check by differentiating the product, using the product rule once onexe^x times the bracket:

ex(x3−3x2+6x−6)+ex(3x2−6x+6)=ex⋅x3.✓e^x\left(x^3 - 3x^2 + 6x - 6\right) + e^x\left(3x^2 - 6x + 6\right) = e^x\cdot x^3. ✓

The bracket's own derivative cancels all but its leading term against the bracket itself, which is exactly what the three applications arranged.

That full check is worth doing once. It confirms both the coefficients and the alternating signs, and it is the only way to be sure a three-application computation is right.

By the end you can
  • Apply parts repeatedly, once per degree of the polynomial
  • Distribute each application's coefficient through its bracket
  • Predict the alternating signs and the falling-factorial coefficients
Check yourself
  1. 1. How many applications for∫x5ex dx\int x^5e^x\,dx?
  2. 2. Evaluate∫x2e−x dx\int x^2 e^{-x}\,dx (two applications).
  3. 3. What is the sign of the third term in a three-application result?
Answers
  1. 1. Five.
  2. 2.−(x2+2x+2)e−x+C-(x^2+2x+2)e^{-x} + C.
  3. 3. Negative, since the pattern is++,−-,++ for the terms in order.
Work out where to start — free, no accountAnswer six real questions — free, no account