Integration by Parts

One often encounters integrands which can be written as the product of two functions.  Sometimes the integral can be solved using the “u-substitution” method which is essentially the inverse of the chain rule.  In other cases, integration by parts may work.  Integration by parts is the inverse of the product rule of differentiation.  Recall that the product rule states $$! \displaystyle \frac{d}{dx} \left[u(x) v(x)\right]= u'(x)v(x) + u(x)v'(x)$$ Using the notation

$$du = u'(x)dx$$ , $$dv = v'(x)dx$$

this becomes $$! \displaystyle d \left[u(x) v(x)\right]= v(x)du + u(x)dv$$ If we integrate this equation, we get $$! \displaystyle u(x) v(x)= \int v(x)du + \int u(x)dv$$ Now if we rearrange a bit, this becomes $$! \displaystyle \int v(x)du = u(x) v(x) – \int u(x)dv$$ This result is the what is known as “integration by parts”.


You are presented with an integrand which can be written as the product of two functions.  You must know how to differentiate one of the functions and know how to integrate the other function.  The goal is to create an integral on the right hand side that is easier to solve than the original integral.  It may be necessary to repeat the integration by parts procedure several times to get an easy integral.

Example 1: $$! \displaystyle \int x\sin x dx$$ We want to be left with a simple integral when we are finished, so we choose $$v(x) = x$$.  Then

$$!\displaystyle dv=dx,\qquad du=\sin x dx,\qquad u=-\cos x$$

Now apply the method

$$! \displaystyle \int v(x)du = u(x) v(x) - \int u(x)dv$$


$$! \displaystyle \int x\sin x dx=-x\cos x +\int \cos x dx$$

Now the integral on the right is trivial!  The final result is

$$! \displaystyle \int x\sin x dx=-x\cos x +\sin x + C $$

Example 2: $$! \displaystyle \int e^x \cos x dx $$ Choose $$u=e^x$$ then
$$!\displaystyle du=e^x dx,\qquad dv=\cos x dx,\qquad v=\sin x$$
Now apply the method
$$! \displaystyle \int u(x)dv = u(x) v(x) - \int v(x)du$$
Note that this looks different than the version written above, but it is equivalent. Make the substitutions:
$$! \displaystyle \int e^x\cos x dx = e^x\sin x - \int e^x\sin x dx$$ Now you have to repeat the method on this second integral! Choose $$u=e^x $$ then
$$!\displaystyle du=e^x dx,\qquad dv=\sin x dx,\qquad v=-\cos x$$
Substituting this into the method leaves us with
$$! \displaystyle \int e^x\cos x dx = e^x\sin x - \left[-e^x\cos x + \int e^x \cos x dx\right]$$
$$! \displaystyle \int e^x\cos x dx = e^x\sin x +e^x\cos x - \int e^x \cos x dx + C $$ Notice that the same integral now appears on both sides of the equation. Now we can solve for it:
$$! \displaystyle 2\int e^x\cos x dx = e^x\sin x +e^x\cos x + C $$
$$! \displaystyle \int e^x\cos x dx = \frac{1}{2}e^x\sin x + \frac{1}{2}e^x\cos x +C$$ I've skipped a few steps involving the arbitrary constant $$C$$ to simplify the presentation.