Integration by Parts

Basis
Last updated: Tags: Calculus, Integration

Many integrals you encounter involve a product of two functions — for instance xexx e^x, xln⁡xx \ln x, or x2sin⁡xx^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 u′u' and v′v' 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)]ab−∫abu′(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

∫u dv=uv−∫v du.\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=u′ dxdu = 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 ∫v du\int v\,du is simpler or harder than what you started with. A useful informal guide is the LIATE order:

  1. Logarithms (e.g. ln⁡x\ln x, log⁡ax\log_a x)
  2. Inverse trigonometric functions (e.g. arctan⁡x\arctan x, arcsin⁡x\arcsin x)
  3. Algebraic functions (polynomials, powers)
  4. Trigonometric functions (e.g. sin⁡x\sin x, cos⁡x\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 ln⁡x\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: ∫xex dx\int x e^x\,dx

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

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

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

∫xex dx=xex−∫ex dx=xex−ex+C=(x−1)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: ((x−1)ex)′=ex+(x−1)ex=xex\bigl((x-1)e^x\bigr)' = e^x + (x-1)e^x = x e^x. ✓\checkmark

Example 2: ∫ln⁡x dx\int \ln x\,dx

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

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

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

∫ln⁡x dx=xln⁡x−∫x⋅1x dx=xln⁡x−∫1 dx=xln⁡x−x+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=ln⁡xu = \ln x so that differentiation eliminates the logarithm entirely.

Example 3: ∫x2ex dx\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=ex dxdv = e^x\,dx, so du=2x dxdu = 2x\,dx and v=exv = e^x:

∫x2ex dx=x2ex−2∫xex dx.\int x^2 e^x\,dx = x^2 e^x - 2\int x e^x\,dx.

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

∫x2ex dx=x2ex−2(x−1)ex+C=(x2−2x+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: ∫exsin⁡x dx\int e^x \sin x\,dx — the self-referential trick

Neither exe^x nor sin⁡x\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=sin⁡x dx,u = e^x, \qquad dv = \sin x\,dx,

so du=ex dxdu = e^x\,dx and v=−cos⁡xv = -\cos x:

∫exsin⁡x dx=−excos⁡x+∫excos⁡x dx.(1)\int e^x \sin x\,dx = -e^x \cos x + \int e^x \cos x\,dx. \tag{1}

Apply parts again to ∫excos⁡x dx\int e^x \cos x\,dx, with u=exu = e^x and dv=cos⁡x dxdv = \cos x\,dx, so v=sin⁡xv = \sin x:

∫excos⁡x dx=exsin⁡x−∫exsin⁡x dx.(2)\int e^x \cos x\,dx = e^x \sin x - \int e^x \sin x\,dx. \tag{2}

Substituting (2) into (1):

∫exsin⁡x dx=−excos⁡x+exsin⁡x−∫exsin⁡x dx.\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(sin⁡x−cos⁡x),∴I=ex(sin⁡x−cos⁡x)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=∫xnex dxI_n = \int x^n e^x\,dx

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

∫xnex dx=xnex−n∫xn−1ex dx.\int x^n e^x\,dx = x^n e^x - n \int x^{n-1} e^x\,dx.

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

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

Together with the base case I0=∫ex dx=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=xex−I0=(x−1)ex+C,I_1 = x e^x - I_0 = (x - 1)e^x + C, I2=x2ex−2I1=x2ex−2(x−1)ex+C=(x2−2x+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: ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du, or in definite form ∫abu v′ dx=[uv]ab−∫abu′ v dx\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)′=u′v+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=xnex−n In−1I_n = x^n e^x - n\,I_{n-1}.
  • When two non-simplifying factors are present (e.g. exe^x and sin⁡x\sin x), applying parts twice with a consistent choice of uu produces an equation in the original integral that you can solve algebraically.