Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Integrate by Parts

Integration by parts reverses the product rule. Split the integrand into a piece uu to differentiate and a piece dvdv to integrate; the formula trades the integral for a new one that should be simpler.

Recognize the task

A product of two different kinds of function: xexx e^x, xsin⁡xx\sin x, x2ln⁡xx^2\ln x, excos⁡xe^x\cos x. Or a single function whose derivative is simpler than itself: ln⁡x\ln x, arctan⁡x\arctan x (take dv=dxdv = dx). Test: can you pick a factor that gets simpler when differentiated, while the other factor stays integrable?
The formula is integration by parts; it comes from integrating the product rule.

Two ways to do it

Parts once (or twice)usual choice
∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du
Choose uu by LIATE: Logarithmic, Inverse trig, Algebraic, Trigonometric, Exponential. Earlier in the list makes the better uu. Formula.
Tabular (repeated parts)polynomial times exp or trig
u,  u′,  u′′,  …∣v,  ∫v,  ∬v,  …u,\; u',\; u'',\;\ldots \quad\big|\quad v,\; \textstyle\int v,\; \iint v,\;\ldots
When uu is a polynomial, the repeated steps collapse into a table; see tabular integration.

Steps

StepOn ∫xex dx\int x e^x\,dx
1Choose u and dv. uu is the factor that gets simpler when differentiated (LIATE); dvdv is everything else, including dxdx.u=x,dv=ex dxu = x,\qquad dv = e^x\,dx
2Fill in the ledger: du and v. Differentiate uu to get dudu; integrate dvdv to get vv (no +C+C here, it cancels). The exponential antiderivative gives vv.Exponential and reciprocal antiderivatives ↗du=dx,v=exdu = dx,\qquad v = e^x
3Apply uv − ∫v du. Copy the four entries into the formula. Mind the minus sign.xex−∫ex dxx e^x - \int e^x\,dx
4Finish the new integral. If it is still a product, apply parts again. If it comes back to the original integral, solve the equation for it.xex−ex+C=ex(x−1)+Cx e^x - e^x + C = e^x(x - 1) + C
5Check by differentiating. The product rule should give the integrand back.(xex−ex)′=ex+xex−ex=xex(x e^x - e^x)' = e^x + x e^x - e^x = x e^x

Worked examples

Example 1 · polynomial times exponential

basic
∫xex dx\int x e^x\,dx
u=xu = x, dv=exdxdv = e^x dx; du=dxdu = dx, v=exv = e^x
=xex−∫ex dx= x e^x - \int e^x\,dx
uv−∫v duuv - \int v\,du
=xex−ex+C= x e^x - e^x + C

Example 2 · a logarithm alone

dv = dx
∫ln⁡x dx\int \ln x\,dx
u=ln⁡xu = \ln x, dv=dxdv = dx; du=dxxdu = \frac{dx}{x}, v=xv = x
=xln⁡x−∫x⋅1x dx=xln⁡x−∫1 dx= x\ln x - \int x\cdot\frac{1}{x}\,dx = x\ln x - \int 1\,dx
the xx cancels
=xln⁡x−x+C= x\ln x - x + C

Example 3 · the cyclic case

parts twice, then solve
I=∫excos⁡x dxI = \int e^x\cos x\,dx
u=cos⁡xu = \cos x, dv=exdxdv = e^x dx
I=excos⁡x+∫exsin⁡x dxI = e^x\cos x + \int e^x\sin x\,dx
du=−sin⁡x dxdu = -\sin x\,dx flips the sign
I=excos⁡x+exsin⁡x−∫excos⁡x dxI = e^x\cos x + e^x\sin x - \int e^x\cos x\,dx
parts again with u=sin⁡xu = \sin x
2I=ex(cos⁡x+sin⁡x)2I = e^x(\cos x + \sin x)
the last integral is II itself; add it to both sides
I=12ex(sin⁡x+cos⁡x)+CI = \tfrac{1}{2}e^x(\sin x + \cos x) + C

See it happen

Integrate the product rule (uv)′=u′v+uv′(uv)' = u'v + uv' and rearrange: ∫uv′ dx=uv−∫u′v dx\int u v'\,dx = uv - \int u' v\,dx. Parts moves the derivative from one factor onto the other. The move pays off when the factor you differentiate gets simpler and the one you integrate does not get worse.

Common mistakes

Dropping the minus sign

✗ ∫xex dx=xex+ex+C\int x e^x\,dx = x e^x + e^x + C
✓ xex−ex+Cx e^x - e^x + C; differentiate to check

Choosing u and dv the wrong way round

✗ u=exu = e^x, dv=x dxdv = x\,dx gives x22ex−∫x22ex dx\tfrac{x^2}{2}e^x - \int \tfrac{x^2}{2}e^x\,dx, harder than before
✓ differentiate the polynomial; it gets simpler

Forgetting dx in dv

✗ dv=exdv = e^x
✓ dv=ex dxdv = e^x\,dx; dvdv must be something you can integrate

Giving up on the cyclic case

✗ "parts loops forever on excos⁡xe^x\cos x"
✓ after two rounds the original integral reappears; solve the equation for it