Integration by parts is the product rule run backwards, and it is the single most-used integration technique after substitution. The formula is short, but choosing which part is "u" and which is "dv" turns into an art the first time you see it. This guide walks through the LIATE shortcut and five escalating examples, so you finish with a reliable method instead of trial-and-error.
The formula
∫udv=uv−∫vdu
Trade one integral for another that is (hopefully) easier. The art is in choosing u and dv — bad choices make the new integral harder.
LIATE: a reliable rule of thumb
When picking u, prefer functions earlier in this list:
Logarithmic > Inverse trig > Algebraic > Trigonometric > Exponential
Whatever's left becomes dv. LIATE is not a theorem, but it works for ~90% of textbook problems.
Example 1: ∫xexdx (algebraic × exponential)
LIATE → algebraic before exponential, so u=x, dv=exdx.
- du=dx, v=ex.
- Apply: ∫xexdx=xex−∫exdx=xex−ex+C=ex(x−1)+C.
Example 2: ∫xlnxdx (algebraic × logarithmic)
LIATE → log first: u=lnx, dv=xdx.
- du=x1dx, v=2x2.
- ∫xlnxdx=2x2lnx−∫2x2⋅x1dx.
- Simplify: 2x2lnx−21∫xdx=2x2lnx−4x2+C.
Example 3: ∫x2sinxdx (algebraic × trig — apply twice)
u=x2, dv=sinxdx. Then du=2xdx, v=−cosx.
- First pass: ∫x2sinxdx=−x2cosx+∫2xcosxdx.
- Second pass on ∫2xcosxdx: let u=2x, dv=cosxdx. Then du=2dx, v=sinx.
- ∫2xcosxdx=2xsinx−∫2sinxdx=2xsinx+2cosx.
- Combine: −x2cosx+2xsinx+2cosx+C.
When you see a polynomial of degree n multiplied by sin/cos/exp, expect to apply the rule n times.
Example 4: ∫excosxdx (the loop trick)
Both factors are equally "good" candidates — neither becomes simpler when integrated or differentiated. Apply twice and watch the original integral come back, then solve algebraically.
- First pass: u=cosx, dv=exdx → ∫excosxdx=excosx+∫exsinxdx.
- Second pass on the new integral: u=sinx, dv=exdx → ∫exsinxdx=exsinx−∫excosxdx.
- Substitute back: original =excosx+exsinx− original.
- Solve: 2⋅original=ex(cosx+sinx), so original =2ex(cosx+sinx)+C.
Example 5: ∫lnxdx (the "no obvious dv" case)
Looks like there's nothing to integrate as dv. Trick: use dv=dx (the "1" in lnx⋅1).
- u=lnx, dv=dx → du=x1dx, v=x.
- ∫lnxdx=xlnx−∫x⋅x1dx=xlnx−x+C.
This same trick handles ∫arcsinxdx, ∫arctanxdx, and similar.
Common mistakes
- Sign errors. The formula has a single minus sign — use scratch paper to track +/−.
- Picking u wrongly. If the new integral is harder than the original, you picked u and dv backwards. Swap them.
- Forgetting "+ C" on indefinite integrals.
- Using by-parts when substitution would work. By-parts is for products that don't fit a u-substitution pattern. If ∫f(g(x))g′(x)dx, use substitution.
Try it yourself
Drop any integral into the Integral Calculator and we'll show you whether substitution, by-parts, or partial fractions is the right move — plus every step.
For specific worked examples and related topics: