MAT187 L16 - Integration By Parts

#MAT187 PCE
Recall from MAT186 that product rule for two differentiable functions is:

(u(x)v(x))′=u′(x)v(x)+u(x)v′(x)

We can take this trick to derive the integration by parts formula. First, integrate both sides with respect to x:

∫(u(x)v(x))′dx=∫u′(x)v(x)dx+∫u(x)v′(x)dx

The first integral cancels out the derivative inside it (they are inverse functions of each other), so:

u(x)v(x)=∫u′(x)v(x)dx+∫u(x)v′(x)dx

And rearranging that, we get:

∫u(x)v′(x)dx=u(x)v(x)−∫u′(x)v(x)dx

If we express u(x) as u, v(x) as v, dv=v′(x)dx, and du=u′(x)dx we get:

∫udv=uv−∫vdu

Integration by Parts

Given differentiable functions u and v:

∫udv=uv−∫vdu

Integration by parts helps when one of the functions is infinitely differentiable, but the other is finitely differentiable.

Example: Integration by Parts of ∫xe2xdx.

Let u=x, and dv=e2xdx. Then,

∫xe2xdx=x(12e2x)−∫12e2xdx=12xe2x−14e2x+C

Alternatively, if we let u=e2x, and dv=xdx. Then,

∫xe2xdx=12x2e2x−∫12x2e2xdx

...which does not help us because the integral becomes more complicated.
We chose u=x because x is finitely differentiable, whereas e2x is infinitely differentiable.

Example: Integration by Parts of ∫x3ex2dx

(From question 39 of LEC101 Slides)
For this question, there are many options for u and dv. Not all of them will lead to useful values of du and v, however.

u dv v du
x3 e2x2 — 3x2
x2 xex2 — 2x
x x2ex2 — 1
1 x3ex2 — 0
ex2 x3 14x4 2xex2
xex2 x2 13x3 ex2+x(2x)ex2
x2ex2 x 12x2 2xex2+x2(2x)ex2
x3ex2 1 x 3x2ex2+x3(2x)ex2
Side note: the in class method for solving this is a little different from what I did. Oh well.

We can use integration by substitution first to make the integral easier to evaluate.
Let u=x2. Then,

dudx=2x⟹dx=du2x

Thus,

∫x3ex2dx=12∫ueudu

...this allows us to use integration by parts much easier now.

12∫ueudu=12(ueu−eu)+C=12(x2ex2−ex2)+C=12ex2(x2−1)+C

Example: Integration by Parts of ∫exsin⁡xdx

(From question 40 of LEC101 Slides)
For this we can use integration by parts twice, since sin⁡x differentiates back to itself after two iterations (with an added negative sign).
Let u=sin⁡x, dv=ex. Then,

∫exsin⁡xdx=exsin⁡x−∫cos⁡xexdx=exsin⁡x−(cos⁡xex−∫−sin⁡xexdx)=exsin⁡x−cos⁡xex−∫sin⁡xexdx

Now, we can rearrange and isolate for ∫exsin⁡xdx

2∫exsin⁡xdx=exsin⁡x−cos⁡xex=12(exsin⁡x−cos⁡xex)=12ex(sin⁡x−cos⁡x)