Explain Solution R.D.Sharma Class 12 Chapter 18 Indefinite Integrals Exercise Revision Exercise  Question 124 Maths Textbook Solution.

Answer: $\frac{1}{2} \log \left|\frac{1+x}{\sqrt{1+x^{2}}}\right|+\frac{1}{2} \tan ^{-1} x+C$

Given:$\int \frac{1}{1+x+x^{2}+x^{3}} d x$

Hint: using partial function

Explanation: let $I=\int \frac{1}{1+x+x^{2}+x^{2}} d x$

\begin{aligned} &\frac{1}{1+x+x^{2}+x^{3}}=\frac{1}{(1+x)+x^{2}(1+x)}=\frac{1}{\left(1+x^{2}\right)(1+x)} \\ &\frac{1}{1+x+x^{2}+x^{3}}=\frac{1}{\left(1+x^{2}\right)(1+x)} \\ &\frac{1}{(1+x)\left(1+x^{2}\right)}=\frac{A}{(1+x)}+\frac{B x+C}{\left(1+x^{2}\right)} \end{aligned}

Multiplying by  $(1+x)\left(1+x^{2}\right)$

$1=A\left(1+x^{2}\right)+(B x+C)(1+x)$

\begin{aligned} &\text { put } x=-1 \\ &1=A(1+1)+(B(-1)+C)(1-1) \\ &1=A(2)+0=>A=\frac{1}{2} \end{aligned}

\begin{aligned} &\text { put } x=0 \\ &1=A(1+0)+(B(0)+C)(1+0) \\ &1=A+C=>1-\frac{1}{2}=C \Rightarrow \frac{1}{2} \end{aligned}

\begin{aligned} &\text { putting } x=1 \\ &1=A(1+1)+(B+C)(1+1) \\ &1=2 A+2 B+2 C \\ &1=2\left(\frac{1}{2}\right)+2 B+2\left(\frac{1}{2}\right) \\ &1=2 B+1=>2 B=1-2=>B=-\frac{1}{2} \end{aligned}

\begin{aligned} &\frac{1}{(1+x)\left(1+x^{2}\right)}=\frac{1}{2(1+x)}+\frac{1}{2}\left(\frac{-x+1}{\left(1+x^{2}\right)}\right) \\ &\int \frac{1}{(1+x)\left(1+x^{2}\right)} d x=\frac{1}{2} \int \frac{1}{1+x} d x-\frac{1}{2} \int \frac{x-1}{1+x^{2}} d x \\ &=\frac{1}{2} \int \frac{1}{1+x^{2}} d x-\frac{1}{2^{2}} \int \frac{2 x}{1+x^{2}} d x+\frac{1}{2} \int \frac{1}{1+x^{2}} d x \\ &=\frac{1}{2} \log |1+x|-\frac{1}{4} \log \left|1+x^{2}\right|+\frac{1}{2} \tan ^{-1} x+C \\ &=\frac{1}{2}\left[\log |1+x|-\log \left|\sqrt{1+x^{2}}\right|\right]+\frac{1}{2} \tan ^{-1} x+C \\ &=\frac{1}{2} \log \left|\frac{1+x}{\sqrt{1+x^{2}}}\right|+\frac{1}{2} \tan ^{-1} x+C \end{aligned}