# Examples On Integration By Parts Set-5﻿

Go back to  'Indefinite Integration'

Example - 49

Evaluate \begin{align}\int {\cos 2\,\theta \ln \left( {\frac{{\cos \theta + \sin \theta }}{{\cos \theta - \sin \theta }}} \right)} \,\,d\theta \end{align}

Solution: If we can somehow arrange the expression inside the ln function in terms of $$\sin 2\theta ,$$ we can substitute $$\sin 2\theta$$ as a new variable and express $$\cos 2\theta d\theta$$ as a differential of this new variable. Note the following relations which should tell you how to proceed:

${\left( {\cos \theta + \sin \theta } \right)^2} = {\cos ^2}\theta + {\sin ^2}\theta + 2\sin \theta \cos \theta$

$= 1 + \sin 2\theta$

${\left( {\cos \theta - \sin \theta } \right)^2} = {\cos ^2}\theta + {\sin ^2}\theta - 2\sin \theta \cos \theta$

$= 1 - \sin 2\theta$

This shows that we need to square the expression inside the ln function to express it in terms $$\sin 2\theta$$ :

\begin{align}& I = \int {\cos 2\theta \ln \left( {\frac{{\cos \theta + \sin \theta }}{{\cos \theta - \sin \theta }}} \right)} \,\,d\theta\\ &= \frac{1}{2}\int {\cos 2\theta \ln \left\{ {{{\left( {\frac{{\cos \theta + \sin \theta }}{{\cos \theta - \sin \theta }}} \right)}^2}} \right\}} \,d\theta \\ &= \frac{1}{2}\int {\cos 2\theta \ln \left( {\frac{{1 + \sin 2\theta }}{{1 - \sin 2\theta }}} \right)} \,d\theta \\& = \frac{1}{4}\int {\ln \left( {\frac{{1 + t}}{{1 - t}}} \right)} \,\,dt \left\{ \begin{array}{l}{\text{Using the substitution}} \\\sin 2\theta = t\end{array} \right\}\\ &= \frac{1}{4}\int {\left\{ {\ln \left( {1 + t} \right) - \ln \left( {1 - t} \right)} \right\}} \, \cdot 1\,\,\,dt\\ &\qquad\qquad\qquad\qquad\qquad\;\;\;\;\; {\text{Ist}}\qquad {\text{IInd}}\\ &= \frac{1}{4}\left[ {t\left\{ {\ln \left( {1 + t} \right) - {\rm{ln}}\left( {1 - t} \right)} \right\} - \left( {\frac{1}{{1 + t}} + \frac{1}{{1 - t}}} \right) \cdot t\,\,dt} \right]\\& = \frac{1}{4}\left[ {t\ln \left( {\frac{{1 + t}}{{1 - t}}} \right) + \int {\frac{{2t}}{{1 - {t^2}}}\,d} t} \right]\\ & \qquad\qquad\qquad\qquad\qquad\nearrow \\&\qquad\qquad\qquad{\text{Use the substitution }}1 - {t^2} = z \Rightarrow - 2tdt = dx\\ &= \frac{1}{4}\left[ {t\ln \left( {\frac{{1 + t}}{{1 - t}}} \right) + \ln \left( {1 - {t^2}} \right)} \right] + C\\ &= \frac{1}{4}\left[ {\sin 2\theta \,\ln \left( {\frac{{1 + \sin 2\theta }}{{1 - \sin 2\theta }}} \right) + \ln \left( {{{\cos }^2}2\theta } \right)} \right] + C\end{align}

Sometimes, we encounter integrals of the form $$\int {{e^x}\left( {f\left( x \right) + f'\left( x \right)} \right)dx.}$$ This type of integrals can be solved easily using integration by parts as follows:

\begin{align}&I = \int {{e^x}\left( {f\left( x \right) + f'\left( x \right)} \right)dx}\\& = \int {f\left( x \right) \cdot {e^x}dx + \int {{e^x}f'\left( x \right)dx} } \\&\qquad\quad {\text{Ist}}\,\,\,\,\,\,\,{\text{IInd}}\\ &= {e^x}f\left( x \right) - \int {f'\left( x \right){e^x}dx + \int {{e^x}f'\left( x \right)dx} } \\ &= {e^x}f\left( x \right) + C\end{align}

Thus,

$\int {{e^x}\left( {f\left( x \right) + f'\left( x \right)} \right)dx = {e^x}f\left( x \right) + C}$

This relation can of course also be verified by differentiating the right hand side.

Example – 50

Evaluate the following integrals:

 (a) \begin{align}\int {{e^{2x}}\left( {\frac{{1 + \sin 2x}}{{1 + \cos 2x}}} \right)} \,\,dx\end{align} (b) \begin{align}\int {{e^x}\left\{ {\frac{{{x^3} - x + 2}}{{{{\left( {{x^2} + 1} \right)}^2}}}} \right\}} \,\,dx\end{align}

Solution: (a) We have

$I = \int {{e^{2x}}\left( {\frac{{1 + 2\sin x\cos x}}{{2{{\cos }^2}x}}} \right)} \,\,dx$

\begin{align} &\qquad\qquad =\int{{{e}^{2x}}\left( \frac{1}{2}{{\sec }^{2}}x+\tan x \right)}\,\,dx \\ & \\ & \qquad\qquad=\frac{1}{2}\int{{{e}^{t}}\left( \frac{1}{2}{{\sec }^{2}}\frac{t}{2}+\tan \frac{t}{2} \right)}\,\,dt~~\left( Using\text{ }the\text{ }substitution\text{ }2x=t \right) \\ & \\ &\qquad\qquad =\frac{1}{2}{{e}^{t}}\tan \frac{t}{2}+C~~\left( As\text{ }discussed\text{ }in\text{ }the\text{ }preceeding\text{ }discussion \right) \\ & \\ & \qquad\qquad=\frac{1}{2}{{e}^{2x}}\tan x+C \\ \end{align}

(b) We try to express \begin{align}\frac{{{x^3} - x + 2}}{{{{\left( {{x^2} + 1} \right)}^2}}}\end{align} in the form \begin{align}f\left( x \right) + f'\left( x \right).\end{align}

Let                                                                                                           \begin{align}f\left( x \right) = \frac{{Ax + B}}{{{x^2} + 1}}\end{align}

$\Rightarrow \qquad f'\left( x \right) = \frac{{A\left( {{x^2} + 1} \right) - 2x\left( {Ax + B} \right)}}{{{{\left( {{x^2} + 1} \right)}^2}}}$

$\qquad = \frac{{ - A{x^2} - 2Bx + A}}{{{{\left( {{x^2} + 1} \right)}^2}}}$

$\qquad \Rightarrow \qquad f\left( x \right)+{f}'\left( x \right)=\frac{Ax+B}{{{x}^{2}}+1}+\frac{-A{{x}^{2}}-2Bx+A}{{{\left( {{x}^{2}}+1 \right)}^{2}}}$

\begin{align}&= \frac{{\left( {Ax + B} \right)\left( {{x^2} + 1} \right) + \left( { - A{x^2} - 2Bx + A} \right)}}{{{{\left( {{x^2} + 1} \right)}^2}}}\\ &= \frac{{A{x^3} + \left( {B - A} \right){x^2} + \left( {A - 2B} \right)x + \left( {A + B} \right)}}{{{{\left( {{x^2} + 1} \right)}^2}}}\\\end{align}

Comparing the numerator of the expression above with $$\left( {{x^3} - x + 2} \right),$$ we obtain

$A=B=1$

$\Rightarrow \qquad I=\int{{{e}^{x}}\left\{ \frac{{{x}^{3}}-x+2}{{{\left( {{x}^{2}}+1 \right)}^{2}}} \right\}}dx$

\begin{align} & = \int {{e^x}\left\{ {\frac{{x + 1}}{{{x^2} + 1}} + \frac{{ - {x^2} - 2x + 1}}{{{{\left( {{x^2} + 1} \right)}^2}}}} \right\}} \,\,dx\\ &= {e^x}\left( {\frac{{x + 1}}{{{x^2} + 1}}} \right) + C\end{align}