Search

Search papers and lessons

Integration by Parts

Level 1 · 9 min read

Integration by parts turns the product rule around: the integral of u times v' equals uv minus the integral of u' times v, trading one integral for a simpler one.

On this page

  • Colour = topic mix
  • Calculus
  • Discrete math
  • Sign in to see your progress

TL;DR

Integration by parts turns the product rule around. It says the integral of u v′u\,v' equals uvuv minus the integral of u′ vu'\,v. Use it when the integrand is a product, one piece is easy to integrate, and the other piece gets simpler when differentiated. You trade one integral for another that is often easier.

Where you'll see it: in computing the Gamma function (the factorial extended to non-whole numbers), in physics problems where a force or moment varies along a distance, and in deriving Laplace transforms.

Intuition

The product rule, read backwards

The product rule says that the derivative of a product of two functions is (uv)′=u′v+uv′(uv)' = u'v + uv'. Move one term to the other side: uv′=(uv)′−u′vuv' = (uv)' - u'v. Now integrate both sides. The integral of a derivative is the function itself, so

∫u v′ dx=uv−∫u′ v dx.\int u\,v'\,dx = uv - \int u'\,v\,dx.

That is the whole rule. It assumes nothing new. It is the product rule run in reverse, which is also why it needs an Antiderivative to finish.

Why it helps

Some integrals resist direct methods but become easy after one swap. Take ∫xex dx\int x e^x\,dx, which uses the exponential function. No standard table entry matches it directly. But the factor xx becomes simpler when you differentiate it (it becomes 11), while exe^x keeps its shape when you integrate it. Give the derivative to xx and the integral to exe^x, and the leftover integral is trivial. The rule does not solve the integral; it moves the difficulty somewhere easier.

The plot shows a case where the rule gives an exact answer that is hard to see from the graph. The area under xe−xx e^{-x} from 00 to infinity is exactly 11.

012345600.10.20.30.4xf(x)
  • x e^(-x)
The curve x e^(-x) starts at 0, peaks at x = 1 with height about 0.368, then decays. Integration by parts shows the total area is exactly 1.

The math

Definition

Definition: Integration by parts

For differentiable functions u(x)u(x) and v(x)v(x),

∫u(x) v′(x) dx=u(x) v(x)−∫u′(x) v(x) dx.\int u(x)\, v'(x)\, dx = u(x)\, v(x) - \int u'(x)\, v(x)\, dx.

Here uu and vv are the two factors, and u′u' and v′v' are their derivatives. In differential notation, with du=u′ dxdu = u'\,dx and dv=v′ dxdv = v'\,dx, the same statement reads ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du. The indefinite form carries one constant of integration, which you add once at the end.

The definite form

For a definite integral with limits aa and bb,

∫abu v′ dx=[uv]ab−∫abu′ v dx,\int_a^b u\,v'\,dx = \Big[uv\Big]_a^b - \int_a^b u'\,v\,dx,

where [F]ab=F(b)−F(a)[F]_a^b = F(b) - F(a). The boundary term is evaluated at both ends. Forgetting it is the most common error with definite integrals.

Choosing u

Pick uu to be the factor that gets simpler when differentiated, and let dvdv be the rest, which you must be able to integrate. A common rule of thumb, often called LIATE, ranks function types in the order logarithm, inverse trigonometric, algebraic (polynomial), trigonometric, exponential, and says to choose uu as the first type in that list that appears in the integrand. It is a heuristic, not a theorem.

Worked examples

Example
A small one: x e^x

Find ∫xex dx\int x e^x\,dx.

  1. Pick u=xu = x and dv=ex dxdv = e^x\,dx.
  2. Then du=dxdu = dx and v=exv = e^x.
  3. Apply the rule: ∫xex dx=xex−∫ex dx\int x e^x\,dx = x e^x - \int e^x\,dx.
  4. The remaining integral is exe^x, so the result is xex−ex+Cx e^x - e^x + C.
  5. Check by differentiating: ddx(xex−ex)=ex+xex−ex=xex\frac{d}{dx}(x e^x - e^x) = e^x + x e^x - e^x = x e^x. The check matches the integrand.

The answer is ex(x−1)+Ce^x(x - 1) + C. The polynomial factor dropped from degree 1 to degree 0, which is why the rule finished in one step.

Example
A definite integral: the area under ln x

Find ∫1eln⁡x dx\int_1^e \ln x\,dx, where ln⁡\ln is the natural Logarithm.

  1. Write the integrand as 1⋅ln⁡x1 \cdot \ln x. Pick u=ln⁡xu = \ln x and dv=dxdv = dx.
  2. Then du=1x dxdu = \frac{1}{x}\,dx and v=xv = x.
  3. Apply the definite rule: ∫1eln⁡x dx=[xln⁡x]1e−∫1ex⋅1x dx\int_1^e \ln x\,dx = \big[x \ln x\big]_1^e - \int_1^e x \cdot \frac{1}{x}\,dx.
  4. Boundary term: at x=ex = e it is e⋅1=ee \cdot 1 = e; at x=1x = 1 it is 1⋅0=01 \cdot 0 = 0. So the bracket equals ee.
  5. The remaining integral is ∫1e1 dx=e−1\int_1^e 1\,dx = e - 1.
  6. Total: e−(e−1)=1e - (e - 1) = 1.

Check: the antiderivative xln⁡x−xx\ln x - x gives (e−e)−(0−1)=1(e - e) - (0 - 1) = 1. The area under ln⁡x\ln x between 11 and ee is exactly one square unit.

Example
A realistic one: the Gamma function at 2

The Gamma function is Γ(n)=∫0∞xn−1e−x dx\Gamma(n) = \int_0^\infty x^{n-1} e^{-x}\,dx. It appears in probability (the gamma distribution) and statistics. Compute Γ(2)=∫0∞xe−x dx\Gamma(2) = \int_0^\infty x e^{-x}\,dx.

  1. Pick u=xu = x and dv=e−x dxdv = e^{-x}\,dx.
  2. Then du=dxdu = dx and v=−e−xv = -e^{-x}.
  3. Apply the rule: ∫0∞xe−x dx=[−xe−x]0∞+∫0∞e−x dx\int_0^\infty x e^{-x}\,dx = \big[-x e^{-x}\big]_0^\infty + \int_0^\infty e^{-x}\,dx.
  4. Boundary term: as xx grows, xe−xx e^{-x} goes to 00, because the exponential shrinks faster than xx grows. At x=0x = 0 it is 00. So the bracket is 00.
  5. The remaining integral is ∫0∞e−x dx=1\int_0^\infty e^{-x}\,dx = 1.
  6. Total: Γ(2)=1\Gamma(2) = 1.

The answer agrees with 1!=11! = 1. The same steps give Γ(n+1)=n Γ(n)\Gamma(n+1) = n\,\Gamma(n) in general, which is how the Gamma function extends the factorial.

Tradeoffs and failure modes

SituationWhat goes wrongBetter choice
Polynomial times exe^x, sin⁡x\sin x or cos⁡x\cos xWorks well; each pass lowers the polynomial degreeDifferentiate the polynomial and integrate the trig or exponential part
Swapped choice in xexx e^x (taking u=exu = e^x)v=x2/2v = x^2/2 gives a harder integralChoose uu as the factor that simplifies under differentiation
A lone function such as ln⁡x\ln x or arctan⁡x\arctan xNo obvious product to splitWrite it as 1⋅f(x)1 \cdot f(x), take u=f(x)u = f(x), dv=dxdv = dx
Product of exe^x and sin⁡x\sin xThe rule returns the original integral, so you loopApply the rule twice and solve the resulting equation for the integral
Composite function with its inner derivative present, such as xsin⁡(x2)x\sin(x^2)Parts does not simplify itTry substitution (the Chain Rule run backwards) first
Definite integral with the boundary term droppedA silent wrong answerAlways evaluate uvuv at both limits

The looping case is worth seeing once. Let I=∫exsin⁡x dxI = \int e^x \sin x\,dx. Parts gives I=exsin⁡x−∫excos⁡x dxI = e^x \sin x - \int e^x \cos x\,dx. Parts again on the new integral gives ∫excos⁡x dx=excos⁡x+I\int e^x \cos x\,dx = e^x \cos x + I. Substituting, I=ex(sin⁡x−cos⁡x)−II = e^x(\sin x - \cos x) - I, so I=12ex(sin⁡x−cos⁡x)+CI = \tfrac{1}{2}e^x(\sin x - \cos x) + C.

History

Integration by parts grows out of Gottfried Wilhelm Leibniz's calculus of differentials in the 1670s and 1680s, where the product of two quantities is handled in differential form. The English mathematician Brook Taylor stated the rule in its integral form in 1715, in his book on the method of increments. It caught on because it turns a class of integrals that resist direct methods into a sequence of simpler steps. Today it is taught alongside substitution as one of the two main techniques of integration.

Check yourself

QuestionWrite the integration by parts formula in the form ∫u dv\int u\,dv.Show answer

∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du. It is the product rule for uvuv, integrated on both sides and rearranged.

QuestionCompute ∫0πxsin⁡x dx\int_0^\pi x \sin x\,dx.Show answer

Take u=xu = x and dv=sin⁡x dxdv = \sin x\,dx, so du=dxdu = dx and v=−cos⁡xv = -\cos x. Then the integral is [−xcos⁡x]0π+∫0πcos⁡x dx\big[-x\cos x\big]_0^\pi + \int_0^\pi \cos x\,dx. The bracket is −π⋅(−1)−0=π-\pi \cdot (-1) - 0 = \pi. The remaining integral is [sin⁡x]0π=0−0=0\big[\sin x\big]_0^\pi = 0 - 0 = 0. The answer is π\pi.

QuestionWhy does the rule follow from the product rule, and not from some separate fact?Show answer

The product rule says (uv)′=u′v+uv′(uv)' = u'v + uv'. Integrating both sides gives uv=∫u′v dx+∫uv′ dxuv = \int u'v\,dx + \int uv'\,dx, because the integral of a derivative returns the function. Rearranging gives the integration by parts formula. The rule is therefore a consequence of differentiation, not an extra axiom.

QuestionTo integrate x2ln⁡xx^2 \ln x, which factor should be u, and what is the result?Show answer

Take u=ln⁡xu = \ln x, because its derivative 1/x1/x is simpler, and dv=x2 dxdv = x^2\,dx, which integrates easily to x3/3x^3/3. The result is x33ln⁡x−∫x33⋅1x dx=x33ln⁡x−x39+C\frac{x^3}{3}\ln x - \int \frac{x^3}{3}\cdot\frac{1}{x}\,dx = \frac{x^3}{3}\ln x - \frac{x^3}{9} + C. Differentiating confirms it: x2ln⁡x+x23−x23=x2ln⁡xx^2 \ln x + \frac{x^2}{3} - \frac{x^2}{3} = x^2 \ln x.

Sources