Integration by Parts

Basis
Last updated: Tags: Calculus, Integration

Many integrals you encounter involve a product of two functions — for instance xexx e^x, xlnxx \ln x, or x2sinxx^2 \sin x. Substitution does not help with these, because there is no chain-rule structure to exploit. Integration by parts is the corresponding technique for products: it turns the integral of one factor times the derivative of another into a boundary term plus a (hopefully simpler) integral. The formula is nothing more than the product rule read backwards and integrated.

Derivation from the product rule

Let uu and vv be differentiable functions on [a,b][a, b] whose derivatives uu' and vv' are continuous. The product rule gives

(u(x)v(x))=u(x)v(x)+u(x)v(x).(u(x)\,v(x))' = u'(x)\,v(x) + u(x)\,v'(x).

Rearrange to isolate the term u(x)v(x)u(x)\,v'(x):

u(x)v(x)=(u(x)v(x))u(x)v(x).u(x)\,v'(x) = (u(x)\,v(x))' - u'(x)\,v(x).

Integrate both sides over [a,b][a, b] and apply the Newton–Leibniz formula to the right-hand side:

abu(x)v(x)dx=[u(x)v(x)]ababu(x)v(x)dx.\int_a^b u(x)\,v'(x)\,dx = \bigl[u(x)\,v(x)\bigr]_a^b - \int_a^b u'(x)\,v(x)\,dx.

This is the integration-by-parts formula for definite integrals.

Indefinite form and differential notation

For indefinite integrals, drop the limits. Writing du=u(x)dxdu = u'(x)\,dx and dv=v(x)dxdv = v'(x)\,dx, the formula becomes

udv=uvvdu.\int u\,dv = uv - \int v\,du.

This differential notation is the most concise form and is the one you will use in practice. The strategy is to split the integrand into a part you call uu (to be differentiated) and a part you call dvdv (to be integrated). After choosing the split, you compute du=udxdu = u'\,dx and find vv by integrating dvdv; then plug into the formula.

Choosing uu and dvdv: the LIATE heuristic

The choice of which factor to call uu determines whether the resulting integral vdu\int v\,du is simpler or harder than what you started with. A useful informal guide is the LIATE order:

  1. Logarithms (e.g. lnx\ln x, logax\log_a x)
  2. Inverse trigonometric functions (e.g. arctanx\arctan x, arcsinx\arcsin x)
  3. Algebraic functions (polynomials, powers)
  4. Trigonometric functions (e.g. sinx\sin x, cosx\cos x)
  5. Exponentials (e.g. exe^x, axa^x)

You should prefer to assign uu to whichever function appears earlier in this list, and dvdv to whichever appears later. The rationale is that differentiating a logarithm or inverse trig function simplifies it dramatically (turning lnx\ln x into 1/x1/x), while integrating an exponential or trigonometric function does not increase complexity. This heuristic is not a theorem — you should always verify that the resulting integral is actually simpler — but it gives the right answer in the vast majority of standard cases.

Worked examples

Example 1: xexdx\int x e^x\,dx

By LIATE, xx (algebraic) comes before exe^x (exponential), so set

u=x,dv=exdx.u = x, \qquad dv = e^x\,dx.

Then du=dxdu = dx and v=exv = e^x. Applying udv=uvvdu\int u\,dv = uv - \int v\,du:

xexdx=xexexdx=xexex+C=(x1)ex+C.\int x e^x\,dx = x e^x - \int e^x\,dx = x e^x - e^x + C = (x - 1)e^x + C.

You can verify by differentiating: ((x1)ex)=ex+(x1)ex=xex\bigl((x-1)e^x\bigr)' = e^x + (x-1)e^x = x e^x. \checkmark

Example 2: lnxdx\int \ln x\,dx

There is only one factor here, but you can still use integration by parts by writing lnx=lnx1\ln x = \ln x \cdot 1. Set

u=lnx,dv=dx.u = \ln x, \qquad dv = dx.

Then du=1xdxdu = \dfrac{1}{x}\,dx and v=xv = x. Applying the formula:

lnxdx=xlnxx1xdx=xlnx1dx=xlnxx+C.\int \ln x\,dx = x \ln x - \int x \cdot \frac{1}{x}\,dx = x \ln x - \int 1\,dx = x \ln x - x + C.

This is the key trick for integrals involving logarithms: assign u=lnxu = \ln x so that differentiation eliminates the logarithm entirely.

Example 3: x2exdx\int x^2 e^x\,dx — repeated application

When the algebraic factor has degree greater than 11, you apply integration by parts repeatedly. Set u=x2u = x^2, dv=exdxdv = e^x\,dx, so du=2xdxdu = 2x\,dx and v=exv = e^x:

x2exdx=x2ex2xexdx.\int x^2 e^x\,dx = x^2 e^x - 2\int x e^x\,dx.

The remaining integral xexdx\int x e^x\,dx is exactly Example 1, so

x2exdx=x2ex2(x1)ex+C=(x22x+2)ex+C.\int x^2 e^x\,dx = x^2 e^x - 2(x - 1)e^x + C = (x^2 - 2x + 2)e^x + C.

Example 4: exsinxdx\int e^x \sin x\,dx — the self-referential trick

Neither exe^x nor sinx\sin x becomes simpler when differentiated or integrated, so repeated application of parts seems to cycle forever. This circularity is actually the solution. Set

u=ex,dv=sinxdx,u = e^x, \qquad dv = \sin x\,dx,

so du=exdxdu = e^x\,dx and v=cosxv = -\cos x:

exsinxdx=excosx+excosxdx.(1)\int e^x \sin x\,dx = -e^x \cos x + \int e^x \cos x\,dx. \tag{1}

Apply parts again to excosxdx\int e^x \cos x\,dx, with u=exu = e^x and dv=cosxdxdv = \cos x\,dx, so v=sinxv = \sin x:

excosxdx=exsinxexsinxdx.(2)\int e^x \cos x\,dx = e^x \sin x - \int e^x \sin x\,dx. \tag{2}

Substituting (2) into (1):

exsinxdx=excosx+exsinxexsinxdx.\int e^x \sin x\,dx = -e^x \cos x + e^x \sin x - \int e^x \sin x\,dx.

The original integral appears on both sides. Denote it II and solve:

2I=ex(sinxcosx),I=ex(sinxcosx)2+C.2I = e^x(\sin x - \cos x), \qquad \therefore\quad I = \frac{e^x(\sin x - \cos x)}{2} + C.

The key rule is to make the same choice of which factor is uu at each step; switching choices at the second step would undo the first.

Reduction formula for In=xnexdxI_n = \int x^n e^x\,dx

The repeated-application pattern in Example 3 generalizes to an arbitrary power n1n \geq 1. Set u=xnu = x^n and dv=exdxdv = e^x\,dx:

xnexdx=xnexnxn1exdx.\int x^n e^x\,dx = x^n e^x - n \int x^{n-1} e^x\,dx.

Writing In=xnexdxI_n = \int x^n e^x\,dx, this is the reduction formula

In=xnexnIn1.I_n = x^n e^x - n\, I_{n-1}.

Together with the base case I0=exdx=ex+CI_0 = \int e^x\,dx = e^x + C, this recurrence computes InI_n for any non-negative integer nn. Applying it for n=1,2n = 1, 2:

I1=xexI0=(x1)ex+C,I_1 = x e^x - I_0 = (x - 1)e^x + C, I2=x2ex2I1=x2ex2(x1)ex+C=(x22x+2)ex+C,I_2 = x^2 e^x - 2 I_1 = x^2 e^x - 2(x-1)e^x + C = (x^2 - 2x + 2)e^x + C,

which matches the direct calculation in Example 3.

Summary

  • Integration by parts is the product rule integrated: udv=uvvdu\int u\,dv = uv - \int v\,du, or in definite form abuvdx=[uv]ababuvdx\int_a^b u\,v'\,dx = \bigl[uv\bigr]_a^b - \int_a^b u'\,v\,dx.
  • The formula is derived by rearranging the product rule (uv)=uv+uv(uv)' = u'v + uv' and applying the Newton–Leibniz formula.
  • The LIATE heuristic (Logarithms, Inverse trig, Algebraic, Trigonometric, Exponential) guides the choice of uu: prefer whichever factor appears earlier in this list.
  • Logarithms and inverse trig functions are always chosen as uu so that differentiation eliminates them.
  • When the algebraic factor has degree nn, repeated application yields a reduction formula In=xnexnIn1I_n = x^n e^x - n\,I_{n-1}.
  • When two non-simplifying factors are present (e.g. exe^x and sinx\sin x), applying parts twice with a consistent choice of uu produces an equation in the original integral that you can solve algebraically.