5.6 Integration by Parts

L&T, 19.2

This is the integral equivalent to the differential of a product. Start with

{d(uv)\over dx} = u{dv\over dx} + v{du\over dx}.

Integrate both sides with respect to x,

uv =\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits u{dv\over dx}\kern 1.66702pt dx +\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits v{du\over dx}\kern 1.66702pt dx\quad .

Now use (dv∕dx)dx = dv and (du∕dx)dx = du. Rearrange the terms, and find

uv =\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits udv +\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits vdu.

This last equation is mainly used in the form

\class{boxed}{ \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits u\kern 1.66702pt dv = uv −\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits v\kern 1.66702pt du. }

Example 5.10: 

Evaluate I =\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits x{e}^{x}\kern 1.66702pt dx.

Solution: 

Put u = x and {e}^{x}\kern 1.66702pt dx = dv. u part: u = x, therefore du∕dx = 1 and du = dx. v part: {e}^{x}dx = dv therefore dv∕dx = {e}^{x} and v =\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits {e}^{x}\kern 1.66702pt du = {e}^{x} (constant of integration not needed here). Thus

\class{boxed}{I = uv −\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits v\kern 1.66702pt du = x{e}^{x} −\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits {e}^{x}\kern 1.66702pt dx = x{e}^{x} − ({e}^{x} + c)\quad . }

Note that the x part of the original integrand (i.e., u) was differentiated, but the {e}^{x} part (i.e., dv∕dx) was integrated. We obtained a new integral which was easier than the old one because (du∕dx) was simpler than u but \mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits v\kern 1.66702pt dx was no harder than v. It is a requirement that the resulting integral is no more complicated than the original!

Example 5.11: 

Evaluate I =\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits {x}^{2}\mathop{ sin}\nolimits xdx.

Solution: 

Put u = {x}^{2}, dv =\mathop{ sin}\nolimits x\kern 1.66702pt dx. du∕dx = 2x, therefore du = (2xdx). dv∕dx =\mathop{ sin}\nolimits x, therefore v =\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits \mathop{sin}\nolimits x\kern 1.66702pt dx = −\mathop{cos}\nolimits x. We thus obtain

\begin{eqnarray*} I& =& uv −\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits v\kern 1.66702pt du %& \\ & =& {x}^{2}(−\mathop{cos}\nolimits x) −\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits (−\mathop{cos}\nolimits x)2x\kern 1.66702pt dx%& \\ & =& −{x}^{2}\mathop{ cos}\nolimits x + 2\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits x\mathop{cos}\nolimits x\kern 1.66702pt dx\kern 1.66702pt . %& \\ \end{eqnarray*}

Now repeat this procedure: Put u = x, \mathop{cos}\nolimits x\kern 1.66702pt dx = dv. We find du∕dx = 1, and therefore du = dx. Finally dv∕dx =\mathop{ cos}\nolimits x and thus v =\mathop{ sin}\nolimits x.

\begin{eqnarray*} I& =& −{x}^{2}\mathop{ cos}\nolimits x + 2\left [x\mathop{sin}\nolimits x −\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits \mathop{sin}\nolimits x\kern 1.66702pt dx\right ] %& \\ & =& −{x}^{2}\mathop{ cos}\nolimits x + 2x\mathop{sin}\nolimits x − 2(−\mathop{cos}\nolimits x) + k.%& \\ \end{eqnarray*}

(We have put the constant of integration in at the end.)

Example 5.12: 

Evaluate I =\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits \mathop{ln}\nolimits x\kern 1.66702pt dx.

Solution: 

Even though this does not look like integration by parts, we can use a trick! Use the fact that the derivative of the logarithm is much more manageable than the logarithm itself, and use a function v with derivative 1. Thus u =\mathop{ ln}\nolimits x, dv = 1\kern 1.66702pt dx, {du\over dx} = {1\over x}, {dv\over dx} = 1, du = (1∕x)dx, v = x.

\begin{eqnarray*} I& =& uv −\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits v\kern 1.66702pt du %& \\ & =& x\mathop{ln}\nolimits x −\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits x\kern 1.66702pt 1∕x\kern 1.66702pt dx%& \\ & =& x\mathop{ln}\nolimits x −\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits 1\kern 1.66702pt dx %& \\ & =& x\mathop{ln}\nolimits x − x + k\quad . %& \\ \end{eqnarray*}

Example 5.13: 

Find I ={\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits }_{0}^{π∕2}{e}^{x}\mathop{ cos}\nolimits x\kern 1.66702pt dx.

Solution: 

Here we can integrate or differentiate {e}^{x}, and differentiate or integrate \mathop{cos}\nolimits x, since the integrals and derivatives of both functions are as simple as the original function. We choose u = {e}^{x}, therefore du∕dx =\mathop{ cos}\nolimits x and v =\mathop{ sin}\nolimits x.

\begin{eqnarray*} I& =&{ \left (uv\right )}_{0}^{π∕2} −{\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits }_{0}^{π∕2}vdu %& \\ & =&{ \left ({e}^{x}\mathop{ sin}\nolimits x\right )}_{ 0}^{π∕2} −{\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits }_{0}^{π∕2}\mathop{ sin}\nolimits x\ {e}^{x}\kern 1.66702pt dx%& \\ & =& {e}^{π∕2} −{\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits }_{0}^{π∕2}\mathop{ sin}\nolimits x{e}^{x}\kern 1.66702pt dx. %& \\ \end{eqnarray*}

Now integrate by parts again.

Note: Initially we differentiated u = {e}^{x}, taking \mathop{cos}\nolimits x as a derivative. We must use the same procedure again, and not switch u and v. I.e., we must put u = {e}^{x} and dv =\mathop{ sin}\nolimits xdx. Therefore u = {e}^{x}, du∕dx = {e}^{x}, and thus du = {e}^{x}dx, dv =\mathop{ sin}\nolimits xdx. It follows that dv∕dx =\mathop{ sin}\nolimits x, and so v = −\mathop{cos}\nolimits x.

\begin{eqnarray*} I& =& {e}^{π∕2} −{\left (−{e}^{x}\mathop{ cos}\nolimits x\right )}_{ 0}^{π∕2} +{\mathop{ \mathop{\mathop{∫ }\nolimits }}\nolimits }_{0}^{π∕2} −\mathop{ cos}\nolimits x{e}^{x}\kern 1.66702pt dx%& \\ & =& {e}^{π∕2} − [0 − (−1)] −{\mathop{\mathop{\mathop{∫ }\nolimits }}\nolimits }_{0}^{π∕2}{e}^{x}\mathop{ cos}\nolimits x\kern 1.66702pt dx %& \\ & =& {e}^{π∕2} − 1 − I\quad . %& \\ \end{eqnarray*}

Bring I to the left-hand side,

2I = {e}^{π∕2} − 1.

and thus, finally,

\class{boxed}{I = {1\over 2}\left ({e}^{π∕2} − 1\right )\quad . }