#### provide solution for RD Sharma maths class 12 chapter Indefinite Integrals exercise 18.24 question 1 sub question (ii)

Answer: $\frac{1}{2} x-\frac{1}{2} \log |\cos x-\sin x|+c$

Hint: $\text { Put, } \cos x-\sin x=t \Rightarrow(-\sin x-\cos x) d x=d t$

Given: $\int \frac{1}{1-\tan x} \mathrm{dx}$

Explanation:

$\text { Let I}=\int \frac{1}{1-\tan x} \mathrm{dx}$

\begin{aligned} &=\int \frac{1}{1-\frac{\sin x}{\cos x}} \mathrm{dx} \\ &=\int \frac{\cos x}{\cos x-\sin x} \mathrm{dx} \end{aligned}

\begin{aligned} &=\frac{1}{2} \int \frac{2 \cos x}{\cos x-\sin x} \mathrm{~d} \mathrm{x} \\ &=\frac{1}{2} \int \frac{(\cos x-\sin x)+(\cos x+\sin x)}{(\cos x-\sin x)} \mathrm{dx} \end{aligned}

\begin{aligned} &=\frac{1}{2} \int 1 d x+\frac{1}{2} \int \frac{\cos x+\sin x}{\cos x-\sin x} \mathrm{~d} x \\ &=\frac{x}{2}+\frac{1}{2} \int \frac{\cos x+\sin x}{\cos x-\sin x} \mathrm{~d} x \end{aligned}

$\text { Put, } \operatorname{cos} x-\sin x=t \Rightarrow(-\sin x-\cos x) d x=d t$

\begin{aligned} &\mathrm{I}=\frac{x}{2}+\frac{1}{2} \int \frac{-(d t)}{t} \\ &=\frac{x}{2}-\frac{1}{2} \log |\mathrm{t}|+\mathrm{c} \\ &=\frac{x}{2}-\frac{1}{2} \log |\operatorname{cos} \mathrm{x}-\operatorname{sin} \mathrm{x}|+\mathrm{c} \end{aligned}