Integration by parts

If u(x) and v(x) are two functions, thanks to the derivation rules, we know thatd(uv)=udv+vdu antiderivative uv=udv+vdu

and, therefore, udv=uvvdu

This is the integration by parts formula and it will be useful to us to compute many integrals and, although it may seem difficult, it is such a useful fromula that it is woth memorizing it.

To be able to choose, decide what u(x) is and what v(x) is in a given integral; we always have to bear in mind that the integral that we will have to find when using the integration by parts is v(x)u(x). That is, the term that we take as the derivative will then be integrated, while we will take the derivative of the other term. Sometimes we will not write the variable x, although we will always bear it in mind. We must remember that dv=v(x)dxand that du=u(x)dx.

The procedure to follow is:

  1. Choose the functions u and dv.
  2. Compute du and v.
  3. Use the formula and find the value of the integral.

Example

xex dx

In this case,

u=xdu=1dxdv=ex dxv=ex dx=ex

sot that:

xex dx=xexex dx=xexex+C

As we can see, when trying to do an integral by parts, we will always have to solve another integral. The essence of the integrals by parts is that this new integral is easier than the previous one. However, we may have to do several steps before we are actually able to solve the integral.

It can also be the case that, after several steps, we obtain the same initial integral. In such case, we will call the initial integral I and we will solve the obtained equation in terms of I.

Example

Integral by parts in 2 steps. x2ex dx

We take, in this case

u=x2du=2xdxdv=ex dxv=ex dx=ex

so that:

x2ex dx=x2ex2xexdx with the new integral already calculated in the example 1.

Taking the same functions xexdx=xexex dx=xexex, and we can replace the value of this integral to obtain:

x2exdx=x2ex2xexdx=x2e2(xexex)+C=ex(x22x+2)+C

Example

sin2x dx

This integral can be calculated in several ways (it is not a direct integral. The derivative is missing!).

To solve it by parts, we will take

u=sinxdu=cosxdxdv=sinx dxv=sinx dx=cosx

We then have:

sin2x dx=sinxcosxcos2x dx=sinxcosx+cos2x dx==sinxcosx+1sin2x dx=sinxcosx+xsin2x dx

Where we have used cos2x=1sin2x.

And so, we have the same integral as the one we had at the beginning.

sin2xdx=sinxcosx+xsin2x dx

If we isolatesin2x dx we have:

2sin2x dx=sinxcosx+xsin2x dx=12sinxcosx+x2+C

Example

arctanx dx

This integral may look difficult, but we can take u=arctg(x) and dv=1 (often it is a very useful trick to take dv=1).

We have then:

u=arctanxdu=11+x2dxdv=1 dxv=x

and thus:

arctanc dx=xarctanxx1+x2 dx=xarctanx12ln|1+x2|

where x1+x2 dx is an almost direct integral.