Integration by Parts: Formula, LIATE and Worked Examples
Master integration by parts: the formula, how LIATE picks u, the tabular shortcut, the looping e^x sin x trick, and fully worked examples.
By the PracticeCalculus team Published 7 min read
On this page
- What is integration by parts?
- When to use integration by parts
- How to choose u: the LIATE rule
- Worked example 1: x times e^x
- Worked example 2: x times cos x
- Worked example 3: the integral of ln x
- Worked example 4: a definite integral
- The tabular method for repeated integration by parts
- The looping case: e^x sin x
- Common integration by parts mistakes
- Quick reference
- Practice until LIATE is automatic
U-substitution handles \int 2x e^{x^2}\,dx easily. But change it to \int x e^x\,dx and no substitution helps, because the two factors have nothing to do with each other. Integration by parts is built for exactly this situation: a product of two different kinds of functions.
What is integration by parts?
Integration by parts is the product rule in reverse. The product rule says (uv)' = u'v + uv'. Integrate both sides and rearrange, and you get the integration by parts formula:
Here u is a function you will differentiate (to get du), and dv is the part you will integrate (to get v). The formula trades the original integral \int u\,dv for a new one, \int v\,du. The whole game is choosing u and dv so the new integral is easier.
For definite integrals the same formula reads
When to use integration by parts
Reach for parts after you have ruled out a simpler u-substitution. Good signs that parts is the right tool:
- The integrand is a product of two different kinds of function, such as a polynomial times an exponential or a polynomial times a trig function.
- The integrand is a single function that is easy to differentiate but hard to integrate, such as \ln x, \arctan x or \arcsin x.
- Neither factor is the derivative of something inside the other. (If it were, substitution would work.)
How to choose u: the LIATE rule
A good u gets simpler when you differentiate it, and a good dv must be something you can integrate. The LIATE rule ranks function types. Choose u to be whichever factor appears first:
| Letter | Type | Examples |
|---|---|---|
| L | Logarithmic | \ln x, \log_2 x |
| I | Inverse trig | \arctan x, \arcsin x |
| A | Algebraic | x, x^2, 3x + 1 |
| T | Trigonometric | \sin x, \cos 2x |
| E | Exponential | e^x, e^{3x}, 2^x |
Why this order? Logs and inverse trig functions are hard to integrate but have simple derivatives, so they belong in u. Exponentials and sines are just as easy to integrate as to differentiate, so they make a natural dv.
Tip: LIATE is a strong guideline, not a law. If your choice makes the new integral worse, swap u and dv and try again.
Worked example 1: x times e^x
Evaluate \int x e^x\,dx.
Step 1. Choose u and dv. Algebraic beats exponential, so u = x and dv = e^x\,dx.
Step 2. Compute du and v. du = dx and v = e^x.
Step 3. Apply the formula.
Step 4. Finish the easier integral.
Check: the derivative of e^x(x-1) is e^x(x-1) + e^x = x e^x. Correct.
If you had chosen u = e^x and dv = x\,dx instead, the new integral would be \int \tfrac{x^2}{2}e^x\,dx, which is worse. That is LIATE saving you.
Worked example 2: x times cos x
Evaluate \int x\cos x\,dx.
Step 1. u = x (algebraic), dv = \cos x\,dx (trig).
Step 2. du = dx, v = \sin x.
Step 3.
Watch the sign: \int \sin x\,dx = -\cos x, and subtracting it gives +\cos x.
Worked example 3: the integral of ln x
Evaluate \int \ln x\,dx.
There seems to be only one factor, but you can always write dv = dx.
Step 1. u = \ln x, dv = dx.
Step 2. du = \frac1x\,dx, v = x.
Step 3.
The same trick handles \int \arctan x\,dx. With u = \arctan x and dv = dx, you get x\arctan x - \int \frac{x}{1+x^2}\,dx, and a quick u-substitution finishes it:
Worked example 4: a definite integral
Evaluate \int_1^e \ln x\,dx.
Using the antiderivative from example 3:
The tabular method for repeated integration by parts
When u is a polynomial like x^3, you would need to apply parts three times, each time reducing the power by one. The tabular method (sometimes called the DI method) does all the rounds at once.
- In the left column, write u and keep differentiating until you reach 0.
- In the right column, write dv and keep integrating, one row per derivative.
- Draw diagonals from each left entry to the right entry one row down, with signs alternating +, -, +, -, \dots
- Add up the diagonal products.
Worked example 5: tabular method for x³ sin x
Evaluate \int x^3\sin x\,dx.
| Sign | Differentiate u | Integrate dv |
|---|---|---|
| + | x^3 | \sin x |
| - | 3x^2 | -\cos x |
| + | 6x | -\sin x |
| - | 6 | \cos x |
| 0 | \sin x |
Multiply each left entry by the right entry one row below it, using the sign in its row:
Check: differentiating gives -3x^2\cos x + x^3\sin x + 6x\sin x + 3x^2\cos x + 6\cos x - 6x\sin x - 6\cos x = x^3\sin x. Everything else cancels.
The tabular method works smoothly whenever u eventually differentiates to zero and dv is easy to integrate over and over, so polynomial times e^{ax}, \sin(ax) or \cos(ax).
The looping case: e^x sin x
Some integrals never reduce to zero. Instead, after two rounds of parts, the original integral comes back. That is not a dead end. It is the solution.
Worked example 6: integrate e^x sin x
Evaluate I = \int e^x\sin x\,dx.
Step 1. First round. Let u = \sin x, dv = e^x\,dx. Then du = \cos x\,dx, v = e^x:
Step 2. Second round, same pattern. In the new integral let u = \cos x, dv = e^x\,dx. Then du = -\sin x\,dx, v = e^x:
Step 3. Substitute back.
Step 4. Solve for I. Add I to both sides: 2I = e^x(\sin x - \cos x), so
Check: the derivative is \tfrac12\left[e^x(\sin x - \cos x) + e^x(\cos x + \sin x)\right] = \tfrac12\cdot 2e^x\sin x = e^x\sin x.
Tip: in the second round, keep the same type of function as u (trig both times). If you switch and pick u = e^x, you will undo the first step and end up with I = I.
Common integration by parts mistakes
- Choosing u backward. Setting u = e^x in \int x e^x\,dx makes the integral harder. Follow LIATE.
- Sign errors. The formula has a minus sign, and \int\sin x\,dx = -\cos x adds another. Most wrong answers come from here.
- Forgetting v in the uv term. It is uv, not u\,dv.
- Missing the alternating signs in the tabular method. Every other diagonal is negative.
- Switching types in the loop. In \int e^x\sin x\,dx, stay with trig as u both times.
- Dropping +C or forgetting to evaluate uv at both bounds in a definite integral.
Quick reference
| Integral | Choose u | Result |
|---|---|---|
| \int x e^x\,dx | x | e^x(x-1) + C |
| \int x\cos x\,dx | x | x\sin x + \cos x + C |
| \int x\sin x\,dx | x | -x\cos x + \sin x + C |
| \int \ln x\,dx | \ln x | x\ln x - x + C |
| \int \arctan x\,dx | \arctan x | x\arctan x - \frac12\ln(1+x^2) + C |
| \int e^x\sin x\,dx | \sin x | \frac12 e^x(\sin x - \cos x) + C |
| \int e^x\cos x\,dx | \cos x | \frac12 e^x(\sin x + \cos x) + C |
Practice until LIATE is automatic
Integration by parts rewards repetition more than any other technique: the formula is short, but choosing u well and keeping the signs straight only becomes second nature with practice. The interactive lesson below gives you instant feedback on each step, so you can catch a flipped sign before it becomes a habit.
Practice it now
Integration by parts
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson