Uni-Sine
MathematicsCalculus

Integration by parts

Integration by parts is a method for integrating a product of two functions, such as x eˣ or x sin x. The formula is ∫u dv = uv − ∫v du: you choose one factor to differentiate (u) and one to integrate (dv), and the new integral on the right should be easier than the one you started with. It is the product rule for derivatives, run backward.

Integration by parts formula

\int u\ dv = uv - \int v\ duThe integration by parts formula

UK textbooks and the Edexcel A-level formula booklet write the same thing with derivatives:

\int u\frac{dv}{dx}dx = uv - \int v\frac{du}{dx}dx
SymbolWhat it isHow you get it
uThe part you will differentiateYou choose it
dvThe part you will integrate (including dx)Everything that is not u
duThe derivative of u, times dxDifferentiate u
vAn antiderivative of dvIntegrate dv (no + C needed here)

Where the formula comes from

Start with the product rule for two functions u and v:

\frac{d}{dx}(uv) = u\frac{dv}{dx} + v\frac{du}{dx}

Integrate both sides with respect to x. The left side just gives back uv:

uv = \int u\frac{dv}{dx}dx + \int v\frac{du}{dx}dx

Rearrange, and you have the formula. So every integration by parts problem is a product rule problem in reverse.

How to do integration by parts

  1. Choose u and dv. Pick u so that it gets simpler when you differentiate it. The rest of the integrand, including dx, is dv.
  2. Find du and v. Differentiate u and integrate dv.
  3. Substitute into the formula: uv − ∫v du.
  4. Do the new integral. If it is still a product, you may need integration by parts again.
  5. Add + C at the end of an indefinite integral.

Choosing u with LIATE

Choosing well is most of the skill. LIATE is a rule of thumb: pick u from whichever type of function comes first in this list.

LetterType of functionExamples
LLogarithmicln x
IInverse trigarctan x, arcsin x
AAlgebraic (polynomials and powers)x, x², 3x + 1
TTrigonometricsin x, cos x
EExponentialeˣ, e²ˣ

Functions near the top get simpler when differentiated: ln x becomes 1/x, and x² becomes 2x and then 2. Functions near the bottom are easy to integrate and don't get worse: eˣ stays eˣ. LIATE is a guide, not a law, but it works for nearly every textbook problem.

Integration by parts examples

Example 1: ∫x eˣ dx

Algebraic comes before exponential, so u = x and dv = eˣ dx. Then du = dx and v = eˣ.

\int xe^x\ dx = xe^x - \int e^x\ dx = xe^x - e^x + C

Check by differentiating: the product rule gives eˣ + x eˣ − eˣ = x eˣ. It works.

Example 2: ∫x cos x dx

u = x and dv = cos x dx, so du = dx and v = sin x.

\int x\cos x\ dx = x\sin x - \int \sin x\ dx = x\sin x + \cos x + C

Example 3: ∫arcsin x dx

There seems to be only one function here, but you can write the integrand as arcsin x times 1. Take u = arcsin x and dv = dx, so du = dx/√(1 − x²) and v = x.

\int \arcsin x\ dx = x\arcsin x - \int \frac{x}{\sqrt{1 - x^2}}\ dx

The new integral is a quick substitution with w = 1 − x², and it comes to −√(1 − x²). So:

\int \arcsin x\ dx = x\arcsin x + \sqrt{1 - x^2} + C

The same "times 1" trick works for the integral of ln x: with u = ln x and dv = dx, it comes out as x ln x − x + C.

Example 4: ∫(2x + 1) ln x dx

Logarithmic beats algebraic, so u = ln x and dv = (2x + 1) dx. Then du = (1/x) dx and v = x² + x.

\int (2x + 1)\ln x\ dx = (x^2 + x)\ln x - \int \frac{x^2 + x}{x}\ dx

Divide before you integrate: (x² + x)/x is just x + 1.

= (x^2 + x)\ln x - \int (x + 1)\ dx = (x^2 + x)\ln x - \frac{x^2}{2} - x + C

If you had chosen u = 2x + 1 instead, you would need to integrate ln x for v and the problem would get harder, not easier.

Example 5: ∫x² eˣ dx, by parts twice

u = x², dv = eˣ dx, so du = 2x dx and v = eˣ:

\int x^2e^x\ dx = x^2e^x - \int 2xe^x\ dx

The new integral is example 1 times 2, so use parts again:

= x^2e^x - 2(xe^x - e^x) + C = e^x(x^2 - 2x + 2) + C

Each round lowers the power of x by one, so a polynomial of degree n needs n rounds.

Practice choosing u before the harder cases.

practice
Pick an answer, then check it.
To find ∫x³ ln x dx by parts, which choice of u works best?

Integration by parts with a loop: ∫eˣ sin x dx

Some integrals never get simpler, but they come back to where they started. Then you solve for the integral like an unknown. Call it I.

Round 1: u = sin x and dv = eˣ dx, so du = cos x dx and v = eˣ:

I = e^x\sin x - \int e^x\cos x\ dx

Round 2: u = cos x and dv = eˣ dx, so du = −sin x dx and v = eˣ:

I = e^x\sin x - \left(e^x\cos x + \int e^x\sin x\ dx\right) = e^x\sin x - e^x\cos x - I

The original integral has appeared again. Add I to both sides and divide by 2:

I = \frac{e^x}{2}(\sin x - \cos x) + C

Keep the same type of function as u in both rounds (trig here). If you switch, the second round simply undoes the first.

The tabular method

When u is a polynomial that eventually differentiates to 0, the tabular (or DI) method saves a lot of writing. List u and its derivatives in one column, dv and its integrals in the other, then multiply diagonally with alternating signs, starting with +.

For ∫x³ eˣ dx:

SignDifferentiate uIntegrate dv
+x³eˣ
−3x²eˣ
+6xeˣ
−6eˣ
0eˣ

Multiply each entry in the middle column by the entry one row down in the right column, using the sign on its row:

\int x^3e^x\ dx = x^3e^x - 3x^2e^x + 6xe^x - 6e^x + C = e^x(x^3 - 3x^2 + 6x - 6) + C

Integration by parts for definite integrals

For a definite integral, apply the limits to the uv part as well:

\int_a^b u\ dv = \left[uv\right]_a^b - \int_a^b v\ du

Example 6: ∫ from 0 to π of x sin x dx

u = x and dv = sin x dx, so du = dx and v = −cos x:

\int_0^{\pi} x\sin x\ dx = \left[-x\cos x\right]_0^{\pi} + \int_0^{\pi} \cos x\ dx
= (-\pi\cos\pi + 0) + \left[\sin x\right]_0^{\pi} = \pi + 0 = \pi
y = \begin{cases} { x\cdot\sin\left( x\right)}, &\quad{\text{if }\;\left( x\geq0\wedge x\leq3.1416\right)}\\{\infty}, &\quad{\text{otherwise}}\end{cases}
-0.50.511.522.533.50.511.520highest pointπ
Drag to pan, scroll to zoom. x from -0.5 to 3.6, y from -0.364 to 2.18.

Here x is the input in radians and y = x sin x. The curve stays above the x-axis between 0 and π, and the area under it is exactly π, about 3.14. You can shade this area and check the value in the Integral Calculator.

When to use integration by parts

  • Use it for a product of two different types of function where one simplifies when differentiated: x eˣ, x² sin x, x ln x.
  • Use it for single functions with no simple antiderivative of their own: ln x, arcsin x, arctan x.
  • Try substitution first when one factor is the derivative of something inside the other, like 2x eˣ² or x cos(x²). For ∫2x eˣ² dx, the substitution w = x² is much quicker than parts.

Common mistakes

  • Choosing u the wrong way round. If the new integral looks harder, swap u and dv. LIATE helps.
  • Sign errors, especially with sin and cos. The integral of sin x is −cos x.
  • Forgetting the limits on uv in a definite integral. [uv] from a to b must be evaluated too.
  • Dropping the dx from dv. dv includes the dx, which keeps track of what you integrate.
  • Forgetting + C on indefinite integrals, or adding it to v midway, which is unnecessary.
  • Switching function types between rounds in a loop integral, which just undoes the first round.

Integration by parts in exams

In the US, integration by parts is in AP Calculus BC (topic 6.11) but not AP Calculus AB, and it is a core technique in college Calculus II. In the UK it is part of A-level Maths, and the Edexcel formula booklet gives the formula, so you need to know how to use it rather than memorize it.

The daily AP Calculus BC and College Calculus II & III papers are short timed practice tests of 8 questions, with a new one every day. In the UK, the same practice is A-level Maths: Calculus. If you are new to integration, start with the Calculus course.

Common questions

What is the integration by parts formula?
∫u dv = uv − ∫v du. In derivative form, ∫u (dv/dx) dx = uv − ∫v (du/dx) dx.
How do you choose u in integration by parts?
Use LIATE: pick u from the first type that appears in Logarithmic, Inverse trig, Algebraic, Trigonometric, Exponential. The rest is dv.
What is the integral of ln x?
x ln x − x + C, found by parts with u = ln x and dv = dx.
What is the integral of x eˣ?
x eˣ − eˣ + C, or eˣ(x − 1) + C, with u = x and dv = eˣ dx.
Is integration by parts on the AP Calculus AB exam?
No. It is a BC-only topic in the AP Calculus course and exam description.
What if integration by parts goes in a circle?
If the original integral reappears, call it I, collect the I terms on one side and solve. This happens with integrals like eˣ sin x.
What is the tabular method?
A shortcut for repeated integration by parts: differentiate u down to 0 in one column, integrate dv in the other, and multiply diagonally with alternating signs.

Revision cards

Say the answer first, then flip the card to check it.

Where to go next

  • Solve it

    Integral Calculator

    Integrate step by step and shade the area under the curve

    Open the tool
  • Learn it

    Calculus

    Differentiation, integration and the mathematics that drives physics and engineering

    Start the course
  • Test it

    AP Calculus BC

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Maths · CalculusIntegration A-level Maths: methods, formulas and examplesA-level Maths integration in one place: standard integrals, definite integrals, areas, substitution, parts, partial fractions and differential equations.