Integration by Parts

Calculus 2

Missing Video

This video tutorial is still in the works. In the meantime, please use the text version.


For additional content, check out our Youtube channel (click this container).

Overview

To reverse the chain rule, we have the method of u-substitution.

To reverse the product rule, we have the method of integration by parts.

We begin by deriving the integration by parts (IBP) formula from the product rule:

ddx[f(x)g(x)]=f(x)g(x)+f(x)g(x)f(x)g(x)=(f(x)g(x)+f(x)g(x))dx=f(x)g(x)dx+f(x)g(x)dxf(x)g(x)dx=f(x)g(x)f(x)g(x)dx \begin{aligned} \frac{d}{dx} \left[f(x) \cdot g(x) \right] &= f(x)g'(x) + f'(x)g(x)\\ f(x) \cdot g(x) &= \int ( f(x)g'(x) + f'(x)g(x) ) dx\\ &= \int f(x)g'(x)dx + \int f'(x)g(x)dx\\ \int f(x)g'(x)dx &= f(x)g(x) - \int f'(x)g(x)dx\\ \end{aligned}

Letting u=f(x)du=f(x)dxu=f(x) \Rightarrow du = f'(x)dx and v=g(x)dv=g(x)dxv=g(x) \Rightarrow dv = g'(x)dx, our equation becomes:

f(x)g(x)dx=f(x)g(x)f(x)g(x)dxudv=uvvdu \begin{aligned} \int f(x)g'(x)dx &= f(x)g(x) - \int f'(x)g(x)dx\\ \int u dv &= uv - \int v du \end{aligned}

Therefore, we get the following formula: u dv=uvv du\int u \ dv = uv - \int v \ du

Keep in mind that this technique is supposed to make integrating easier, not harder. This means that the integral v du\int v \ du should be easier than u dv\int u \ dv.

To make sure this occurs, we must make the right choice for uu and dvdv. While this requires a bit of trial and error, we have general guidelines as to which functions work best for uu and dvdv:

This means that uu and dvdv should be functions of different type. That is: a log and a polynomial or a trig function and an exponential or . . . the list goes on.

Focus on choosing a uu that is the easier to differentiate and a dvdv that is easier to integrate. Use LIPET and LIATE (or ILATE) as a guide.

Example 1

Compute xex dx\int x e^x \ dx.

View Answer

xexex+Cxe^x-e^x+C

View Solution

Missing Video

This video tutorial is still in the works. In the meantime, please use the text version.


For additional content, check out our Youtube channel (click this container).

To compute xex dx\int x e^x \ dx, we begin by making our choices for uu and dvdv (and then calculating dudu and vv):

u=x   dv=exdxdu=dx   v=ex \begin{aligned} u &= x & \ \ \ dv &= e^xdx \\ du &= dx & \ \ \ v&= e^x \end{aligned}

We then compute the integral by plugging everything into the integration by parts formula:

xex dx=xexexdx=xexex+C \begin{aligned} \int x e^x \ dx &= xe^x - \int e^x dx \\ &= xe^x - e^x +C \end{aligned}

Example 2

Compute xcosx dx\int x \cos x \ dx.

View Answer

xsinx+cosx+Cx\sin x + \cos x +C

View Solution

Missing Video

This video tutorial is still in the works. In the meantime, please use the text version.


For additional content, check out our Youtube channel (click this container).

To compute xcosx dx\int x \cos x \ dx, we begin by making our choices for uu and dvdv (and then calculating dudu and vv):

u=x   dv=cosxdxdu=dx   v=sinx \begin{aligned} u &= x & \ \ \ dv &= \cos x dx \\ du &= dx & \ \ \ v&= \sin x \end{aligned}

We then compute the integral by plugging everything into the integration by parts formula:

xcosx dx=xsinxsinxdx=xsinx+cosx+C \begin{aligned} \int x \cos x \ dx &= x \sin x - \int \sin x dx \\ &= x \sin x + \cos x + C \end{aligned}

Multiple Rounds of IBP

Sometimes, we have to apply the integration by parts formula more than once to fully solve the problem. We will learn to determine whether multiple rounds are needed simply by inspecting the original integral. For example, polynomial terms that have a degree larger than 1 will require multiple derivatives (and therefore multiple uduu \to du rounds) to reduce that polynomial and make the resulting integral (v duv \ du) possible.

This repetition of IBP is analogous to doing multiple rounds of L'Hopital's Rule to solve an indeterminate limit. It is important to maintain the same type of function for uu and for dvdv when doing multiple rounds.

Example 3

Compute x2ex dx\int x^2 e^x \ dx using the integration by parts formula.

View Answer

ex(x22x+2)+Ce^x(x^2-2x+2)+C

View Solution

Missing Video

This video tutorial is still in the works. In the meantime, please use the text version.


For additional content, check out our Youtube channel (click this container).

To compute x2ex dx\int x^2 e^x \ dx, we begin by making our choices for uu and dvdv (and then calculating dudu and vv):

u=x2   dv=exdxdu=2xdx   v=ex \begin{aligned} u &= x^2 & \ \ \ dv &= e^x dx \\ du &= 2xdx & \ \ \ v&= e^x \end{aligned}

Plugging everything into the integration by parts formula, we get:

x2ex dx=x2exex2xdx=x2ex2xexdx \begin{aligned} \int x^2 e^x \ dx &= x^2e^x - \int e^x \cdot 2xdx\\ &= x^2e^x - \int 2xe^xdx \end{aligned}

Notice how the new integral 2xexdx\int 2xe^xdx requires us to perform another round of integration by parts (two functions of different type -- polynomial and exponential). We should have guessed this from the beginning, as x2x^2 requires two rounds of differentiation to become a constant and allow for the integration of itself multiplied by exe^x.

When performing the next round of IBP, we must choose new values for uu and dvdv. At this step, it is very import to choose the same type of function for uu and for dvdv. That is, uu should be another polynomial and dvdv should be another exponential, as those were the functions we chose for uu and dvdv during our first round of IBP. Therefore:

u=2x   dv=exdxdu=2dx   v=ex \begin{aligned} u &= 2x & \ \ \ dv &= e^x dx \\ du &= 2dx & \ \ \ v&= e^x \end{aligned}

Building on from our first round of integration, we get:

x2ex dx=x2ex2xexdx=x2ex(2xexex2dx)=x2ex2xex+2exdx=x2ex2xex+2ex+C=ex(x22x+2)+C \begin{aligned} \int x^2 e^x \ dx &= x^2e^x - \int 2xe^xdx\\ &= x^2e^x - (2xe^x - \int e^x \cdot 2dx)\\ &= x^2e^x - 2xe^x + 2 \int e^x dx\\ &= x^2e^x -2xe^x + 2e^x +C\\ &= e^x(x^2-2x+2)+C \end{aligned}

To help speed things up and bookkeep a bit better, we can use the tabular method (sometimes referred to as a derivative-integral (DI) table).

With the tabular method, you want to follow these general steps:

  1. Create a table with two columns: uu (or D) column and dvdv (or I) column
  2. Write down your choices of uu and dvdv on the first row
  3. Take the derivative of your uu until you get 0
  4. Take the integral of your dvdv until you get to the row you stopped at in Step 3
  5. Put alternating +/+/- signs, starting with +, on each row you have
  6. Multiply all diagonal terms and add them up

The alternating sign in Step 5 takes into account the negative signs that get introduced in each round of IBP (uvvduuv \boxed{-} \int v du).

Example 4

Compute x2ex dx\int x^2 e^x \ dx again, this time using the tabular method.

View Answer

(x22x+2)ex+C(x^2-2x+2)e^x +C

View Solution

Missing Video

This video tutorial is still in the works. In the meantime, please use the text version.


For additional content, check out our Youtube channel (click this container).

Following the general steps above, we should generate the following table:

Solution coming soon.


Functions That Never Terminate

We might run into some integrals for which the functions in the integrand never terminate, no matter how many times we integrate or differentiate them (such as exponential and trigonometric functions). In these cases, we look for a constant multiple of the original integral.

Example 5

Compute exsinx dx\int e^x \sin x \ dx.

View Answer

12ex(sinxcosx)+C\frac{1}{2} e^x (\sin x - \cos x) +C

View Solution

Missing Video

This video tutorial is still in the works. In the meantime, please use the text version.


For additional content, check out our Youtube channel (click this container).

Solution coming soon.


Definite Integrals

So far, we've only seen IBP applied to indefinite integrals (ones with no bounds/limits of integration). Let's take a look at how to perform these integrals if we had bounds.

Keep in mind we have two options:

  1. Compute the antiderivative without the bounds, then use the Fundamental Theorem of Calculus (FTC) to evaluate

  2. Evaluate on the bounds as we go

Generally, it is easiest to do Option 1.

Example 6

Compute 1exlnx dx\int_1^e x \ln x \ dx.

View Answer

14(e2+1)\frac{1}{4}(e^2+1)

View Solution

Missing Video

This video tutorial is still in the works. In the meantime, please use the text version.


For additional content, check out our Youtube channel (click this container).

To solve 1exlnx dx\int_1^e x \ln x \ dx, we begin by making our choices for uu and dvdv (and then calculating dudu and vv):

u=lnx   dv=xdxdu=1xdx   v=x22 \begin{aligned} u &= \ln x & \ \ \ dv &= xdx \\ du &= \frac{1}{x}dx & \ \ \ v&= \frac{x^2}{2} \end{aligned}

We then solve the integral via integration by parts (using either Option 1 or Option 2):

Option 1: Integrate then evaluate

1exlnx dx=[lnxx22x221xdx]1e=[x22lnxx2dx]1e=[x22lnxx24]1e=(e22ln(e)e24)(12ln(1)14)=e22e24+14=2e2e2+14=e2+14=14(e2+1) \begin{aligned} \int_1^e x \ln x \ dx &= \left[ \ln x \frac{x^2}{2} - \int \frac{x^2}{2} \frac{1}{x} dx \right]_1^e \\ &= \left[ \frac{x^2}{2} \ln x - \int \frac{x}{2} dx \right]_1^e \\ &= \left[ \frac{x^2}{2} \ln x - \frac{x^2}{4} \right]_1^e \\ &= \left( \frac{e^2}{2} \ln(e) - \frac{e^2}{4} \right) - \left( \cancel{\frac{1}{2} \ln(1)} - \frac{1}{4} \right)\\ &= \frac{e^2}{2} - \frac{e^2}{4} + \frac{1}{4}\\ &= \frac{2e^2 - e^2 + 1}{4}\\ &= \frac{e^2 + 1}{4}\\ &= \frac{1}{4}(e^2+1)\\ \end{aligned}

Option 2: Evaluate as you integrate

1exlnx dx=[lnxx22]1e1ex221xdx=(e22ln(e)12ln(1))1ex2dx=(e22)[x24]1e=e22(e2414)=2e2e214=e2+14=14(e2+1) \begin{aligned} \int_1^e x \ln x \ dx &= \left[ \ln x \frac{x^2}{2} \right]_1^e - \int_1^e \frac{x^2}{2} \frac{1}{x} dx \\ &= \left( \frac{e^2}{2} \ln(e) - \cancel{\frac{1}{2} \ln(1)} \right) - \int_1^e \frac{x}{2} dx \\ &= \left( \frac{e^2}{2} \right) - \left[ \frac{x^2}{4} \right]_1^e\\ &= \frac{e^2}{2} - \left( \frac{e^2}{4} - \frac{1}{4} \right)\\ &= \frac{2e^2 - e^2 -1}{4}\\ &= \frac{e^2 + 1}{4}\\ &= \frac{1}{4}(e^2+1)\\ \end{aligned}

As you can see, both answers come out to be the same no matter which option you choose.

You can also use the tabular method for definite integrals that require multiple rounds of IBP. To do so, simply solve the integral as if it was an indefinite integral and then evaluate the final expression obtained from the table on the given bounds using the FTC.


Trickier Integrals

Sometimes, we might run into integrals that don't seem to fit the typical "two functions of different type" form for IBP we've seen so far. That doesn't necessarily mean that IBP can't help us to solve the integral.

Challenge 1

Compute lnx dx\int \ln x \ dx.

View Answer

xlnxx+Cx \ln x - x + C

View Solution

Missing Video

This video tutorial is still in the works. In the meantime, please use the text version.


For additional content, check out our Youtube channel (click this container).

To solve lnx dx\int \ln x \ dx, we begin by making our choices for uu and dvdv (and then calculating dudu and vv). We have to be creative here as there doesn't seem to be two functions in the problem.

u=lnx   dv=dxdu=1xdx   v=x \begin{aligned} u &= \ln x & \ \ \ dv &= dx \\ du &= \frac{1}{x}dx & \ \ \ v&= x \end{aligned}

We then compute the integral by plugging everything into the integration by parts formula:

lnxdx=lnxxx1xdx=xlnxdx=xlnxx+C \begin{aligned} \int \ln x dx &= \ln x \cdot x - \int x \cdot \frac{1}{x}dx\\ &= x \ln x - \int dx \\ &= x \ln x - x + C \end{aligned}

Other times, the integral fits the form but it's just a pain to do!

Challenge 2

Compute xarctanx dx\int x \arctan x \ dx.

View Answer

x22arctanx12(xarctanx)+C\frac{x^2}{2} \arctan x - \frac{1}{2}(x - \arctan x)+C

View Solution

Missing Video

This video tutorial is still in the works. In the meantime, please use the text version.


For additional content, check out our Youtube channel (click this container).

To solve xarctanx dx\int x \arctan x \ dx, we begin by making our choices for uu and dvdv (and then calculating dudu and vv):

u=arctanx   dv=xdxdu=1x2+1dx   v=x22 \begin{aligned} u &= \arctan x & \ \ \ dv &= xdx \\ du &= \frac{1}{x^2+1}dx & \ \ \ v&= \frac{x^2}{2} \end{aligned}

We then compute the integral by plugging everything into the integration by parts formula:

xarctanx dx=arctanxx22x221x2+1dx=x22arctanx12x2x2+1dx \begin{aligned} \int x \arctan x \ dx &= \arctan x \cdot \frac{x^2}{2} - \int \frac{x^2}{2} \cdot \frac{1}{x^2+1}dx\\ &= \frac{x^2}{2} \arctan x - \frac{1}{2} \int \frac{x^2}{x^2+1}dx \end{aligned}

The resulting integrand is an improper fraction, and so we will apply what we learned from Partial Fraction Decomposition: perform long division to make it proper.

x2x2+1=x21+x2=111+x2\frac{x^2}{x^2+1} = \frac{x^2}{1+x^2} = 1 - \frac{1}{1+x^2}

Therefore, we get:

xarctanx dx=x22arctanx12x2x2+1dx=x22arctanx12(111+x2)dx=x22arctanx12(xarctanx)+C \begin{aligned} \int x \arctan x \ dx &= \frac{x^2}{2} \arctan x - \frac{1}{2} \int \frac{x^2}{x^2+1}dx\\ &= \frac{x^2}{2} \arctan x - \frac{1}{2} \int \left( 1 - \frac{1}{1+x^2} \right) dx\\ &= \frac{x^2}{2} \arctan x - \frac{1}{2}(x - \arctan x)+C\\ \end{aligned}

Recap

Integration by parts is a great technique to use when the integrand consists of two different types of functions (i.e. logarithmic and exponential, trigonometric and polynomial, etc.).


Practice Problems

Problem 1

Compute π/2πxcosx dx\int_{\pi/2}^{\pi} x \cos x \ dx.

View Answer

2+π2-\frac{2+\pi}{2}

View Solution

Missing Video

This video tutorial is still in the works. In the meantime, please use the text version.


For additional content, check out our Youtube channel (click this container).

Solution coming soon.

More coming soon . . .

© 2023 - 2024 CalcPrep

[Contact][Privacy Statement][Terms of Use]

Last Updated: 09/01/2024

AP® and CLEP® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website.