Chalk−1

Math · Calculus II · Concept

Integration by parts: formula and examples

Integration by parts is the product rule run backward. It rewrites the integral of u d⁢v as u⁢v minus the integral of v d⁢u, trading an integral you cannot do for one you can. It works when the integrand is a product in which one factor gets simpler when differentiated, such as x, and the other is easy to integrate, such as ex or cosx. It even integrates lnx, written as lnx times 1.

Try one — Chalk checks each line

A concrete case

Undo a product rule by hand

Find a function whose derivative is xcosx. Substitution does not help, because neither factor is the derivative of something inside the other. The product rule, though, is what makes products like this one. Differentiating xsinx gives sinx+xcosx, which holds the target and one extra term, sinx.

Remove the extra term by subtracting a function whose derivative is sinx. That function is −cosx, so the candidate is xsinx−(−cosx) =xsinx+cosx. Its derivative is sinx+xcosx−sinx, which is xcosx exactly.

A slope near x=1 settles it. There the target xcosx is cos1≈0.5403. The candidate is about 1.38177 at x=1 and 1.38231 at x=1.001. It climbs about 0.00054 over a step of 0.001, a rate of about 0.540.

The guess worked because x became 1 when differentiated, which left an extra term with no x in it. Integration by parts turns that guess into a method.

dd⁢x(xsinx+cosx)=sinx+xcosx−sinx=xcosx
dd⁢x(xsinx+cosx)=sinx+xcosx−sinx=xcosx

The rule

The formula

Integration by parts applies to an integral of a product. Name one factor u, and call the rest of the integrand, d⁢x included, d⁢v. Then d⁢u=u′(x) d⁢x is the differential of u, and v is any one antiderivative of what d⁢v holds, written without +C.

The formula trades the integral of u d⁢v for the integral of v d⁢u. The product u⁢v, the integrated term, is what the trade costs. The trade pays when the integral of v d⁢u is easier than the one you started with.

∫ud⁢v=u⁢v−∫vd⁢u

Choosing u and d⁢v

Choose u to be the factor that gets simpler when differentiated, and d⁢v a factor you can integrate. A power of x drops a degree with each derivative. lnx and arctanx turn into fractions with no logarithm or inverse function left. ex, sinx and cosx stay just as hard either way, so they usually go in d⁢v.

The order logarithmic, inverse trigonometric, algebraic, trigonometric, exponential, remembered as LIATE, puts the usual u first. It is a guide, not a law, and the table lists common cases.

Common choices of u and d⁢v
Integrandud⁢vv
xexxex d⁢xex
xcosxxcosx d⁢xsinx
x2 e3⁢xx2e3⁢x d⁢xe3⁢x/3
xlnxlnxx d⁢xx2/2
arctanxarctanxd⁢xx

Why it works

Why it works

Start from the product rule, (u⁢v)′=u′v+uv′. Integrating both sides undoes the derivative on the left, which gives u⁢v=∫vu′ d⁢x+∫uv′ d⁢x, with the constants gathered into one +C at the end. Moving one integral across the equals sign gives ∫uv′ d⁢x=u⁢v−∫vu′ d⁢x. Writing d⁢v for v′ d⁢x and d⁢u for u′ d⁢x turns that into the formula.

The formula moves the derivative from one factor to the other. In ∫xex d⁢x, x gives up its derivative, 1, and ex takes its antiderivative, ex. The new integrand is ex⋅1, with no x left. Nothing comes for free, and the integrated term xex carries the difference.

For a definite integral the same steps run between limits. The product rule integrated from a to b gives u⁢(b)⁢v⁢(b)−u⁢(a)⁢v⁢(a) on the left, which is why the integrated term is evaluated at both limits.

∫uv′d⁢x=u⁢v−∫vu′d⁢x

The method

The method in six steps

The table works through ∫x e2⁢x d⁢x. If the integral in step 4 is harder than the one you started with, go back to step 1 and swap the choice.

∫xe2⁢xd⁢x=12xe2⁢x−14e2⁢x+C
∫xe2⁢xd⁢x=12xe2⁢x−14e2⁢x+C
Parts on the integral of x e2⁢x
StepWhat to doFor ∫x e2⁢x d⁢x
1Choose u, the factor that gets simpleru=x
2Call the rest d⁢v, d⁢x includedd⁢v =e2⁢x d⁢x
3Find d⁢u and vd⁢u=d⁢x, v =12e2⁢x
4Write u⁢v−∫v d⁢u12x e2⁢x−∫12e2⁢x d⁢x
5Finish the new integral and add C12x e2⁢x−14e2⁢x+C
6Check by differentiating12e2⁢x+x e2⁢x−12e2⁢x =x e2⁢x

More than one round

Each round of parts on a power of x times ex, sinx or cosx lowers the power by one, so x2 needs two rounds. Keep the same kind of choice in every round, with the power of x as u. Switching in round two, with u=ex, undoes round one and hands back the integral you started from.

Some integrals come back after two rounds. Call I the integral of excosx. Parts with u=cosx, then with u=sinx, gives I=excosx+exsinx−I, an equation for I. Adding I to both sides and dividing by 2 gives I=ex(sinx+cosx)⁢/2, and the +C goes on at the end.

∫excosxd⁢x=ex(sinx+cosx)2+C
∫excosxd⁢x=ex(sinx+cosx)2+C

Definite integrals

For a definite integral, evaluate the integrated term at both limits and subtract, then integrate v d⁢u between the same limits. For the integral of xex from 0 to 1, the integrated term is 1⋅e−0⋅1=e, and the integral of ex from 0 to 1 is e−1. The value is e−(e−1)=1.

∫abud⁢v=[u⁢v]ab−∫abvd⁢u
∫abud⁢v=[u⁢v]ab−∫abvd⁢u

Where it breaks

Where it breaks

Parts helps only when the integral of v d⁢u is easier than the integral of u d⁢v. With ∫xex d⁢x, the choice u=ex and d⁢v=x d⁢x gives v=x2/2 and a new integral of (x2/2)ex, with a higher power than before. The formula is still true, but it moves the wrong way.

A product does not always call for parts. In ∫x ex2 d⁢x the factor x is half the derivative of the inside x2, so substitution finishes it in one line. Parts with u=x would need an antiderivative of ex2, which no formula gives. ∫ex/⁢x d⁢x defeats both methods. Each round of parts raises the power of x in the denominator, and the integral has no antiderivative built from the usual functions. In the table, one small change to the integrand moves it from one method to the other, or past both.

The integral of a product is not the product of the integrals. ∫xex d⁢x is not (x2/2)ex+C, whose derivative is xex+(x2/2)ex.

For a definite integral, u and v need continuous derivatives on the whole interval. lnx and 1⁢/⁢x blow up at x=0, so an integral of them from 0 is improper and needs a limit first.

Three integrals of products
IntegralWhat it needsResult
∫xex d⁢xParts, u=x(x−1)ex+C
∫x ex2 d⁢xSubstitution, u=x212ex2+C
∫ex/⁢x d⁢xNeither worksNo formula from the usual functions

Check your answer

Check your answer

Parts is the product rule run backward, so the surest test runs it forward again.

Check the answer with the product rule. Its derivative should be the integrand exactly. Differentiating xex+ex, a common sign slip, gives xex+2ex, which exposes the slip at once.

For a definite integral, bound the value. On the interval from 0 to 1 the integrand xex rises from 0 to e and bends upward. A single midpoint rectangle, 12e0.5≈0.824, lies below the true area, and the trapezoid, e⁢/2≈1.359, lies above it. The answer 1 sits between them.

Check the sign. A positive integrand integrated from left to right gives a positive value, so a negative result for the integral of xex from 0 to 1 means a sign was lost.

To have Chalk check the work, write it in a Math box. Put the integral on the first row and your antiderivative, with its +C, on the row below. The Checker marks it ✓ when its derivative is the integrand, and “Not an antiderivative of the integrand in row 1.” with ✗ when it isn’t. Chalk does not ask for the +C. xex−ex without it also reads ✓, because it is one antiderivative, so adding the constant for the whole family is up to you. A row that applies the formula, ∫xex d⁢x =xex−∫ex d⁢x, is checked too, and the sign slip xex+∫ex d⁢x reads ✗.

For a definite integral, name the antiderivative and test it before you use it, as the lnx example does. Write F⁢(x)=xex−ex, then F′(x)=xex, then F⁢(1)−F⁢(0)=1, and each row is checked. The sign slip, F⁢(x)=xex+ex, makes the F′ row read ✗, and the message “Not the derivative of row 1.” says why. A bracket on its own row under the integral, [xex−ex] from 0 to 1 with the value below it, is checked too. A wrong bracket reads ✗, with a note to check the antiderivative by differentiating it.

A value written straight under an integral that needs parts is checked for some integrands, such as ∫01 xex d⁢x=1. For others, such as ∫1elnx d⁢x, it reads “?”, because Chalk can’t follow that step of an integral yet. “?” means not verified, not wrong.

In ∫x3ex2 d⁢x, the usual choice is u=x3 and d⁢v=ex2 d⁢x. Does that work, and if not, what does?

No, because ex2 has no antiderivative built from the usual functions, so v cannot be found. Take u=x2 and d⁢v=x ex2 d⁢x, so v=ex2/2. The new integral is ∫x ex2 d⁢x, and the answer is (x2−1)ex2/2+C. A good d⁢v has to be one you can integrate.

Reduction formulas and the factorial

Parts on xnex with u=xn gives ∫xnex d⁢x =xnex−n∫xn−1ex d⁢x. The new integral has the same form with n one lower, so n rounds reach ∫ex d⁢x. A formula that lowers an index each time is a reduction formula. Laid out as two columns, the derivatives of xn beside the antiderivatives of ex, it becomes the tabular method, also called tabular integration, with signs alternating +, −, +.

The same step with e−x, on an interval reaching to infinity, shows that the integral of xne−x from 0 to ∞ is n times the one with n−1. The integral with n=0 is 1, so the value is n!=1⋅2 ⋯ n. With n allowed to be any number greater than −1, that integral is Γ⁢(n+1), the gamma function at n+1. It converges for every such n and extends the factorial beyond whole numbers.

Parts also has a picture. Along a curve where u and v both increase, the region between the curve and the v-axis has area ∫u d⁢v, and the region between the curve and the u-axis has area ∫v d⁢u. Together they fill the L-shaped difference u⁢(b)⁢v⁢(b)−u⁢(a)⁢v⁢(a) of two rectangles.

∫xnexd⁢x=xnex−n∫xn−1exd⁢x
∫xnexd⁢x=xnex−n∫xn−1exd⁢x

Common mistakes

  • Choosing u=ex and d⁢v=x d⁢x for ∫xex d⁢x. The new integral, of (x2/2)ex, is harder than the first. Take u=x, which differentiates to 1, and the new integral is ∫ex d⁢x.
  • Dropping the minus sign in u⁢v−∫v d⁢u. For ∫xex d⁢x it turns the right answer, xex−ex+C, into xex+ex+C, whose derivative carries an extra 2ex.
  • Evaluating the integrated term at the upper limit only. For the integral of xex from 1 to 2, [xex] is 2e2−e, not 2e2. It is part of the antiderivative, so both limits apply.
  • Leaving off the +C. xex−ex is one antiderivative of xex, and the answer is the whole family xex−ex+C. The constant goes on once, at the end, not on v.
  • Switching the choice in the second round. In ∫x2ex d⁢x, round two with u=ex and d⁢v=2⁢x d⁢x brings back x2ex and ends at I=I. Keep the power of x as u in every round.
  • Treating ∫xex d⁢x as (∫x d⁢x)⁢(∫ex d⁢x). That gives (x2/2)ex+C, whose derivative is xex+(x2/2)ex. The integral of a product is not the product of the integrals.

Key terms

Integration by parts
A method that reverses the product rule: ∫u d⁢v=u⁢v−∫v d⁢u. It suits a product in which one factor gets simpler when differentiated and the other is easy to integrate.
Product rule
To differentiate a product, take the derivative of the first factor times the second, plus the first times the derivative of the second: (u⁢v)′=u′v+uv′.
Antiderivative
A function whose derivative is the given function, such as x3 for 3x2. Any two antiderivatives on one interval differ by a constant, which is why answers carry +C.
Integration by substitution
A method that reverses the chain rule: when an integrand has the form f⁡(g⁡(x))⋅g′(x), set u=g⁡(x), so d⁢u=g′(x) d⁢x, and integrate f⁡(u) instead. A definite integral also converts its limits to u-values.
Factorial
For a positive integer n, n! is the product of the integers from 1 through n, and 0! is defined as 1. Factorials count arrangements of distinct objects.

Work through an example

Find the integral of xex with respect to x.

Integrate xex by parts →

Integrate lnx by parts →

Integrate by parts twice →

Sources and scope

Authored study material. Tool results depend on the stated inputs and model assumptions.

After reading

Try it, then study it

Open the example in its tool to check steps or change values, then review the key terms as flashcards.

Check it by differentiating in Math Check it in Math Study the 5 key terms Open worked example on a board Product rule in Math Reference

Your existing work stays on this device. Examples open as editable copies.