#### Explain solution RD Sharma class 12 chapter Indefinite Integrals exercise 18.16 question 16 maths

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

Hint:

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

Given:

$\int \frac{1}{\cos x+\operatorname{cosec} x} d x$

Solution:

$Let\: \: I=\int \frac{1}{\cos x+\operatorname{cosec} x} d x$

\begin{aligned} &=\frac{1}{\cos x+\frac{1}{\sin x}} d x \quad\left[\because \operatorname{cosec} x=\frac{1}{\sin x}\right] \\ &=\int \frac{1}{\frac{\cos x \cdot \sin x+1}{\sin x}} d x=\int \frac{\sin x}{\cos x \cdot \sin x+1} d x \\ &=\int \frac{2 \sin x}{2(\cos x \cdot \sin x+1)} d x=\int \frac{\sin x+\sin x}{2+2 \sin x \cdot \cos x} d x \\ &=\int \frac{\sin x+\cos x-\cos x+\sin x}{2+2 \sin x \cdot \cos x} d x \\ &=\int\left\{\frac{\sin x+\cos x}{2+2 \sin x \cdot \cos x}+\frac{\sin x-\cos x}{2+2 \sin x \cdot \cos x}\right\} d x \end{aligned}

\begin{aligned} &=\int \frac{\sin x+\cos x}{2+2 \sin x \cdot \cos x} d x+\int \frac{\sin x-\cos x}{2+2 \sin x \cdot \cos x} d x \\ &=\int \frac{\sin x+\cos x}{3-1+2 \sin x \cdot \cos x} d x+\int \frac{\sin x-\cos x}{1+1+2 \sin x \cdot \cos x} d x \\ &=\int \frac{\sin x+\cos x}{3-\left(\sin ^{2} x+\cos ^{2} x\right)+2 \sin x \cdot \cos x} d x+\int \frac{\sin x-\cos x}{1+\left(\sin x+\cos ^{2} x\right)+2 \sin x \cdot \cos x} d x \\ &{\left[\because 1=\sin ^{2} x+\cos ^{2} x\right]} \\ &=\int \frac{\sin x+\cos x}{3-\sin ^{2} x-\cos ^{2} x+2 \sin x \cdot \cos x} d x+\int \frac{\sin x-\cos x}{1+\left(\sin ^{2} x+\cos ^{2} x+2 \sin x \cdot \cos x\right)} d x \end{aligned}

\begin{aligned} &=\int \frac{\sin x+\cos x}{3-\left(\sin ^{2} x+\cos ^{2} x-2 \sin x \cdot \cos x\right)} d x+\int \frac{\sin x-\cos x}{1+(\sin x+\cos x)^{2}} d x \\ &=\int \frac{\sin x+\cos x}{3-(\sin x-\cos x)^{2}} d x+\int \frac{\sin x-\cos x}{1+(\sin x+\cos x)^{2}} d x \\ &\text { Let } I=I_{1}+I_{2}\: \: \: \: \: \: ...(i) \\ &\Rightarrow \int \frac{1}{\cos x+\operatorname{cosec} x} d x=\int \frac{\sin x+\cos x}{3-(\sin x-\cos x)^{2}} d x+\int \frac{\sin x-\cos x}{1+(\sin x+\cos x)^{2}} d x \\ &\text { Where } I_{1}=\int \frac{\sin x+\cos x}{3-(\sin x-\cos x)^{2}} d x \end{aligned}

$\text { And } I_{2}=\int \frac{\sin x-\cos x}{1+(\sin x+\cos x)^{2}} d x$

Here first we find the integral of I1 and I2 then we put the value of  I1 and I2  in I  and then we get the required solution

\begin{aligned} &\text { So } I_{1}=\int \frac{\sin x+\cos x}{3-(\sin x-\cos x)^{2}} d x \\ &\text { Put } t=\sin x-\cos x \Rightarrow d t=[\cos x-(-\sin x)] d x \Rightarrow d t=[\cos x+\sin x] d x \\ &\text { Then } I_{1}=\int \frac{1}{3-t^{2}} d t=\int \frac{1}{(\sqrt{3})^{2}-t^{2}} d t \\ &=\frac{1}{2 \sqrt{3}} \log \left|\frac{\sqrt{3}+t}{\sqrt{3}-t}\right|+C_{1} \quad\left[\because \int \frac{1}{a^{2}-x^{2}} d x=\frac{1}{2 a} \log \left|\frac{a+x}{a-x}\right|+C\right] \\ &=\frac{1}{2 \sqrt{3}} \log \left|\frac{\sqrt{3}+\sin x-\cos x}{\sqrt{3}-(\sin x-\cos x)}\right|+C_{1} \quad[\because t=\sin x-\cos x] \\ &=\frac{1}{2 \sqrt{3}} \log \left|\frac{\sqrt{3}+\sin x-\cos x}{\sqrt{3}-\sin x+\cos x}\right|+C_{1}\: \: \: \: ......(ii) \\ &\text { And } I_{2}=\int \frac{\sin x-\cos x}{1+(\sin x+\cos x)^{2}} d x \end{aligned}

\begin{aligned} &\text { Put } u=\sin x+\cos x \Rightarrow d u=(\cos x-\sin x) d x \Rightarrow d u=-(\sin x-\cos x) d x\\ &\Rightarrow(\sin x-\cos x) d x=-d u\\ &\therefore I_{2}=\int \frac{1}{1+u^{2}}(-d u)=-\int \frac{1}{1^{2}+u^{2}} d u\\ &=-\tan ^{-1}\left(\frac{u}{1}\right)+C_{2} \quad\left[\because \int \frac{1}{a^{2}+x^{2}} d x=\frac{1}{a} \tan ^{-1}\left(\frac{x}{a}\right)+C\right]\\ &=-\tan ^{-1}(\sin x+\cos x)+C_{2}\: \: \: \: .....\text { (iii) }[\because u=\sin x+\cos x]\\ &\text { Putting the value of (ii) and (iii) in (i) we get }\\ &I=I_{1}+I_{2}\\ &=\frac{1}{2 \sqrt{3}} \log \left|\frac{\sqrt{3}+\sin x-\cos x}{\sqrt{3}-\sin x+\cos x}\right|+C_{1}+\left\{-\tan ^{-1}(\sin x+\cos x)+C_{2}\right\}\\ &=\frac{1}{2 \sqrt{3}} \log \left|\frac{\sqrt{3}+\sin x-\cos x}{\sqrt{3}-\sin x+\cos x}\right|-\tan ^{-1}(\sin x+\cos x)+C \quad\left[\because C=C_{1}+C_{2}\right] \end{aligned}