Calculus · Grade 12 and undergraduate

Integration by Parts

Quick answer

Integration by parts reverses the product rule. From (uv)′ = u′v + uv′ comes ∫u dv = uv − ∫v du, which trades one integral for another. Choose u to be a factor that gets simpler when differentiated, such as a power of x or ln x, and dv a factor you can integrate, such as eˣ, sin x or cos x. Some integrals need parts twice; some come back to where they started, and then the equation can be solved for the integral.

What you'll learn

  • Derive integration by parts from the product rule
  • Choose u and dv so the new integral is simpler
  • Apply parts repeatedly, and solve for an integral that returns
  • Evaluate definite integrals by parts

The product rule, backward

Substitution undoes the chain rule. Integration by parts undoes the product rule. Start from (uv)′=u′v+uv′(uv)' = u'v + uv' and integrate both sides:

uv=∫v u′ dx+∫u v′ dxuv = \int v\,u'\,dx + \int u\,v'\,dx

With du=u′ dxdu = u'\,dx and dv=v′ dxdv = v'\,dx, solve for the second integral:

∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du

To use it, split the integrand into two factors: uu, which you will differentiate, and dvdv, which you will integrate.

Why parts helps

The formula trades ∫u dv\int u\,dv for ∫v du\int v\,du. The trade moves the derivative from one factor to the other: uu gets differentiated and dvdv gets integrated. If differentiating uu makes it simpler, as it turns xx into 11, the new integral is easier than the old. Choose uu so that differentiating it simplifies the problem.

The formula has a picture. As xx runs along, the point (v,u)(v, u) traces a curve. When uu and vv both start at 00, the area under the curve is ∫u dv\int u\,dv and the area to its left is ∫v du\int v\,du. Together they fill a rectangle of area uvuv.

Two areas that fill a rectangle In a plane with v across and u up, a rising curve runs from the origin to the point (2, 4). The region under the curve is shaded in one color, and the region to the left of the curve, up to u = 4, in another. Together they fill the 2 by 4 rectangle, whose area is uv = 8. 121234vu
  • the curve traced by (v, u)
Two areas that fill a rectangle

The LIATE order is a reliable guide to choosing uu: take the first factor on the list Logarithmic, Inverse trigonometric, Algebraic, Trigonometric, Exponential. Factors late in the list have simple antiderivatives, so they make good choices for dvdv.

Worked examples

Common mistakes

Practice problems

  1. Find ∫xcos⁡x dx\int x\cos x\,dx.

    Answer

    xsin⁡x+cos⁡x+Cx\sin x + \cos x + C

    Full solution

    u=xu = x, dv=cos⁡x dxdv = \cos x\,dx, v=sin⁡xv = \sin x: xsin⁡x−∫sin⁡x dx=xsin⁡x+cos⁡x+Cx\sin x - \int \sin x\,dx = x\sin x + \cos x + C.

  2. Find ∫xe2x dx\int x e^{2x}\,dx.

    Answer

    x2e2x−14e2x+C\tfrac{x}{2}e^{2x} - \tfrac{1}{4}e^{2x} + C

    Full solution

    u=xu = x, v=12e2xv = \tfrac{1}{2}e^{2x}: x2e2x−∫12e2x dx=x2e2x−14e2x+C\tfrac{x}{2}e^{2x} - \int \tfrac{1}{2}e^{2x}\,dx = \tfrac{x}{2}e^{2x} - \tfrac{1}{4}e^{2x} + C.

  3. Find ∫xln⁡x dx\int x\ln x\,dx.

    Answer

    x22ln⁡x−x24+C\tfrac{x^2}{2}\ln x - \tfrac{x^2}{4} + C

    Full solution

    LIATE puts the logarithm first: u=ln⁡xu = \ln x, dv=x dxdv = x\,dx, v=x22v = \tfrac{x^2}{2}. Then x22ln⁡x−∫x22⋅1x dx=x22ln⁡x−x24+C\tfrac{x^2}{2}\ln x - \int \tfrac{x^2}{2} \cdot \tfrac{1}{x}\,dx = \tfrac{x^2}{2}\ln x - \tfrac{x^2}{4} + C.

  4. Find ∫arctan⁡x dx\int \arctan x\,dx.

    Answer

    xarctan⁡x−12ln⁡(1+x2)+Cx\arctan x - \tfrac{1}{2}\ln(1 + x^2) + C

    Full solution

    u=arctan⁡xu = \arctan x, dv=dxdv = dx: xarctan⁡x−∫x1+x2 dxx\arctan x - \int \tfrac{x}{1 + x^2}\,dx. Substitute w=1+x2w = 1 + x^2 in the last integral to get 12ln⁡(1+x2)\tfrac{1}{2}\ln(1 + x^2).

  5. Find ∫x2ex dx\int x^2 e^x\,dx.

    Answer

    ex(x2−2x+2)+Ce^x(x^2 - 2x + 2) + C

    Full solution

    u=x2u = x^2: x2ex−∫2xex dxx^2e^x - \int 2xe^x\,dx. By Example 1, ∫2xex dx=2xex−2ex\int 2xe^x\,dx = 2xe^x - 2e^x. So the answer is x2ex−2xex+2ex+Cx^2e^x - 2xe^x + 2e^x + C.

  6. Evaluate ∫01xex dx\int_0^1 x e^x\,dx.

    Answer

    11

    Full solution

    [xex−ex]01=(e−e)−(0−1)=1\big[x e^x - e^x\big]_0^1 = (e - e) - (0 - 1) = 1.

  7. Evaluate ∫1eln⁡x dx\int_1^e \ln x\,dx.

    Answer

    11

    Full solution

    [xln⁡x−x]1e=(e−e)−(0−1)=1\big[x\ln x - x\big]_1^e = (e - e) - (0 - 1) = 1.

  8. Find ∫excos⁡x dx\int e^x\cos x\,dx.

    Answer

    ex2(sin⁡x+cos⁡x)+C\tfrac{e^x}{2}(\sin x + \cos x) + C

    Full solution

    Call it JJ. Parts with u=cos⁡xu = \cos x: J=excos⁡x+∫exsin⁡x dxJ = e^x\cos x + \int e^x\sin x\,dx. Parts again with u=sin⁡xu = \sin x: ∫exsin⁡x dx=exsin⁡x−J\int e^x\sin x\,dx = e^x\sin x - J. So J=excos⁡x+exsin⁡x−JJ = e^x\cos x + e^x\sin x - J, and 2J=ex(sin⁡x+cos⁡x)2J = e^x(\sin x + \cos x).

  9. Find ∫xsec⁡2x dx\int x\sec^2 x\,dx.

    Answer

    xtan⁡x+ln⁡∣cos⁡x∣+Cx\tan x + \ln\lvert \cos x \rvert + C

    Full solution

    u=xu = x, dv=sec⁡2x dxdv = \sec^2 x\,dx, v=tan⁡xv = \tan x: xtan⁡x−∫tan⁡x dx=xtan⁡x+ln⁡∣cos⁡x∣+Cx\tan x - \int \tan x\,dx = x\tan x + \ln\lvert \cos x \rvert + C, using ∫tan⁡x dx=−ln⁡∣cos⁡x∣+C\int \tan x\,dx = -\ln\lvert \cos x \rvert + C.

  10. A student tries ∫xex dx\int x e^x\,dx with u=exu = e^x and dv=x dxdv = x\,dx, gets x22ex−∫x22ex dx\tfrac{x^2}{2}e^x - \int \tfrac{x^2}{2}e^x\,dx, and concludes the integral cannot be done. What went wrong?

    Hint

    Which factor gets simpler when differentiated?

    Answer

    The choice of uu. With u=xu = x and dv=ex dxdv = e^x\,dx, the answer is xex−ex+Cx e^x - e^x + C.

    Full solution

    Differentiating exe^x leaves it unchanged, while integrating xx raises its power, so the student’s new integral is harder than the original.

    Differentiating xx gives 11, so taking u=xu = x leaves ∫ex dx\int e^x\,dx, which is immediate.

Frequently asked questions

What is the integration by parts formula?

∫u dv = uv − ∫v du. For definite integrals, the uv term is evaluated between the limits.

How do I choose u?

Pick the factor that gets simpler when you differentiate it. The LIATE order — logarithmic, inverse trig, algebraic, trigonometric, exponential — lists the usual first choices for u.

What if the new integral is harder than the original?

Swap the choices. In ∫x eˣ dx, taking u = eˣ raises the power of x; taking u = x removes it.

What if integrating by parts brings back the original integral?

Treat the integral as an unknown I. The equation I = (something) − I can be solved: I = (something)/2, plus C.

How do I integrate ln x?

Use parts with u = ln x and dv = dx: ∫ln x dx = x ln x − x + C.

What to learn next