11.2 Integration by parts

When differentiating a function f(x)=a(x)b(x)f(x)=a(x)\cdot b(x), the product rule (as in Section 10.5) tells us that

ddx[f(x)]=ddx[a(x)]b(x)+a(x)ddx[b(x)]\frac{d}{dx}\left[f(x)\right]=\frac{d}{dx}\left[a(x)\right]b(x)+a(x)\frac{d}{% dx}\left[b(x)\right] (11.1)

We can also integrate this expression,

ddx[f(x)]𝑑x=(ddx[a(x)]b(x)+a(x)ddx[b(x)])𝑑x\int\frac{d}{dx}\left[f(x)\right]dx=\int\left(\frac{d}{dx}\left[a(x)\right]b(x% )+a(x)\frac{d}{dx}\left[b(x)\right]\right)dx (11.2)

As integration is linear11 1 That is, the integral of a sum is the same as the sum of the integrals., this is equivalent to

ddx[f(x)]𝑑x=ddx[a(x)]b(x)𝑑x+a(x)ddx[b(x)]𝑑x\int\frac{d}{dx}\left[f(x)\right]dx=\int\frac{d}{dx}\left[a(x)\right]b(x)dx+% \int a(x)\frac{d}{dx}\left[b(x)\right]dx (11.3)

As (by definition) dfdx𝑑x=f(x)\int\frac{df}{dx}dx=f(x), it is the case that

f(x)=a(x)b(x)=ddx[a(x)]b(x)𝑑x+a(x)ddx[b(x)]𝑑xf(x)=a(x)\cdot b(x)=\int\frac{d}{dx}\left[a(x)\right]b(x)dx+\int a(x)\frac{d}{% dx}\left[b(x)\right]dx (11.4)

Why is this useful? First we can do a little addition/rearranging

22 2 Note that \iff means \sayif and only if - i.e. that the two equations are equivalent.
a(x)b(x)=ddx[a(x)]b(x)𝑑x+a(x)ddx[b(x)]𝑑x\displaystyle a(x)\cdot b(x)=\int\frac{d}{dx}\left[a(x)\right]b(x)dx+\int a(x)% \frac{d}{dx}\left[b(x)\right]dx (11.5)
ddx[a(x)]b(x)𝑑x=a(x)b(x)a(x)ddx[b(x)]𝑑x\displaystyle\iff\int\frac{d}{dx}\left[a(x)\right]b(x)dx=a(x)\cdot b(x)-\int a% (x)\frac{d}{dx}\left[b(x)\right]dx (11.6)

This gives us (a somewhat awkward) way to integrate products of expressions!

Example 11.2.1

Find the value of

zsin(z)𝑑z\int z\sin(z)dz (11.7)

First, fear not the fact that this is an integral in zz. As with sums, the variable itself does not matter (we could rename zz to anything else, and the integral would still be the same integral)! Note that we could solve this without using integration by parts; we could think about what would differentiate to give us zsin(z)z\sin(z), but this is no fun (it’s much nicer to have a systematic way to solve a problem than to rely on lucky guessing)!

We start by trying to work out what should be what in the identity in Equation 11.6. We are starting with the left-hand side, and want to set ddz[a(z)]=sin(z)\frac{d}{dz}\left[a(z)\right]=\sin(z) and b(z)=zb(z)=z. Why? Because in the integral on the right-hand side, we calculate the integral of the integral of a(z)a(z) and the derivative of b(z)b(z) and what makes the problem \sayhard is not that we don’t know how to find the integral of either sin(z)\sin(z) or zz, it’s that we don’t know how to find the integral of the two multiplied together! As the derivative of zz is just 11, this gives us a way to rewrite the integral of the product of zz and sin(z)\sin(z) in terms of only the integral of sin(z)\sin(z).

Let us proceed by using the formula for integration by parts (let us agree to set x=zx=z if you’re not convinced that the variables can be renamed without changing the structure of the expressions), that is

zsin(z)𝑑z=(sin(z)𝑑z)z(sin(z)𝑑z)𝑑z\int z\sin(z)dz=\left(\int\sin(z)dz\right)z-\int\left(\int\sin(z)dz\right)dz (11.8)

The sin(z)𝑑z\int\sin(z)dz appears, because if ddz[a(z)]=sin(z)\frac{d}{dz}\left[a(z)\right]=\sin(z), then a(z)=sin(z)𝑑za(z)=\int\sin(z)dz. We can proceed by simply evaluating the integrals on the right-hand side (all of which we know how to integrate)!

zsin(z)𝑑z\displaystyle\int z\sin(z)dz =cos(z)z(cos(z))𝑑z+C\displaystyle=-\cos(z)z-\int\left(-\cos(z)\right)dz+C (11.9)
=cos(z)z+cos(z)𝑑z+C\displaystyle=-\cos(z)z+\int\cos(z)dz+C (11.10)
=cos(z)z+sin(z)+C\displaystyle=-\cos(z)z+\sin(z)+C (11.11)

That this is the correct integral can be verified by differentiating the expression. You might also ask, why does the constant of integration CC remain unchanged after each step (doesn’t each integral add something to it). The answer is that it doesn’t - at each step we are effectively redefining CC to be Cnew=Cold+kC_{\text{new}}=C_{\text{old}}+k (where kk is the constant of the new integral) - if we were to create a new constant each time it would get messy, so we can just \sayfold all the constants into one new super-constant!