Integration by Parts

Most of the antiderivatives you have computed so far were of functions the power rule handles on its own. Integration by parts is the method for the ones it cannot: when the integrand is a product of two functions, neither of which is a simple power.

The method exists because of a relationship between integration and differentiation. Differentiation has the product rule, which multiplies two functions together; integration by parts is the algebraic inverse of that rule, and it trades an integral of a product for an integral of a single function plus a term that is already known.

The basic formula

Read the formula as a statement about antiderivatives rather than as a recipe to apply mechanically. If uu and vv are differentiable and u dvu\,dv is the integrand, then uvuv is an antiderivative of u dvu\,dv up to the correction term ∫v du\int v\,du. The product rule confirms it directly:

ddx(uv−∫v du)=u′v+uv′−v du=u′v+uv′−v′u=u′v=u dv\frac{d}{dx}\left(uv - \int v\,du\right) = u'v + uv' - v\,du = u'v + uv' - v'u = u'v = u\,dv

So the formula is not an approximation or a trick — it is exact, and it holds for any choice of the split u dvu\,dv.

How to choose u and dv

The formula works with any split, but the choice determines whether the result is simpler or worse than what you started with. The guiding principle is asymmetric:

  • Choose uu to be the function that is easy to differentiate. Differentiation almost never increases complexity: the derivative of a polynomial is a polynomial, the derivative of ln⁡x\ln x is 1/x1/x, the derivative of arcsin⁡x\arcsin x is a rational function.
  • Choose dvdv to be the function that is easy to integrate. Integration is the hard direction, so you want the part that integrates cleanly to be the one you are integrating.

The consequence is a standard priority list for which factor becomes uu — take the first one on the list that applies:

  1. Logarithmic functions ln⁡x\ln x. Their derivatives collapse to 1/x1/x, and they are nearly impossible to integrate directly.
  2. Inverse trigonometric functions arcsin⁡x\arcsin x, arctan⁡x\arctan x. Their derivatives are rational functions; integrating them directly is unpleasant.
  3. Algebraic functions xnx^n. The derivative is again a power, and the integral of the other factor is usually manageable.
  4. Trigonometric functions sin⁡x\sin x, cos⁡x\cos x. They integrate to each other, so one of them can always be taken as dvdv.
  5. Exponential functions exe^x. These are the last resort as uu, because differentiating exe^x gives exe^x again and nothing is simplified.

Two further rules of thumb help when the list does not settle the matter:

  • Put the function whose derivative is simpler one step further down. Comparing ∫x2ln⁡x dx\int x^2 \ln x\,dx and ∫xln⁡2x dx\int x \ln^2 x\,dx, the first is the easier one, because ddx(ln⁡x)=1/x\frac{d}{dx}(\ln x) = 1/x removes the logarithm entirely while ddx(x2)=2x\frac{d}{dx}(x^2) = 2x does not.
  • If the integral of dvdv produces a term that is not simpler than where you started, try the other split. Sometimes neither choice is good, and the answer is that this integral is not a by-parts integral at all.

Worked examples

Example 1: integrating x against a cosine

Compute ∫xcos⁡x dx\int x \cos x\,dx.

The algebraic function is xx and the trigonometric function is cos⁡x\cos x. According to LIATE the algebraic function takes the uu slot, and cos⁡x\cos x is trivial to integrate, so it goes into dvdv:

  • Let u=xu = x and dv=cos⁡x dxdv = \cos x\,dx.
  • Then du=dxdu = dx and v=sin⁡xv = \sin x.
  • Substitute into the formula:
∫xcos⁡x dx=xsin⁡x−∫sin⁡x dx=xsin⁡x+cos⁡x+C\int x \cos x\,dx = x \sin x - \int \sin x\,dx = x \sin x + \cos x + C

Differentiate the result to check it: ddx(xsin⁡x+cos⁡x)=sin⁡x+xcos⁡x−sin⁡x=xcos⁡x\frac{d}{dx}(x \sin x + \cos x) = \sin x + x \cos x - \sin x = x \cos x. ✓

Example 2: a polynomial against an exponential

Compute ∫x2ex dx\int x^2 e^x\,dx.

Here exe^x would be a poor choice for uu, since its derivative is exe^x again. The polynomial takes the uu slot:

  • Let u=x2u = x^2 and dv=ex dxdv = e^x\,dx.
  • Then du=2x dxdu = 2x\,dx and v=exv = e^x.
  • The integral of v duv\,du is 2xex2x e^x, which is still a product, so apply the method a second time:
∫2xex dx=2xex−∫2ex dx=2xex−2ex+C\int 2x e^x\,dx = 2x e^x - \int 2e^x\,dx = 2x e^x - 2e^x + C
  • Substituting back:
∫x2ex dx=x2ex−(2xex−2ex)+C=x2ex−2xex+2ex+C\int x^2 e^x\,dx = x^2 e^x - (2x e^x - 2e^x) + C = x^2 e^x - 2x e^x + 2e^x + C

This is the general pattern for a polynomial of degree nn against exe^x: you apply the method n+1n+1 times, and the answer takes the form exe^x times a polynomial of the same degree.

Example 3: integrating a logarithm

Compute ∫ln⁡x dx\int \ln x\,dx.

The logarithm takes the uu slot by the LIATE rule, even though it is the only function here — there is no product, so dv=dxdv = dx is forced:

  • Let u=ln⁡xu = \ln x and dv=dxdv = dx.
  • Then du=1xdxdu = \frac{1}{x}dx and v=xv = x.
  • Substitute:
∫ln⁡x dx=xln⁡x−∫x⋅1x dx=xln⁡x−∫dx=xln⁡x−x+C\int \ln x\,dx = x \ln x - \int x \cdot \frac{1}{x}\,dx = x \ln x - \int dx = x \ln x - x + C

The integrand was not a product at all, and integration by parts still applies: writing ln⁡x\ln x as uu and 11 as the vv part manufactures the product that the method needs. This is a common source of surprise — the technique is useful precisely when you cannot integrate a function directly.

Exercises

Exercise 1

Use integration by parts to compute ∫xsin⁡x dx\int x \sin x\,dx.

integration by partsindefinite integraltrigonometric

Approach: Split the integrand into an algebraic part and a trigonometric part. By LIATE the algebraic factor xx becomes uu, and sin⁡x\sin x integrates to −cos⁡x-\cos x, which is a simple vv.

Steps:

  1. Let u=xu = x and dv=sin⁡x dxdv = \sin x\,dx, so that du=dxdu = dx and v=−cos⁡xv = -\cos x.
  2. Apply the formula: ∫xsin⁡x dx=x(−cos⁡x)−∫(−cos⁡x) dx\int x \sin x\,dx = x(-\cos x) - \int (-\cos x)\,dx.
  3. Integrate the remaining term: ∫(−cos⁡x) dx=−sin⁡x\int (-\cos x)\,dx = -\sin x, so −∫(−cos⁡x) dx=sin⁡x-\int (-\cos x)\,dx = \sin x.
  4. Check by differentiating: ddx(−xcos⁡x+sin⁡x)=−cos⁡x+xsin⁡x+cos⁡x=xsin⁡x\frac{d}{dx}(-x\cos x + \sin x) = -\cos x + x\sin x + \cos x = x\sin x.

Answer: ∫xsin⁡x dx=−xcos⁡x+sin⁡x+C\int x \sin x\,dx = -x\cos x + \sin x + C.

Exercise 2

Compute ∫x3ex dx\int x^3 e^x\,dx.

integration by partsindefinite integralexponentialrepeated application

Approach: Take the polynomial as uu and ex dxe^x\,dx as dvdv, then apply the method repeatedly until the polynomial is exhausted. A degree-nn polynomial against exe^x needs n+1n+1 applications.

Steps:

  1. Let u=x3u = x^3 and dv=ex dxdv = e^x\,dx, so that du=3x2 dxdu = 3x^2\,dx and v=exv = e^x. Then ∫x3ex dx=x3ex−3∫x2ex dx\int x^3 e^x\,dx = x^3 e^x - 3\int x^2 e^x\,dx.
  2. For ∫x2ex dx\int x^2 e^x\,dx, repeat with u=x2u = x^2: ∫x2ex dx=x2ex−2∫xex dx\int x^2 e^x\,dx = x^2 e^x - 2\int x e^x\,dx.
  3. For ∫xex dx\int x e^x\,dx, repeat with u=xu = x: ∫xex dx=xex−∫ex dx=xex−ex\int x e^x\,dx = x e^x - \int e^x\,dx = x e^x - e^x.
  4. Substitute back twice: ∫x2ex dx=x2ex−2(xex−ex)=x2ex−2xex+2ex\int x^2 e^x\,dx = x^2 e^x - 2(x e^x - e^x) = x^2 e^x - 2x e^x + 2e^x.
  5. Substitute back once more: ∫x3ex dx=x3ex−3(x2ex−2xex+2ex)=x3ex−3x2ex+6xex−6ex\int x^3 e^x\,dx = x^3 e^x - 3(x^2 e^x - 2x e^x + 2e^x) = x^3 e^x - 3x^2 e^x + 6x e^x - 6e^x.

Answer: ∫x3ex dx=ex(x3−3x2+6x−6)+C\int x^3 e^x\,dx = e^x\left(x^3 - 3x^2 + 6x - 6\right) + C.


Summary

Integration by parts is the answer whenever the integrand is a product and neither factor is a plain power. The formula ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du is exact, and the only real decision is the split. Choose uu from the LIATE list so that differentiating it simplifies the problem, and choose dvdv so that integrating it is easy. When the integrand is not a product at all, writing it as uu times 11 often still opens the door — that is how ∫ln⁡x dx\int \ln x\,dx becomes tractable.

The one habit worth building is the check: differentiate your answer before you move on. Integration by parts is easy to get subtly wrong in the signs, and a single derivative confirms the whole computation in a second.

Symbols Used in This Article

SymbolTypePronunciation/ExplanationMeaning in This Article
∫u dv\int u\,dvmathematical symbolintegral of u dvThe integral being computed by the product
uvuvmathematical symbolu times vThe product term produced by the method
∫v du\int v\,dumathematical symbolintegral of v duThe remaining integral after the split
uumathematical symboluThe factor chosen to be differentiated
dvdvmathematical symbold vThe factor chosen to be integrated
dudumathematical symbold uThe differential of uu
CCmathematical symbolconstant of integrationAn arbitrary constant (any constant)
ln⁡x\ln xmathematical symbolnatural logarithm of xThe natural logarithm
arcsin⁡x, arctan⁡x\arcsin x,\ \arctan xmathematical symbolarc sine / arc tangent of xInverse trigonometric functions
exe^xmathematical symbole to the xThe exponential function
sin⁡x, cos⁡x\sin x,\ \cos xmathematical symbolsine / cosine of xTrigonometric functions
LIATEmnemonicL-I-A-T-ELogarithmic, Inverse trigonometric, Algebraic, Trigonometric, Exponential

Found an issue with this content?

Tell us what could be improved.