#### Provide solution for RD Sharma maths class 12 chapter Indefinite Integrals exercise 18.16 question 14

$\log \left|\frac{e^{x}+1}{e^{x}+2}\right|+C$

Hint:

Use substitution method as well as special integration formula to solve this type of problem

GIven:

$\int \frac{e^{x}}{\left(1+e^{x}\right)\left(2+e^{x}\right)} d x$

Solution:

$Let\: \: I=\int \frac{e^{x}}{\left(1+e^{x}\right)\left(2+e^{x}\right)} d x$

$Let\: \: e^{x}=t\Rightarrow e^{x}dx=dt$

$Then\: \: I=\int \frac{1}{\left(1+t\right)\left(2+t\right)} d t$

\begin{aligned} &=\int \frac{1}{t^{2}+2 t+t+2} d t \\ &=\int \frac{1}{t^{2}+3 t+2} d t \\ &=\int \frac{1}{t^{2}+2 \cdot t \cdot \frac{3}{2}+\left(\frac{3}{2}\right)^{2}-\left(\frac{3}{2}\right)^{2}+2} d t \\ &=\int \frac{1}{\left(t+\frac{3}{2}\right)^{2}-\frac{9}{4}+2} d t \\ &=\int \frac{1}{\left(t+\frac{3}{2}\right)^{2}-\left(\frac{9-8}{4}\right)} d t \\ &=\int \frac{1}{\left(t+\frac{3}{2}\right)^{2}-\frac{1}{4}} d t \\ &=\int \frac{1}{\left(t+\frac{3}{2}\right)^{2}-\left(\frac{1}{2}\right)^{2}} d t \end{aligned}

$Put\: \: t+\frac{3}{2}=u\Rightarrow dt=du$

$Then\: \: I=\int \frac{1}{u^{2}-\left(\frac{1}{2}\right)^{2}} d u$

$\begin{array}{ll} =\frac{1}{2 \times \frac{1}{2}} \log \left|\frac{u-\frac{1}{2}}{u+\frac{1}{2}}\right|+C \quad\left[\because \int \frac{1}{x^{2}-a^{2}} d x=\frac{1}{2 a} \log \left|\frac{x-a}{x+a}\right|+C\right] \\ \\=\log \left|\frac{t+\frac{3}{2}-\frac{1}{2}}{t+\frac{3}{2}+\frac{1}{2}}\right|+C \quad\left[\because t+\frac{3}{2}=u\right] \\ \\=\log \left|\frac{2 t+2}{2 t+4}\right|+C \\ \\=\log \left|\frac{t+1}{t+2}\right|+C \\ \end{array}$

$=\log \left|\frac{e^{x}+1}{e^{x}+2}\right|+C\: \: \: \: \: \: \: [\because t=e^{x}]$