Unit 2, chapter 6

Integration by parts for a useful product

How integration by parts runs the product rule in reverse, trading the integral of a product for a boundary term and a simpler integral, how to choose u and dv, and how the result reads as a complementary area.

  • Chapter 6
  • Substitution, integration by parts and trigonometric identities

The integral ∫01xex dx\int_0^1 xe^x\,dx multiplies a linear factor by an exponential. Substitution does not finish the job here. The choice u=exu = e^x, for instance, only turns it into ∫1eln⁡u du\int_1^e \ln u\,du, which still needs an antiderivative of the logarithm. The two factors have different strengths instead, since differentiating xx gives the constant 11 and integrating exe^x gives exe^x again. This page derives integration by parts from the product rule, uses it to show that the integral equals 11, and reads the same number as the area of a region above the exponential curve.

Key terms

Product rule in reverse

Definition If uu and vv are differentiable on an interval, the product rule says (uv)′=u′v+uv′(uv)' = u'v + uv' there, so uvuv is an antiderivative of u′v+uv′u'v + uv'. If uu and vv are continuously differentiable on [a,b][a, b], the fundamental theorem of calculus then gives

∫ab(u′v+uv′) dx=[uv]ab.\int_a^b \bigl(u'v + uv'\bigr)\,dx = \bigl[uv\bigr]_a^b.

In plain words A product changes for two reasons, because the first factor changes and because the second factor changes. Adding up both kinds of change across an interval gives the total change of the product between the endpoints.

Example For u=xu = x and v=exv = e^x the product rule gives (xex)′=ex+xex(xe^x)' = e^x + xe^x, so

∫01(ex+xex) dx=[xex]01=1⋅e−0⋅1=e.\begin{aligned} \int_0^1 \bigl(e^x + xe^x\bigr)\,dx &= \bigl[xe^x\bigr]_0^1 \\[0.4em] &= 1\cdot e - 0\cdot 1 = e. \end{aligned}

The first piece alone is ∫01ex dx=e−1\int_0^1 e^x\,dx = e - 1, so the second piece must be ∫01xex dx=e−(e−1)=1\int_0^1 xe^x\,dx = e - (e - 1) = 1. That is integration by parts in miniature.

Integration by parts

Definition Let uu and vv be continuously differentiable on [a,b][a, b]. Then

∫abu v′ dx=[uv]ab−∫abu′ v dx.\begin{aligned} \int_a^b u\,v'\,dx &= \bigl[uv\bigr]_a^b \\[0.4em] &\quad - \int_a^b u'\,v\,dx. \end{aligned}

It follows from the product rule in reverse by splitting the integral of u′v+uv′u'v + uv' into two and moving ∫abu′v dx\int_a^b u'v\,dx to the other side. On an interval where uu and vv are continuously differentiable, the indefinite form is ∫u v′ dx=uv−∫u′ v dx\int u\,v'\,dx = uv - \int u'\,v\,dx, usually written ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du with du=u′(x) dxdu = u'(x)\,dx and dv=v′(x) dxdv = v'(x)\,dx.

In plain words Pick one factor to differentiate and one to integrate. The integral of the product equals the product evaluated at the ends, minus a new integral in which the first factor has been differentiated and the second integrated. The method pays off when that new integral is easier than the old one.

Example For ∫01xex dx\int_0^1 xe^x\,dx take u=xu = x and dv=ex dxdv = e^x\,dx, so du=dxdu = dx and v=exv = e^x. Both xx and exe^x are continuously differentiable on [0,1][0, 1]. Then

∫01xex dx=[xex]01−∫01ex dx=e−(e−1)=1.\begin{aligned} \int_0^1 xe^x\,dx &= \bigl[xe^x\bigr]_0^1 \\[0.4em] &\quad - \int_0^1 e^x\,dx \\[0.4em] &= e - (e - 1) = 1. \end{aligned}

The antiderivative F(x)=ex(x−1)F(x) = e^x(x - 1) confirms the value, since F′(x)=ex(x−1)+ex=xexF'(x) = e^x(x - 1) + e^x = xe^x and F(1)−F(0)=0−(−1)=1F(1) - F(0) = 0 - (-1) = 1. This antiderivative is negative on [0,1)[0, 1) even though the integral is positive, because only the difference F(1)−F(0)F(1) - F(0) matters. The size is plausible as well. For 0≤x≤10 \le x \le 1 we have 1≤ex≤e1 \le e^x \le e, so x≤xex≤exx \le xe^x \le ex, and the integral lies between 12\tfrac12 and e2≈1.359\tfrac{e}{2} \approx 1.359.

Boundary term

Definition The boundary term of integration by parts on [a,b][a, b] is

[uv]ab=u(b) v(b)−u(a) v(a),\begin{aligned} \bigl[uv\bigr]_a^b &= u(b)\,v(b) \\[0.4em] &\quad - u(a)\,v(a), \end{aligned}

the change of the product uvuv between the endpoints. In the indefinite form its counterpart is the product uvuv itself. It is part of the formula, so it is never optional, and each of its two values is a product of both factors at the same endpoint.

In plain words Before working on the new integral, evaluate uu times vv at the upper end and at the lower end and subtract. Leaving the term out, or evaluating only one factor at an endpoint, changes the answer.

Example For u=xu = x and v=exv = e^x on [0,1][0, 1],

[xex]01=1⋅e−0⋅1=e.\bigl[xe^x\bigr]_0^1 = 1\cdot e - 0\cdot 1 = e.

The lower value is 00 because the factor xx is 00 there, not because the exponential vanishes, since e0=1e^0 = 1. Leaving out the boundary term would give −(e−1)≈−1.718-(e - 1) \approx -1.718, a negative value for the integral of a function that is nonnegative on [0,1][0, 1], which is impossible.

Choosing u and dv

Definition Integration by parts needs a split of the integrand into a factor uu, which will be differentiated, and a factor dv=v′(x) dxdv = v'(x)\,dx, whose antiderivative vv must be found. Every split with uu and vv continuously differentiable gives a true equation. The choice only decides whether the new integral ∫u′ v dx\int u'\,v\,dx is easier than the original. A common rule of thumb ranks the types logarithmic, inverse trigonometric, algebraic, trigonometric and exponential in that order, and takes uu from the earliest type present. It is a guide, not a theorem.

In plain words Differentiate the factor that gets simpler when differentiated, such as a power of xx or a logarithm. Integrate the factor that stays manageable when integrated, such as exe^x, sin⁡x\sin x or cos⁡x\cos x.

Example With u=xu = x and dv=ex dxdv = e^x\,dx the new integrand is 1⋅ex1\cdot e^x, and the factor xx is gone. The reverse choice u=exu = e^x and dv=x dxdv = x\,dx gives v=12x2v = \tfrac12 x^2 and

∫01xex dx=[x22ex]01−12∫01x2ex dx.\begin{aligned} \int_0^1 xe^x\,dx &= \Bigl[\frac{x^2}{2}e^x\Bigr]_0^1 \\[0.4em] &\quad - \frac12\int_0^1 x^2e^x\,dx. \end{aligned}

This equation is true, since ∫01x2ex dx=e−2\int_0^1 x^2e^x\,dx = e - 2 and e2−12(e−2)=1\tfrac{e}{2} - \tfrac12(e - 2) = 1, but the new integral has a higher power of xx than the original and is harder to evaluate.

Complementary area

Definition Let ff be continuously differentiable and strictly increasing on [0,b][0, b]. The complementary area is the area of the region between the graph of ff and the horizontal line y=f(b)y = f(b), the points with 0≤x≤b0 \le x \le b and f(x)≤y≤f(b)f(x) \le y \le f(b). Vertical strips give it as bf(b)−∫0bf(x) dxbf(b) - \int_0^b f(x)\,dx. Horizontal strips at height yy run from x=0x = 0 to x=f−1(y)x = f^{-1}(y) and give it as ∫f(0)f(b)f−1(y) dy\int_{f(0)}^{f(b)} f^{-1}(y)\,dy. Integration by parts with u=xu = x and v=fv = f, and the substitution y=f(x)y = f(x), connect both to ∫0bxf′(x) dx\int_0^b x f'(x)\,dx,

∫0bxf′(x) dx=bf(b)−∫0bf(x) dx=∫f(0)f(b)f−1(y) dy.\begin{aligned} \int_0^b x f'(x)\,dx &= bf(b) \\[0.4em] &\quad - \int_0^b f(x)\,dx \\[0.4em] &= \int_{f(0)}^{f(b)} f^{-1}(y)\,dy. \end{aligned}

In plain words When f(0)≥0f(0) \ge 0, the rectangle of width bb and height f(b)f(b) splits into the region under the curve and the region above it. Integration by parts computes the region above the curve as an integral in xx. Read with horizontal strips, the width of that region at height yy is the position xx where the curve reaches height yy.

Example For f(x)=exf(x) = e^x on [0,1][0, 1] the rectangle has area ee and the region under the curve has area e−1e - 1, so the region above the curve and inside the rectangle has area 11. At a height yy between 11 and ee the curve is reached at x=ln⁡yx = \ln y, so horizontal strips give

∫1eln⁡y dy=[yln⁡y−y]1e=0−(−1)=1.\begin{aligned} \int_1^e \ln y\,dy &= \bigl[y\ln y - y\bigr]_1^e \\[0.4em] &= 0 - (-1) = 1. \end{aligned}

The substitution y=exy = e^x, with dy=ex dxdy = e^x\,dx, turns this integral into ∫01xex dx\int_0^1 xe^x\,dx, because each horizontal strip has width xx and height dy=ex dxdy = e^x\,dx. The region under y=xexy = xe^x and the region above y=exy = e^x have different shapes, but both have area 11.

Check yourself

  1. Evaluate the integral
∫0πxsin⁡x dx.\int_0^\pi x\sin x\,dx.
Show the answer

Take u=xu = x and dv=sin⁡x dxdv = \sin x\,dx, so du=dxdu = dx and v=−cos⁡xv = -\cos x. Then

∫0πxsin⁡x dx=[−xcos⁡x]0π+∫0πcos⁡x dx=π+0=π.\begin{aligned} \int_0^\pi x\sin x\,dx &= \bigl[-x\cos x\bigr]_0^\pi \\[0.4em] &\quad + \int_0^\pi \cos x\,dx \\[0.4em] &= \pi + 0 = \pi. \end{aligned}

The boundary term is −πcos⁡π−(−0⋅cos⁡0)=π-\pi\cos\pi - (-0\cdot\cos 0) = \pi, and ∫0πcos⁡x dx=sin⁡π−sin⁡0=0\int_0^\pi \cos x\,dx = \sin\pi - \sin 0 = 0. Differentiating the antiderivative sin⁡x−xcos⁡x\sin x - x\cos x gives cos⁡x−cos⁡x+xsin⁡x=xsin⁡x\cos x - \cos x + x\sin x = x\sin x, which confirms it.

  1. For the integral below, which factor should be uu? Evaluate it.
∫1exln⁡x dx\int_1^e x\ln x\,dx
Show the answer

Take u=ln⁡xu = \ln x and dv=x dxdv = x\,dx, so du=1x dxdu = \tfrac1x\,dx and v=12x2v = \tfrac12 x^2, and uu and vv are continuously differentiable on [1,e][1, e]. Differentiating the logarithm leaves only a power of xx. Then

∫1exln⁡x dx=[x22ln⁡x]1e−∫1ex2 dx=e22−e2−14=e2+14.\begin{aligned} \int_1^e x\ln x\,dx &= \Bigl[\frac{x^2}{2}\ln x\Bigr]_1^e \\[0.4em] &\quad - \int_1^e \frac{x}{2}\,dx \\[0.4em] &= \frac{e^2}{2} - \frac{e^2 - 1}{4} = \frac{e^2 + 1}{4}. \end{aligned}

The value is about 2.0972.097. Taking u=xu = x out of habit is a detour here, because then dv=ln⁡x dxdv = \ln x\,dx and finding v=xln⁡x−xv = x\ln x - x already needs integration by parts, and the new integral ∫(xln⁡x−x) dx\int (x\ln x - x)\,dx contains the original one again. The size checks out, since 0≤xln⁡x≤x0 \le x\ln x \le x on [1,e][1, e] gives a value between 00 and 12(e2−1)≈3.19\tfrac12(e^2 - 1) \approx 3.19.

  1. Use ∫01xex dx=1\int_0^1 xe^x\,dx = 1 to evaluate the integral below. Why is −2-2, the value obtained by leaving out the boundary term, impossible?
∫01x2ex dx\int_0^1 x^2e^x\,dx
Show the answer

Take u=x2u = x^2 and dv=ex dxdv = e^x\,dx, so du=2x dxdu = 2x\,dx and v=exv = e^x. Then

∫01x2ex dx=[x2ex]01−2∫01xex dx=e−2⋅1=e−2.\begin{aligned} \int_0^1 x^2e^x\,dx &= \bigl[x^2e^x\bigr]_0^1 \\[0.4em] &\quad - 2\int_0^1 xe^x\,dx \\[0.4em] &= e - 2\cdot 1 = e - 2. \end{aligned}

The value is about 0.7180.718. The integrand is nonnegative on [0,1][0, 1], and since x2≤x2ex≤ex2x^2 \le x^2e^x \le ex^2 there, the integral lies between 13\tfrac13 and e3≈0.906\tfrac{e}{3} \approx 0.906. A negative value such as −2-2 cannot be the integral of a nonnegative function, so the boundary term ee cannot be left out.

How this lesson connects

It also uses the product rule and the derivative of e to the x.