#### Provide Solution For RD Sharma Maths Class 12 Chapter 18  Indefinite Integrals Exercise 18.23 Question 9 Maths Textbook Solution.

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

Hint : To solve this equation we use formula of $\cos (A-B)$

Given : $\int \frac{1}{\sin x+\cos x} d x$

Solution : Let  $I=\int \frac{1}{\sin x+\cos x} d x$

\begin{aligned} &=\frac{\sqrt{2}(\sin x+\cos x)}{\sqrt{2}} \\ &=\sqrt{2}\left(\frac{1}{\sqrt{2}} \sin x+\frac{1}{\sqrt{2}} \cos x\right) \\ &=\sqrt{2}\left(\sin \frac{\pi}{4} \sin x+\cos \frac{\pi}{4} \cos x\right) \end{aligned}

\begin{aligned} &=\sqrt{2}\left(\cos x \cdot \cos \frac{\pi}{4}+\sin x \sin \frac{\pi}{4}\right) \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \; \quad[\cos (A-B)=\cos A \cos B+\sin A \sin B] \\ &I=\sqrt{2}\left[\cos \left(x-\frac{\pi}{4}\right)\right] \\ &I=\int \frac{d x}{\sin x+\cos x}=\frac{1}{\sqrt{2}} \int \frac{d x}{\cos \left(x-\frac{\pi}{4}\right)} \\ &I=\frac{1}{\sqrt{2}} \int \sec \left(x-\frac{\pi}{4}\right) d x \end{aligned}

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

Note : Final answer is not matching.