How to Integrate by Parts: Calculus Help
Integration
There are many different methods of integration, many of which are fairly simple to follow. For functions such as x^2 or sin x, we can integrate by inspection, using our knowledge of differentiation to work it backwards and find our result.
For more complicated functions, we need different methods. These include integration by parts, integration by substitution, integration by partial fraction and much more. In this quick guide, we are going to look at integrating by parts.
For more complicated functions, we need different methods. These include integration by parts, integration by substitution, integration by partial fraction and much more. In this quick guide, we are going to look at integrating by parts.
When to integrate by parts
The most important thing about integration by parts is knowing when this is the right method to use. Generally, we choose to use this method when we are integrating a function consisting of two functions multiplied together. So, for example, if we wanted to integrate f(x) = x cos x, we should definitely consider by parts as we have two functions here, x and cos x, which are being multiplied.
To further investigate when this method should be used, we will look at how it works and then have a go at a few examples.
To further investigate when this method should be used, we will look at how it works and then have a go at a few examples.
How does integration by parts work?
Suppose we have a function f(x), where f(x) = u(x) × v'(x), with u and v, themselves being functions of x. Note that our formula for f(x) includes the derivative of v. We then get that:
∫ u v' dx = u v − ∫ u' v dx
The benefit of using this formula comes when differentiating u and/or integrating v' gives us a function u' v which is much simpler to integrate than the original u v'.
Let's see this in an example to fully get our heads around it.
∫ u v' dx = u v − ∫ u' v dx
The benefit of using this formula comes when differentiating u and/or integrating v' gives us a function u' v which is much simpler to integrate than the original u v'.
Let's see this in an example to fully get our heads around it.
Integrating x cos x by parts
We'll start with our example from above, x cos x. We can see that this is an excellent candidate for integration by parts because if we differentiate the x part, we get 1, essentially removing it from the integration, and the cos x part is easily integrated by itself.
We therefore let u(x) = x and v'(x) = cos x.
For our formula, we will need u'(x) and v(x), so by differentiating x and integrating cos x, we get:
u'(x) = 1 and v(x) = sin x.
We are now ready to use the formula: ∫ u v' dx = u v − ∫ u' v dx
∫ x cos x dx = x × sin x − ∫ 1 × sin x dx
= x sin x − ∫ sin x dx
= x sin x − − cos x + c
= x sin x + cos x + c
where c is our constant of integration.
We therefore let u(x) = x and v'(x) = cos x.
For our formula, we will need u'(x) and v(x), so by differentiating x and integrating cos x, we get:
u'(x) = 1 and v(x) = sin x.
We are now ready to use the formula: ∫ u v' dx = u v − ∫ u' v dx
∫ x cos x dx = x × sin x − ∫ 1 × sin x dx
= x sin x − ∫ sin x dx
= x sin x − − cos x + c
= x sin x + cos x + c
where c is our constant of integration.
Definite integration by parts
When using integration by parts to solve a definite integral (an integral with bounds), it is generally easier to complete the integration without the bounds first and then evaluate the definite integral by substituting the bounds in.
Let's try this by integrating x^−3 ln x with respect to x between x = 1 and x = 4 as shown below.
Let's try this by integrating x^−3 ln x with respect to x between x = 1 and x = 4 as shown below.
Again, this looks suitable for integration by parts as we have two functions multiplying each other. We now need to think about what happens when we differentiate or integrate these separate functions.
We can see quickly that the differential of ln x is 1/x, so if we let u(x) = ln x, this should give us a much simpler integral to complete.
Let u(x) = ln x and v'(x) = x^−3.
Therefore u'(x) = 1/x and v(x) = −(1/2) x^−2
∫ u v' dx = u v − ∫ u' v dx
∫ ln (x) x^−3 dx = −(1/2) x^−2 × ln x − ∫ 1/x × −(1/2) x^−2 dx
= −(1/2) x^−2 ln x − ∫ −(1/2) x^−3 dx
= −(1/2) x^−2 ln x − (1/4) x^−2 + c
Putting our bounds in, we get:
(−(1/2) 4^−2 ln 4 − (1/4) 4^−2) − (−(1/2) 1^−2 ln 1 − (1/4) 1^−2) = ((1/32) ln 4 − 1/64) − (0 −1/4)
= −(1/32) ln 4 + 15/64
We can see quickly that the differential of ln x is 1/x, so if we let u(x) = ln x, this should give us a much simpler integral to complete.
Let u(x) = ln x and v'(x) = x^−3.
Therefore u'(x) = 1/x and v(x) = −(1/2) x^−2
∫ u v' dx = u v − ∫ u' v dx
∫ ln (x) x^−3 dx = −(1/2) x^−2 × ln x − ∫ 1/x × −(1/2) x^−2 dx
= −(1/2) x^−2 ln x − ∫ −(1/2) x^−3 dx
= −(1/2) x^−2 ln x − (1/4) x^−2 + c
Putting our bounds in, we get:
(−(1/2) 4^−2 ln 4 − (1/4) 4^−2) − (−(1/2) 1^−2 ln 1 − (1/4) 1^−2) = ((1/32) ln 4 − 1/64) − (0 −1/4)
= −(1/32) ln 4 + 15/64
Integrating by parts twice
Sometimes, you will be faced with a function where you will need to integrate by parts twice. We have already seen that if x is one of our two functions e.g. x cos x, integrating by parts helps by differentiating the x so that it becomes 1 and giving us a simpler integration with just one function in it.
If we have something like x^2 e^x, however, differentiating the x^2 gives us 2x which would not simplify the integral sufficiently. We will therefore need to apply our method twice in order to solve the problem. Let's look at how to integrate x^2 e^x between the bounds 0 and 1.
If we have something like x^2 e^x, however, differentiating the x^2 gives us 2x which would not simplify the integral sufficiently. We will therefore need to apply our method twice in order to solve the problem. Let's look at how to integrate x^2 e^x between the bounds 0 and 1.
Integrating x^2 e^x by parts
As we want to reduce the power of x, we will let u(x) = x^2 and v'(x) = e^x.
Therefore u'(x) = 2x and v(x) = e^x.
∫ u v' dx = u v − ∫ u' v dx
∫ x^2 e^x dx = x^2 e^x − ∫ 2x e^x dx
As we can't integrate 2x e^x by inspection, we can do it by parts again by letting u(x) = 2x and v'(x) = e^x.
Therefore u'(x) = 2 and v(x) = e^x.
∫ u v' dx = u v − ∫ u' v dx
∫ 2x e^x dx = 2x e^x − ∫ 2 e^x dx
= 2x e^x − 2 e^x + c
In the last step, we simply integrated 2 e^x by inspection.
Putting this second answer back into our middle answer gives us:
∫ x^2 e^x dx = x^2 e^x − (2x e^x − 2 e^x) + c
= e^x (x^2 − 2x + 2) + c
Note that we don't need to worry about the plus or minus sign on the c yet as it is just a constant to be found.
We've now got our bounds of 0 and 1 to substitute in giving us:
e^1 (1^2 − 2 × 1 + 2) − e^0 (0^2 − 2 × 0 + 2) = e^1 − 2
Therefore u'(x) = 2x and v(x) = e^x.
∫ u v' dx = u v − ∫ u' v dx
∫ x^2 e^x dx = x^2 e^x − ∫ 2x e^x dx
As we can't integrate 2x e^x by inspection, we can do it by parts again by letting u(x) = 2x and v'(x) = e^x.
Therefore u'(x) = 2 and v(x) = e^x.
∫ u v' dx = u v − ∫ u' v dx
∫ 2x e^x dx = 2x e^x − ∫ 2 e^x dx
= 2x e^x − 2 e^x + c
In the last step, we simply integrated 2 e^x by inspection.
Putting this second answer back into our middle answer gives us:
∫ x^2 e^x dx = x^2 e^x − (2x e^x − 2 e^x) + c
= e^x (x^2 − 2x + 2) + c
Note that we don't need to worry about the plus or minus sign on the c yet as it is just a constant to be found.
We've now got our bounds of 0 and 1 to substitute in giving us:
e^1 (1^2 − 2 × 1 + 2) − e^0 (0^2 − 2 × 0 + 2) = e^1 − 2
Summary
The things to remember here are:
- Integration by parts is great for integrating functions of the form f(x) = u(x) v'(x) i.e. a function containing two separate functions multiplied together.
- Look for which of the two functions will be made simpler by differentiation or integration and use this to decide which function will be u(x) and which will be v'(x) i.e. x would be great as u(x) because u'(x) then becomes 1. ln x would also be great as u(x) because this gives u'(x) = 1/x which is much easier to work with.
- If you are doing a definite integral, complete the integration first and then put your bounds in at the end.
- Integration by parts can be repeated to remove things such as powers of x higher than 1.
Comments
What do you think of this proof? Do you have a different way of proving that the square root of 2 is irrational?
Don't forget to leave your comments below.
Don't forget to leave your comments below.