Kim’s Math NotesCourse index

Integrating Using Integration by Parts

How do I choose u and dv, and when do I need the table?

Try substitution first. For parts, pick what to differentiate and what to integrate, then use HI minus DI. Use a table when the process repeats.

Losing the minus sign or forgetting the endpoints

Common mistake A common slip integrates cosx as −sinx, or leaves the endpoints off the held product.

Correction The antiderivatives of cosx run sinx,−cosx,−sinx. With bounds, evaluate the held product at both endpoints and keep the bounds on the remaining integral.

Substitution or parts? Look inside d( )

Let's start with an integral you've seen before: two x times cosine of x squared. Two x d x is just d of x squared. It's the same as saying u equals x squared, so d u equals two x d x. So the integral is cosine of x squared, d of x squared. Look: the inside of the cosine and the inside of the d are the same thing, x squared.

Call it a triangle. When they match, it's substitution.

Watch this part of the concept lesson

Read the rest of this scene

It's just the integral of cosine: sine of x squared, plus C. Now ours. Cosine x d x is d of sine x, so this is the integral of x, d of sine x. Outside the d is x, but inside the d is sine x. They're different. They don't match, so we need a new tool: integration by parts. If you can't tell, try substitution first.

If that doesn't work, then go to parts. That order saves you time.

The formula: HI minus DI

Start with the product rule: the derivative of u v is u prime v, plus u v prime. Integrate both sides. On the left, integrating a derivative just gives you back u v. On the right, you get the integral of u prime v, plus the integral of u v prime. We want this one, so move the other integral across.

The integral of u v prime is u v, minus the integral of u prime v.

Watch this part of the concept lesson

Read the rest of this scene

Here's the easy way to read it. It's a product, so pick the piece to differentiate and the piece to integrate. Up here, that's u and v prime. Then it's HI minus DI. HI is this u v part.

Hold the piece you're differentiating just as it is, integrate the other piece once, and multiply. DI is this integral, u prime v. Now differentiate that same piece, and multiply by the antiderivative you already found, not a new one. Then integrate that product and subtract it. So how do you pick?

You're going to differentiate one piece, so pick the one that gets simpler when you do. The other piece gets integrated once, and you use that answer twice, so pick one you can actually integrate. Your textbook probably writes it shorter: the integral of u d v is u v, minus the integral of v d u. It's the same thing. u is the piece you differentiate, and d v is the piece you integrate, d x and all. That's the product rule, run backward.

And it has a name: integration by parts. With bounds, every piece gets them, HI included: u v from a to b, minus the DI integral, u prime v from a to b.

Pick the D and I factors, and how to choose them

Back to our integral, x cosine x. Write your choice down first. We'll differentiate x, and we'll integrate cosine x. Then fill in the other two. Differentiate x, and you get one.

Integrate cosine x, and one antiderivative is sine x.

Watch this part of the concept lesson

Read the rest of this scene

Now HI minus DI. Hold x and integrate cosine: x sine x. Then one times that same sine x, so minus the integral of sine x d x. The integral of sine is negative cosine, so we get x sine x, plus cosine x, plus C. Check it by differentiating.

The derivative of x sine x plus cosine x comes back to exactly x cosine x. Now let's flip it and see what happens. This time we differentiate cosine x and integrate x. Then x integrates to x squared over two, and the new integral has x squared over two, times sine x. The power went up, so it got harder. Wrong choice.

And that's the rule we got from the formula. The piece you differentiate should get simpler when you differentiate it, and the piece you integrate should be one you can actually integrate. A lot of teachers give this order a name, LIATE: logs, inverse trig, algebraic, trig, exponential. Logs come first, and exponentials come last.

Here's how to use it. Whichever piece is further left, you differentiate. Whichever is further right, you integrate.

One piece: ∫f(x)dx = x f(x) − ∫x f′(x)dx

Now natural log x by itself. Not sure what to do? Like I said at the start, try substitution first. But to make natural log x the inside, we'd need a one over x next to the d x. There isn't one, so it doesn't simplify. Parts it is. Here's my rule: in parts, we never take the log as the piece to integrate.

It's always the piece we differentiate.

Watch this part of the concept lesson

Read the rest of this scene

So what do we integrate? The hidden one in front, one times natural log x. Integrate that one, and you get x. This works for any f. HI minus DI: hold f and integrate the one to get x f of x, then minus the integral of x times f prime of x.

For natural log x, f prime is one over x. So it's x natural log x, minus the integral of x times one over x. The x's cancel, so the integral of natural log x is x natural log x, minus x, plus C. Now let's put bounds on it, from one to e. Both parts get the bounds: x natural log x from one to e, minus the integral of d x from one to e.

That's e minus zero, minus the quantity e minus one. Exactly one.

Repeat HI minus DI: the table

Sometimes the new integral still needs parts. Take x squared e to the x. HI minus DI gives x squared e to the x, minus the integral of two x e to the x. Each round integrates the antiderivative you got the round before. Here that's easy: e to the x integrates to e to the x every time.

Do HI minus DI again on what's left: two x e to the x, minus the integral of two e to the x.

Watch this part of the concept lesson

Read the rest of this scene

There's still an integral, so HI minus DI once more: two e to the x, minus the integral of zero, since two differentiates to zero. Now plug them back in, one inside the other. x squared e to the x, minus the quantity two x e to the x, minus the quantity two e to the x, minus the integral of zero. Open the brackets, and the signs alternate: x squared e to the x, minus two x e to the x, plus two e to the x. The integral of zero is just plus C.

Now line it all up in a table. In the D row, keep differentiating x squared, and stop right before you hit zero. The I row starts with the first antiderivative and keeps integrating. For e to the x, that's e to the x every time. Multiply across in pairs, first with first, second with second, and alternate the signs: plus, minus, plus.

That's the tabular method. Use the table any time you've got a polynomial times an exponential, a sine, or a cosine. It's just parts over and over, only faster. But natural log never differentiates down to zero, so the table never stops. With natural log, go back to LIATE.

Repeat: two examples

Let's try it on real integrals. Example A is x squared times e to the x. We differentiate x squared and integrate e to the x. HI minus DI: x squared e to the x, minus the integral of two x e to the x. There's still an x, so HI minus DI again: two x e to the x, minus the integral of two e to the x.

Open the bracket: x squared e to the x, minus two x e to the x, plus two e to the x, plus C.

Watch this part of the concept lesson

Read the rest of this scene

Plus, minus, plus. Example B is x cubed times sine x. That would take three rounds of parts, so let's use the table. The D row: x cubed, three x squared, six x, six. The I row: negative cosine x, negative sine x, cosine x, sine x.

Signs: plus, minus, plus, minus. Multiply in pairs: negative x cubed cosine x, plus three x squared sine x, plus six x cosine x, minus six sine x, plus C.

Example 1: a log in the product

Example one. Find the integral of x squared times natural log x. The plan: logs come first in LIATE, and in parts we never take the log as the piece to integrate. So we differentiate natural log x. Write it down: natural log x gets differentiated, and x squared gets integrated.

So natural log x differentiates to one over x, and x squared integrates to x cubed over three. HI is x cubed over three, natural log x. Then minus DI: the integral of that same x cubed over three, times one over x. One x cancels, so the new integrand is just x squared over three. Integrate it: x cubed over three, natural log x, minus x cubed over nine, plus C. That's the answer.

Watch this part of the concept lesson

Read the rest of this scene

Try the same move in your workbook before the solution.

Example 2: the table with bounds

Example two, A. P. style. Find the integral from zero to pi of x squared cosine x. There are four choices. The plan: it's a polynomial times a cosine, so use the table, and plug in the bounds at the very end. In the D row, differentiate the polynomial: x squared, then two x, then two.

In the I row, integrate the cosine, carefully: sine x, then negative cosine x, then negative sine x.

Watch this part of the concept lesson

Read the rest of this scene

Now multiply them in pairs, with plus, minus, plus: x squared times sine x, minus two x times negative cosine x, plus two times negative sine x, all from zero to pi. Before any numbers go in, clean up the signs inside the bracket: x squared sine x, plus two x cosine x, minus two sine x. Now the bounds, pi first. At pi, both sines are zero, and two pi cosine pi is negative two pi. At zero, the sines are zero, and two times zero wipes out the middle term.

So the answer is A.

Common mistake: differentiating row I

This is where people lose points with the table. Watch the I row. Here's how it goes wrong. With cosine x, out of habit, people differentiate the I row: negative sine, then negative cosine. That's going the wrong direction.

The fix: integrate, every single time.

Watch this part of the concept lesson

Read the rest of this scene

The I row goes sine x, then negative cosine x, then negative sine x. Check each one by differentiating back.

Example 3: no formula, only values

Example three, an AP favorite. f has a continuous derivative. f of one is two, f of four is seven, f prime of one is negative three, f prime of four is five, and the integral of f from one to four is nine. Find the integral from one to four of x f prime of x. We don't have a formula for f.

But f prime of x d x is just d of f of x. So the integral of x f prime of x becomes x, d of f of x. Outside is x, inside the d is f of x.

Watch this part of the concept lesson

Read the rest of this scene

They're different, so it's parts. Fill in the boxes: we differentiate x, which gives one, and we integrate f prime of x, which gives back f of x. HI minus DI, with the bounds on both parts: x f of x, from one to four, minus the integral of f, from one to four. Plug in the values: four times seven, minus one times two. Then subtract the nine they gave us.

Twenty-six minus nine: seventeen. And look at f prime of one and f prime of four. We never used them. They were just there to throw you off. Now it's your turn.

Try the integral from one to four of x plus two, times f prime of x, using the same values.

Worked examples

Example 1

Find ∫x2lnxdx.
Hint

Differentiate the log and integrate the power.

Answer and solution

Answer x33lnx−x39+C

  1. Differentiate lnx→1x,integrate x2→x33
  2. =x33lnx−∫x23dx=x33lnx−x39+C

Example 2

∫0πx2cosxdx is
  1. −2π
  2. −4
  3. 2π
  4. 0
Hint

Table: D x2,2x,2; I sinx,−cosx,−sinx; ends at the end.

Answer and solution

Answer A. −2π

  1. [x2sinx+2xcosx−2sinx]0π=2πcosπ=−2π
  2. Answer A.

Example 3

f has a continuous derivative, with f(1)=2, f(4)=7, f′(1)=−3, f′(4)=5, and ∫14f(x)dx=9. Find ∫14xf′(x)dx.
Hint

Differentiate x and integrate f′(x) to get f(x).

Answer and solution

Answer 17

  1. ∫14xf′(x)dx=[xf(x)]14−∫14f(x)dx
  2. =(4⋅7−1⋅2)−9=17

Workbook

Problem 1

Find ∫x3lnxdx.
Hint

Differentiate the log. Which power do you integrate?

Answer and solution

Answer x44lnx−x416+C

  1. Differentiate lnx→1x,integrate x3→x44
  2. =x44lnx−∫x34dx=x44lnx−x416+C

Common mistake Choosing the log as the factor to integrate sends you back to another integration-by-parts problem.

Watch the worked solution to Problem 1

Problem 2

Find ∫xe3xdx.
Hint

Hold x in the first product and integrate e3x.

Answer and solution

Answer x3e3x−19e3x+C

  1. Differentiate x→1,integrate e3x→13e3x
  2. =x3e3x−∫13e3xdx=x3e3x−19e3x+C

Common mistake Integrating e3x as 3e3x instead of 13e3x.

Watch the worked solution to Problem 2

Problem 3

Find ∫0π2xsinxdx.
Hint

Evaluate the held product [−xcosx]0π/2 at both endpoints.

Answer and solution

Answer 1

  1. Differentiate x→1,integrate sinx→−cosx
  2. =[−xcosx]0π/2+∫0π/2cosxdx=0+[sinx]0π/2=1

Common mistake Putting the ends only on the second integral.

Watch the worked solution to Problem 3

Problem 4

∫x2sinxdx=
  1. −x2cosx−2xsinx−2cosx+C
  2. x2cosx−2xsinx+2cosx+C
  3. −x2cosx+2xsinx+2cosx+C
  4. −x2cosx+2xsinx−2cosx+C
Hint

Table: row I integrates sinx three times.

Answer and solution

Answer C. −x2cosx+2xsinx+2cosx+C

  1. D: x2,2x,2. I: −cosx,−sinx,cosx. Signs +,−,+.
  2. =−x2cosx+2xsinx+2cosx+C
  3. Answer C.

Common mistake Differentiating row I, or losing a sign.

Watch the worked solution to Problem 4

Problem 5

f has a continuous derivative, with f(1)=2, f(4)=7, and ∫14f(x)dx=9. Find ∫14(x+2)f′(x)dx.
Hint

Hold x+2 in the first product and integrate f′(x) to get f(x).

Answer and solution

Answer 27

  1. f′(x)dx=d(f(x)),differentiate x+2→1,integrate f′(x)→f(x)
  2. =[(x+2)f(x)]14−∫14f(x)dx=(6⋅7−3⋅2)−9=27

Common mistake Using x instead of x+2 at the ends.

Watch the worked solution to Problem 5

Problem 6

Find ∫(x+5)cosx4dx.
Hint

∫cosx4dx=4sinx4: the 4 comes out, not 14.

Answer and solution

Answer 4(x+5)sinx4+16cosx4+C

  1. Differentiate x+5→1,integrate cosx4→4sinx4
  2. =4(x+5)sinx4−∫4sinx4dx=4(x+5)sinx4+16cosx4+C

Common mistake Missing the factor of 4 in the antiderivative of cos(x/4).

Watch the worked solution to Problem 6