Integrals

Integration by Parts: Formula, LIATE Rule and Examples

Integration by Parts: Formula, LIATE Rule and Examples — CalculusCalc cover image

The formula:

$$\int u\,dv = uv - \int v\,du$$

It comes straight from the product rule: integrate \( (uv)' = u'v + uv' \) and rearrange. Use it when the integrand is a product of two different kinds of functions.

The idea is to trade an integral you cannot do for one you can. You differentiate one factor (which should make it simpler) and integrate the other (which should not make it worse), and the formula keeps track of what is left.

Where the formula comes from

Start with the product rule for two differentiable functions \( u(x) \) and \( v(x) \):

$$\frac{d}{dx}\big(uv\big) = u'v + uv'$$

Integrate both sides with respect to \( x \). The left side is the integral of a derivative, so it gives back \( uv \):

$$uv = \int v\,u'\,dx + \int u\,v'\,dx$$

Now write \( du = u'\,dx \) and \( dv = v'\,dx \), and solve for the second integral:

$$\int u\,dv = uv - \int v\,du$$

That is the entire proof. Every integration by parts problem is the product rule used in reverse, in the same way that u-substitution is the chain rule used in reverse.

A picture of it. If \( u \) and \( v \) are both increasing, plot \( v \) on the horizontal axis and \( u \) on the vertical axis. The rectangle with corners at the origin and \( (v, u) \) splits into the area to the left of the curve and the area below it. Those two pieces are \( \int u\,dv \) and \( \int v\,du \), and together they fill the rectangle \( uv \) (minus the starting rectangle). The formula just says the pieces add up to the whole.

How to choose u: the LIATE rule

Pick \( u \) as the function that comes first in this list, and let \( dv \) be the rest:

  1. Logarithmic: \( \ln x \)
  2. Inverse trig: \( \arctan x \), \( \arcsin x \)
  3. Algebraic: \( x \), \( x^2 \), polynomials
  4. Trigonometric: \( \sin x \), \( \cos x \)
  5. Exponential: \( e^x \)

The goal: \( u \) should get simpler when differentiated, and \( dv \) should be easy to integrate.

LIATE is a guideline, not a law. Logarithms and inverse trig functions sit at the top because they are hard to integrate but become simple algebraic expressions when differentiated. Exponentials sit at the bottom because they integrate to themselves. If LIATE’s choice leaves you with a \( dv \) you cannot integrate, switch.

Step by step

  1. Split the integrand into \( u \) and \( dv \) (the \( dx \) always goes with \( dv \)).
  2. Differentiate \( u \) to get \( du \), and integrate \( dv \) to get \( v \).
  3. Write down \( uv - \int v\,du \).
  4. Evaluate the new integral, using parts again, substitution, or a known formula.
  5. Add \( + C \), and check by differentiating: the product rule should give back the original integrand.

Worked examples

1. \( \int x\sin x\,dx \). \( u = x \), \( dv = \sin x\,dx \), so \( du = dx \), \( v = -\cos x \):

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

Why \( u = x \) and not \( u = \sin x \)? Differentiating \( x \) turns it into the constant 1, so the new integral contains only a trig function. If you chose \( u = \sin x \) and \( dv = x\,dx \), you would get \( v = \frac{x^2}{2} \) and a new integral \( \int\frac{x^2}{2}\cos x\,dx \), which is worse than where you started. When the new integral looks harder than the old one, go back and swap your choices.

2. \( \int x\cos x\,dx \) \( = x\sin x + \cos x + C \) (same method).

3. \( \int\ln x\,dx \). \( u = \ln x \), \( dv = dx \): \( x\ln x - x + C \). Full walkthrough in integral of ln x.

4. \( \int\arctan x\,dx \). \( u = \arctan x \), \( dv = dx \), \( du = \frac{dx}{1+x^2} \), \( v = x \):

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

The last step is a u-substitution.

5. \( \int x^2\cos x\,dx \): apply parts twice. In the first round, \( u = x^2 \) and \( dv = \cos x\,dx \), so \( du = 2x\,dx \) and \( v = \sin x \):

$$\int x^2\cos x\,dx = x^2\sin x - \int 2x\sin x\,dx$$

The new integral has a lower power of \( x \), which is progress. It is twice Example 1, so \( \int 2x\sin x\,dx = 2\sin x - 2x\cos x \). Subtracting that whole bracket (watch the signs) gives

$$x^2\sin x + 2x\cos x - 2\sin x + C$$

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

6. \( \int e^x\cos x\,dx \): the “loop” trick. Parts twice brings the original integral \( I \) back:

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

The key is to keep the same type of choice both times (here, \( u \) is the trig function in both rounds). If you switch roles in the second round, you simply undo the first step and get \( I = I \).

7. \( \int x\ln x\,dx \). LIATE puts the logarithm first, so \( u = \ln x \) and \( dv = x\,dx \). Then \( du = \frac{dx}{x} \) and \( v = \frac{x^2}{2} \):

$$\begin{aligned} \int x\ln x\,dx &= \frac{x^2}{2}\ln x - \int\frac{x^2}{2}\cdot\frac1x\,dx \\ &= \frac{x^2\ln x}{2} - \frac{x^2}{4} + C \end{aligned}$$

The \( \frac1x \) from differentiating the log cancels a power of \( x \), which is exactly why logs make good choices for \( u \).

8. \( \int\arcsin x\,dx \). Just like arctangent, take \( u = \arcsin x \) and \( dv = dx \). Then \( du = \frac{dx}{\sqrt{1-x^2}} \) and \( v = x \), leaving \( \int\frac{x}{\sqrt{1-x^2}}dx \), which a substitution with \( w = 1 - x^2 \) turns into \( -\sqrt{1-x^2} \). So

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

Definite integrals

$$\int_a^b u\,dv = \big[uv\big]_a^b - \int_a^b v\,du$$

Example: \( \int_0^{\pi}x\sin x\,dx = \big[\sin x - x\cos x\big]_0^{\pi} = (0 + \pi) - 0 = \pi \).

Another classic: \( \int_1^e\ln x\,dx = \big[x\ln x - x\big]_1^e = (e - e) - (0 - 1) = 1 \).

Parts also handles improper integrals. For \( \int_0^{\infty}xe^{-x}\,dx \), take \( u = x \) and \( dv = e^{-x}dx \). The boundary term \( \big[-xe^{-x}\big]_0^t \) tends to 0 as \( t \to \infty \), because the exponential decays faster than \( x \) grows, and what remains is \( \int_0^{\infty}e^{-x}dx = 1 \).

The tabular method (for polynomial × exp/trig)

For \( \int x^2e^{x}\,dx \), list derivatives of \( x^2 \) (\( x^2, 2x, 2, 0 \)) and integrals of \( e^x \) (\( e^x, e^x, e^x \)). Multiply diagonally with alternating signs:

$$x^2e^x - 2xe^x + 2e^x + C$$

More on this in integral of x·eˣ.

The tabular method is just repeated integration by parts written compactly. It works best when one factor is a polynomial, because the derivative column eventually reaches zero and the table stops on its own.

With a trig factor the integral column cycles. For \( \int x^3\sin x\,dx \), the derivative column is \( x^3, 3x^2, 6x, 6, 0 \) and the integral column is \( -\cos x, -\sin x, \cos x, \sin x \). Multiplying diagonally with signs \( +, -, +, - \) gives

$$-x^3\cos x + 3x^2\sin x + 6x\cos x - 6\sin x + C$$

Common mistakes

  • Choosing \( u = e^x \) in \( \int xe^x\,dx \), which makes the new integral harder.
  • Sign errors in the second round of parts. Put the second step in brackets.
  • Forgetting that \( v \) needs no constant; add a single \( + C \) at the end.
  • Differentiating \( dv \) instead of integrating it. From \( dv = \sin x\,dx \) you need \( v = -\cos x \), not \( \cos x \). Write \( u, v, du, dv \) in a small box before you substitute into the formula.
  • Dropping the boundary term in definite integrals. The \( \big[uv\big]_a^b \) piece must be evaluated at both limits; it is often not zero.

Where it’s used

Integration by parts is behind the standard antiderivatives of \( \ln x \), \( \arctan x \) and \( \arcsin x \), and it is how reduction formulas for \( \int\sin^n x\,dx \) are derived. In probability it computes expected values such as \( \int_0^\infty xe^{-x}dx \). It is also the step that produces the error term in Taylor’s theorem, and in physics and engineering it underlies Fourier series coefficients and the Laplace transform of a derivative.

Try it yourself

Step-by-step solverExact symbolic engine

Interactive Calculus Problem Solver

Derivatives, antiderivatives, definite and improper integrals, and limits. Every answer comes with the rules used, and antiderivatives are verified by differentiating them back.

Try:
Input syntax
  • Powers x^2, roots sqrt(x), cbrt(x), absolute value |x|
  • Implicit multiplication works: 3x sin(2x)
  • sin cos tan sec csc cot, asin acos atan, sinh cosh tanh
  • e^x or exp(x); ln(x) and log(x) are both the natural log
  • Constants pi and e; bounds accept inf and -inf
Enter a function and press Solve to see a full worked solution.

You can check any antiderivative with the integral calculator, which shows the choice of \( u \) and \( dv \) in its working.

Practice problems

Try these before checking the answers.

  1. \( \int x\cos(2x)\,dx \)
  2. \( \int x^3\ln x\,dx \)
  3. \( \int_0^1\arctan x\,dx \)
  4. \( \int xe^{3x}\,dx \)
  5. \( \int(\ln x)^2\,dx \)
  6. \( \int_0^{\pi/2}x\cos x\,dx \)

Answers: (1) \( \frac{x\sin 2x}{2} + \frac{\cos 2x}{4} + C \); (2) \( \frac{x^4\ln x}{4} - \frac{x^4}{16} + C \); (3) \( \frac\pi4 - \frac{\ln 2}{2} \); (4) \( \frac{xe^{3x}}{3} - \frac{e^{3x}}{9} + C \); (5) \( x(\ln x)^2 - 2x\ln x + 2x + C \); (6) \( \frac\pi2 - 1 \).

For (5), take \( u = (\ln x)^2 \) and \( dv = dx \); the leftover integral is \( 2\int\ln x\,dx \), which you already know.

FAQ

How do I know parts is the right method?

Try u-substitution first. If no part of the integrand is the derivative of another part, and you have a product of different function types, use parts.

Why is it called “by parts”?

You integrate one part (\( dv \)) and differentiate the other (\( u \)).

Does LIATE always work?

It works for the large majority of textbook problems, but not all. For \( \int x^3e^{x^2}dx \), for example, the better split is \( u = x^2 \) and \( dv = xe^{x^2}dx \), because that \( dv \) is easy to integrate by substitution while \( e^{x^2} \) alone is not.

Why don’t I add a constant when finding v?

You could, but it always cancels. If you use \( v + K \) instead of \( v \), the extra \( Ku \) in \( uv \) is exactly cancelled by the extra \( \int K\,du \) in the second term.

What if integration by parts keeps going forever?

Either you have chosen \( u \) badly (the new integral is getting harder, not easier), or you are in a loop case like \( e^x\cos x \), where the original integral reappears and you solve for it algebraically.

Further reading

Calculators for this topic

Leave a comment

Your email address will not be published. Required fields are marked *