Integration by parts
Integration by parts is used when we want to find an antiderivative of a function that is a product.
Deriving the formula
We base the derivation on the classic formula for derivatives.
Suppose we have functions u and v that are differentiable on some interval J, that is, u′ and v′ exist. Now we integrate both sides. We get:
On the left-hand side we can remove the integral and the derivative, because if we differentiate a function and then integrate it back, we get the original function (up to the constant c).
Let's make the integral in which the function v is differentiated the subject:
So the function
First example
We will use an example to show how we use integration by parts. We will work out the integral
This type of integral cannot be done with the ordinary methods we met in the basic article on integrals. Since the given function is a product, we use integration by parts.
In the formula
we have the functions u and v, and we need to choose them sensibly. So what is being asked of us? According to the formula above, we can work out the integral
A suitable choice is very important, because with a poor choice we are more likely to complicate things. Look at what we get on the right-hand side if we use the formula above. The expression u · v will not be a problem, but we will have to work out the integral
We choose the functions like this:
That gives us the left-hand side of the equation, because in its integral it contains exactly the product u · v′. On the right-hand side we also have the product u · v and another integral. So we need to work out u′ and v. The derivative of u is easy:
Now we need to work out v from v′, that is, we integrate v′. Once more – we chose v′ = cos x. But on the right-hand side of the equation we work with the value v, without the derivative. In other words, if we differentiate the v that appears in the integrand on the right-hand side, we must get exactly the v′ we chose on the left-hand side. So we are looking for a function that equals cos x after differentiating. Put another way – we integrate v′.
Let's put what we know into a table:
From this table we substitute into the formula
which gives us this:
We can see that we managed to turn the integral into a different form, one that we can now solve more easily. We will not simplify the expression x · sin x any further, we just work out the integral on the right. That is a simple standard integral:
So we can write that
That is the result.
A poor choice of functions
Let's use this example to show what would happen if we chose the functions u and v′ differently. Before, we chose
so now we try it the other way round:
We work out the values of u′ and v. We get:
Now we integrate v′:
We write it in a table:
We substitute into the formula:
We can see that we have not helped ourselves much. In the question we have the integral of x · cos x, and now integration by parts has taken us to the integral
How to choose the functions u and v′
Unfortunately there is no universal rule, and you need a bit of a feel for it. It also helps to look at what you will do with the functions next. The basic formula we start from looks like this:
If we are integrating a function f that is a product, we try to split it into functions u and v′ so that f = u · v′. The aim of integration by parts is for the integral on the right-hand side,
To make the integral on the right simpler, it is a good idea to choose for u a function that becomes simpler when differentiated. Typically these are functions of the type xn, where differentiating lowers the power by one. For example, from x2 we get 2x and from x we get 1 – that is absolutely ideal.
For v′, on the other hand, we try to take something that will not become more complicated when integrated. We cannot usually expect integrating v′ to give a simpler function, but we can hope for a function that is about as complicated. Typically these are sine and cosine, because one integrates to the other, which does not bother us.
Second example
Let's try a more complicated example:
The integral of the function ex is again ex, so it is an ideal candidate for integrating. On the other hand, differentiating x2 gives 2x, which is a simpler expression. So we choose the functions like this:
The whole table looks like this:
We substitute into the formula:
We have got a simpler integral, but we still cannot work it out completely. We do another round of integration by parts. So now we are working out this integral:
The procedure is the same as in the previous step. We choose the functions like this:
And we get:
We take the number 2 out in front of the integral and get:
And the integral of ex is again ex:
We now substitute this result back into the previous equation:
After substituting we get:
Now we just tidy up the result into a more human form. First we remove the bracket by multiplying its contents by −1, and then we take out ex:
And we have the result.
The integral of the logarithm
This is a real evergreen of integration by parts. Behold this legendary integral:
What is interesting about this integral is that although there is no product in it, we will solve it using integration by parts. We simply multiply the logarithm by one. That does not change the function we are integrating, but it gives us a multiplication.
How do we choose the functions u and v′? We cannot yet integrate the function ln x (we are looking for its integral right now), so we will differentiate the logarithm. We will integrate the one. This gives us:
The derivative of the logarithm is 1/x:
and the integral of one is x:
We fill in the table:
And we substitute into the formula:
We work out the integral on the right-hand side:
So we get the result:
Chapters: Integral, Integration by parts, Integration by substitution, Definite integral