#### explain solution RD Sharma class 12 Chapter 18 Indefinite Integrals exercise 18.30 question 70

$-\log (1-\sin x)+\frac{1}{2} \log \left(1+\sin ^{2} x\right)+\tan ^{-1}(\sin x)+C$

Hint:

To solve this integration, we use partial fraction method

Given:

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

Explanation:

Let

$I=\int \frac{2 \cos x}{(1-\sin x)\left(1+\sin ^{2} x\right)} d x$

\begin{aligned} &\text { Put } \sin x=t \\ &\cos x d x=d t \\ &I=\int \frac{2 d t}{(1-t)\left(1+t^{2}\right)} \end{aligned}                       (1)

\begin{aligned} &\frac{2}{(1-t)\left(1+t^{2}\right)}=\frac{A}{1-t}+\frac{B t+C}{1+t^{2}} \\ &2=A\left(t^{2}+1\right)+(B t+C)(1-t) \\ &\text { At } t=1 \\ &\begin{array}{l} 2=2 A+(B+C)(0) \\ A=1 \end{array} \\ &\begin{array}{l} \end{array} \end{aligned}

\begin{aligned} &\text { At } t=0 \\ &\begin{array}{l} 2=A+C \\ 2=1+C \\ C=1 \\ \text { At } t=-1 \\ 2=2 A+(-B+C)(2) \\ 2=2(1)+(-B+1)(2) \\ 2=2+2(1-B) \\ 1-B=0 \\ B=1 \end{array} \end{aligned}

\begin{aligned} &I=\int \frac{1}{1-t} d t+\int \frac{t+1}{t^{2}+1} d t \\ &I=-\log (1-t)+\frac{1}{2} \int \frac{2 t}{t^{2}+1} d t+\int \frac{1}{t^{2}+1} d t \end{aligned}

\begin{aligned} &I=-\log (1-t)+\frac{1}{2} \log \left(1+t^{2}\right)+\tan ^{-1} t+C \\ &I=-\log (1-\sin x)+\frac{1}{2} \log \left(1+\sin ^{2} x\right)+\tan ^{-1}(\sin x)+C \end{aligned}