Topics You Need To Understand For This Page
Calculus Main Topics
Tools
Related Topics and Links
Integration by Parts 
Be careful that you know the difference between integration by substitution and integration by parts. 
Integration by parts is an extremely important and useful integration technique. Most integrals you come across won't be in a simple form. The idea is to 'reduce' or alter the original integral by breaking it up into pieces that can then be evaluated using the techniques you know so far. You will find that even a small change in an integral will often make a big change in the technique used and the final solution. 


Integration by parts refers to the use of the equation \(\int{ u~dv } = uv  \int{ v~du }\).
It is important to read the next section to understand where this comes from.
Deriving the Integration By Parts Equation 
The integration by parts equation comes from the product rule for derivatives. We will show an informal proof here.
Let u and v be functions of t.
Using the product and chain rules, we take the derivative of \(u \cdot v\) to get 
\(\displaystyle{ \frac{d}{dt}[ u \cdot v] = u \frac{dv}{dt} + v \frac{du}{dt} }\) 
Now we isolate the \(\displaystyle{ u \frac{dv}{dt} }\) term to get 
\(\displaystyle{ u \frac{dv}{dt} = \frac{d}{dt}[ u \cdot v]  v \frac{du}{dt} }\) 
Next, we integrate both sides with respect to \(t\) to get 
\(\displaystyle{ \int{ u \frac{dv}{dt} ~dt } = }\) \(\displaystyle{ \int{ \frac{d}{dt}[ u \cdot v] ~dt }  \int{ v \frac{du}{dt} ~dt } }\) 
Using the idea of differentials, we end up with 
\(\displaystyle{ \int{ u ~dv } = u \cdot v  \int{ v ~du } }\) 
Here is a video showing the same derivation as above.
 PatrickJMT  Deriving the Integration by Parts Formula  Easy! 

Using Integration By Parts 
The key to using integration by parts is learning what to choose for u and dv from the given integral. This is something you will develop a feel for as you get experience working these problems. However, there are some guidelines you can use as you are learning.
General Guidelines
1. Choose the dv term to make integration easy to get v since integration is usually more difficult than taking the derivative.
2. If you have a natural log term, always choose it to be equal to u. Remember, \((\ln x)'=1/x\) but \(\int{\ln(x)~dx} \neq 1/x \). [ one of the practice problems solves the integral \(\int{\ln(x)~dx}\) demonstrating what happens when you don't do this ]
3. If you have a polynomial, set it equal to u since taking the derivative to get du will reduce the power by one. [ the reduction formula video below shows why this works ]
Specific Guidelines
There is a rule of thumb called the LIATE rule that suggests which function to choose for u. By going down the list, try choosing the first function you come across as u. This rule does not work ALL the time but it is a good place to start as you are learning integration by parts.
LIATE Rule 
L  logarithmic functions like \(\ln(x)\) 
I  inverse trig functions like \(\arcsin(x)\) 
A  algebraic functions like polynomials 
T  trigonometric functions like \(\sin(x)\) 
E  exponential functions like \(e^{3x}\) 
source: wikipedia 
Other Situations That You Will See
 You will come across an integral where you may need to use integration by parts multiple times. This is especially true when you have a polynomial. [ the reduction formula video below demonstrates this ]
 Another case you will run into is that, after using integration by parts once or more, you may end up with the same integral you started out with. It looks like you don't accomplish anything or it loops back on itself. However, there is a way to solve these types of integrals. [ one of the practice problems solves the integral \(\int{e^{2x}\sin(x)~dx}\) showing this ]
Here are three videos showing how to derive reduction formulas. Although you will may never use the results of these videos directly, they are very good videos to watch to help you understand integration by parts.
In the first video, he derives the reduction formula for \( \int{ x^n e^x ~dx} \) and, in the process, demonstrates two of the main points discussed above, (1) choosing u as the polynomial reduces the power in the next step, and (2) doing integration by parts multiple times is sometimes necessary.
 Dr Chris Tisdell  Reduction formula: integration


In this video, she derives the reduction formula for \( \int{ (\ln x)^n ~dx} \).
 Krista King Math  Integration by parts to prove the reduction formula 

In this video, he derives the reduction formula for \( \int{ \sec^n(x) ~dx} \).
Although the notation gets a bit messy, this is a good video demonstrating the use of integration by parts. If you get lost, just try to get the main points he is making.
 PatrickJMT  Reduction Formula for: Integral of [sec(x)]^n dx 

Okay, time for you to try some practice problems.
Instructions   Unless otherwise instructed, use integration by parts to evaluate these integrals, giving your answers in exact form.
Practice A01 
\(\displaystyle{\int{x\sin(x)~dx}}\) 


\(\displaystyle{\int{x\sin(x)~dx}=\sin(x)x\cos(x)+C}\) 
The general form of integration by parts is \( \int{u~dv} = uv  \int{v~du} \). The key is to choose \( u \) and \( dv \).
\( u = x \)   \( dv = \sin(x)~dx\) 
\(du = dx\)   \( v = \cos(x) \) 
We chose \( u = x \) since, after taking the derivative, the power is reduced by one to zero, which causes the \(x\) to disappear. Now we have
\(\displaystyle{ \int{x \sin(x)~dx} = }\) \(\displaystyle{
x \cos(x)  \int{\cos(x)~dx} = }\) \(\displaystyle{
x \cos(x) + \sin(x) + C = }\) \(\displaystyle{
\sin(x)  x \cos(x) + C
}\)
Practice A01 Final Answer 
\(\displaystyle{\int{x\sin(x)~dx}=\sin(x)x\cos(x)+C}\) 
Practice A02 
\(\displaystyle{\int{x\sec^2(x)~dx}}\) 


\(\int{x \sec^2(x)~dx}=x\tan(x)+\ln\abs{\cos(x)}+C\) 
The general form of integration by parts is \( \int{u~dv} = uv  \int{v~du} \).
\( u = x \)   \( dv = \sec^2(x)~dx \) 
\(du = dx\)   \( v = \tan(x) \) 
\(\displaystyle{\int{x \sec^2(x)~dx} = }\) \(\displaystyle{
x \tan(x)  \int{\tan(x)~dx} = }\) \(\displaystyle{
x \tan(x)  \int{\frac{\sin(x)}{\cos(x)}dx}}\)
Now we use substitution by letting \( u = \cos(x) ~~~ \to ~~~ du = \sin(x)~dx \)
\(\displaystyle{ \int{\frac{\sin(x)}{\cos(x)}dx} = }\) \(\displaystyle{
\int{\frac{1}{u}du} = }\) \(\displaystyle{
\ln\abs{u}+C = \ln\abs{\cos(x)} + C
}\)
Practice A02 Final Answer 
\(\int{x \sec^2(x)~dx}=x\tan(x)+\ln\abs{\cos(x)}+C\) 
Practice A03 
\(\displaystyle{\int{xe^{x}~dx}}\) 

Practice A04 
\(\displaystyle{\int{\ln(x)~dx}}\) 


\(\displaystyle{\int{\ln x~dx}=x\ln xx+C}\) 
Here are two video solutions to this problem from two different instructors.
Practice A04 Final Answer 
\(\displaystyle{\int{\ln x~dx}=x\ln xx+C}\) 
Practice A05 
\(\displaystyle{\int{x~5^x~dx}}\) 

Practice A06 
\(\displaystyle{\int_{1}^{2}{\frac{\ln(x)}{x^2}~dx}}\) 

Practice A07 
\(\displaystyle{\int{x^3\ln(x)~dx}}\) 

Practice A08 
\(\displaystyle{\int{x\cos(3x)~dx}}\) 

Practice A09 
\(\displaystyle{\int{xe^{2x}dx}}\) 

Practice A10 
\(\displaystyle{\int{\arctan(x)~dx}}\) 

Practice A11 
\(\displaystyle{\int{xe^x~dx}}\) 

Practice A12 
\(\displaystyle{\int{x^7\ln(x)~dx}}\) 

Practice B01 
\(\displaystyle{\int{x^2\sin(x)~dx}}\) 


\(\displaystyle{\int{x^2\sin(x)~dx}=(2x^2)\cos(x)+2x\sin(x)+C}\) 
This solution will require the use of integration by parts twice (due to the \(x^2\) term). The general form is \( \int{u~dv} = uv  \int{v~du} \). The key is to choose \( u \) and \( dv \).
\( u = x^2 \)   \( dv = \sin(x)~dx \) 
\(du = 2x~dx\)   \( v = \cos(x) \) 
We chose \(u=x^2 \) since after taking the derivative, the power is reduced by one. Now we have
\(\displaystyle{
\int{x^2 \sin(x)~dx} = }\) \(\displaystyle{
x^2 \cos(x)  \int{\cos(x) (2x~dx)} = }\) \(\displaystyle{
x^2 \cos(x) + 2 \int{x~\cos(x)~dx}
}\)
Now we need to use integration by parts again.
\( u = x \)   \( dv = \cos(x)~dx \) 
\(du = dx\)   \( v = \sin(x) \) 
Now we have
\(\displaystyle{
\begin{array}{rcl}
& & x^2 \cos(x) + 2 \int{x~\cos(x)~dx} \\
& = & x^2 \cos(x) + 2 \left[x \sin(x)  \int{\sin(x)~dx}\right] \\
& = & x^2 \cos(x) + 2x \sin(x)  2 (\cos(x)) + C \\
& = & x^2 \cos(x) + 2x \sin(x) + 2\cos(x) + C \\
& = & (2x^2)\cos(x) + 2x \sin(x) + C
\end{array}}\)
Practice B01 Final Answer 
\(\displaystyle{\int{x^2\sin(x)~dx}=(2x^2)\cos(x)+2x\sin(x)+C}\) 
Practice B02 
\(\displaystyle{\int{x^2\sin^2(x)~dx}}\) 


\(\displaystyle{\int{x^2~\sin^2(x)~dx}=}\) \(\displaystyle{\frac{1}{24}\left[4x^3+3(12x^2)\sin(2x)6x~\cos(2x)\right]+C}\) 
This solution will require the use of integration by parts twice (due to the \(x^2\) term). But first let's reduce the \(\sin^2(x)\) using the identity \( \sin^2(x) = (1\cos(2x))/2 \). Now we have
\(\displaystyle{ \int{x^2~\sin^2(x)~dx} = }\) \(\displaystyle{
\int{x^2 \frac{1\cos(2x)}{2} dx} = }\) \(\displaystyle{
\frac{1}{2}\int{x^2  x^2 \cos(2x) dx} = }\) \(\displaystyle{
\frac{1}{2}\left[ \frac{x^3}{3}  \int{x^2\cos(2x)~dx} \right]}\)
Okay, so let's do integration by parts.
The general form is \( \int{u~dv} = uv  \int{v~du} \). The key is to choose \( u \) and \( dv \).
\( u = x^2 \)   \( dv = \cos(2x)~dx \) 
\(du = 2x~dx \)   \( v = \sin(2x)/2\) 
We chose \( u = x^2 \) since after taking the derivative, the power is reduced by one. Now we have
\(\displaystyle{
\begin{array}{rcl}
& & \frac{1}{2}\left[ \frac{x^3}{3}  \int{x^2\cos(2x)~dx} \right] \\
& = & \frac{1}{2}\left[ \frac{x^3}{3}  \frac{x^2}{2}\sin(2x) + \int{\frac{\sin(2x)}{2}(2x)dx } \right] \\
& = & \frac{1}{2}\left[\frac{x^3}{3}  \frac{x^2}{2}\sin(2x) + \int{x~\sin(2x)~dx} \right]
\end{array}}\)
Now we need to use integration by parts again.
\( u = x \)   \( dv = \sin(2x)~dx \) 
\(du = dx\)   \( v = \cos(2x)/2 \) 
Now we have
\(\displaystyle{
\begin{array}{rcl}
& & \frac{1}{2}\left[ \frac{x^3}{3}  \frac{x^2}{2}\sin(2x) + \int{x~\sin(2x)~dx} \right] \\
& = & \frac{1}{2}\left[ \frac{x^3}{3}  \frac{x^2}{2}\sin(2x) + \frac{x}{2}\cos(2x)  \int{\frac{\cos(2x)}{2} dx} \right] \\
& = & \frac{1}{2}\left[ \frac{x^3}{3}  \frac{x^2}{2}\sin(2x)  \frac{x}{2}\cos(2x) + \frac{1}{2}\int{\cos(2x)~dx} \right] \\
& = & \frac{1}{2}\left[ \frac{x^3}{3}  \frac{x^2}{2}\sin(2x)  \frac{x}{2}\cos(2x) + \frac{1}{2}\frac{\sin(2x)}{2} \right] + C \\
& = & \frac{1}{2}\left[ \frac{x^3}{3}  \frac{x^2}{2}\sin(2x)  \frac{x}{2}\cos(2x) + \frac{\sin(2x)}{4} \right] + C\\
& = & \frac{1}{24} \left[ 4x^3  6x^2 \sin(2x)  6x ~\cos(2x) + 3\sin(2x) \right] + C\\
& = & \frac{1}{24}\left[ 4x^3 + 3(12x^2)\sin(2x)  6x~\cos(2x) \right] + C
\end{array}}\)
Practice B02 Final Answer 
\(\displaystyle{\int{x^2~\sin^2(x)~dx}=}\) \(\displaystyle{\frac{1}{24}\left[4x^3+3(12x^2)\sin(2x)6x~\cos(2x)\right]+C}\) 
Practice B03 
\(\displaystyle{\int{(\ln x)^2dx}}\) 

Practice B04 
\(\displaystyle{\int{e^{2x}\sin(x)~dx}}\) 

Practice B05 
\(\displaystyle{\int{x^2e^xdx}}\) 

This is a great video to learn the relationship between integration by parts and the tabular method. Keep in mind, though, that some instructors may not allow the use of this technique since it is a way to get around understanding how to do integration by parts. As usual, check with your instructor to see what they require.
Practice B06 
\(\displaystyle{\int{e^{7x}\cos(2x)~dx}}\) 

Practice B07 
\(\displaystyle{\int{x^3e^xdx}}\) 

Practice B08 
\(\displaystyle{\int{e^{2\theta}\sin(3\theta)~d\theta}}\) 

Practice B09 
\(\displaystyle{\int_{\sqrt{\pi/2}}^{\sqrt{\pi}}{\theta^3\cos(\theta^2)~d\theta}}\) 

Her notation is incorrect here (and you may lose points if you work it like she did), be careful not to do what she does.
She leaves her limits of integration in terms of \(\theta\) when her equations are in terms of x. She should have either dropped her limits of integration while she was using x's or she should have converted her limits in terms of x.
So her first integral entirely in terms of \(x\) should have been
\(\displaystyle{ \frac{1}{2}\int_{\pi/2}^{\pi}{x \cos(x)~dx} }\)
Notice that the limits are as follows
\( x = \theta^2 \) 
lower limit  \( \theta = \sqrt{\pi/2} \to x = \pi/2 \) 
upper limit  \( \theta = \sqrt{\pi} \to x = \pi \) 
This may seem like a minor issue but it can lead to major problems down the road and you could lose points in class.
Practice B10 
\(\int{\ln(3r+8)~dr}\) 


\(r\ln(3r+8)r+(8/3)\ln(3r+8)+C\) 
Practice B10 Final Answer 
\(r\ln(3r+8)r+(8/3)\ln(3r+8)+C\) 
Practice C01 
\(\displaystyle{\int{(4t^28t+5)~e^{t^23t}dt}}\) Tricky!  Hint 


\(\displaystyle{\int{(4t^28t+5)e^{t^23t}dt}=(2t1)e^{t^23t}+C}\) 
Let \(u=t^23t ~~~ \to ~~~ du/dt=2t3\) and divide into \(4t^28t+5\) to get \(4t^28t+5=(2t1)(2t3)+2\).
So our integral looks like
\(\displaystyle{\int{ (4t^28t+5)e^{t^23t} dt } = }\) \(\displaystyle{
\int{ (2t1)(2t3)e^{t^23t} dt } + \int{ 2e^{t^23t} dt }}\)
Now we will use integration by parts on the first integral.
\( u = 2t1 \)   \( dv = (2t3)e^{t^23t} dt \) 
\(du = 2~dt\)   \( v = e^{t^23t} \) 
\(\displaystyle{
\begin{array}{rcl}
& & \int{ (4t^28t+5)e^{t^23t} dt } \\
& = & \int{ (2t1)(2t3)e^{t^23t} dt } + \int{ 2e^{t^23t} dt } \\
& = & (2t1)e^{t^23t}  \int{2e^{t^23t} dt} + \int{ 2e^{t^23t} dt } + C \\
& = & (2t1)e^{t^23t} + C
\end{array}}\)
Practice C01 Final Answer 
\(\displaystyle{\int{(4t^28t+5)e^{t^23t}dt}=(2t1)e^{t^23t}+C}\) 