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

Answer : $\sqrt{2} \tan ^{-1}\left(\frac{\tan \left(\frac{x}{2}\right)+1}{\sqrt{2}}\right)+c$

Hint : To solve this equation we have to convert sinx and cosx in terms of tanx

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

Solution : We use the formula : $\left[\begin{array}{l} \sin x=\frac{2 \tan \frac{x}{2}}{1+\tan ^{2} \frac{x}{2}} \\ \cos x=\frac{1-\tan ^{2} \frac{x}{2}}{1+\tan ^{2} \frac{x}{2}} \end{array}\right]$

\begin{aligned} &=\int \frac{1}{2+\frac{2 \tan \frac{x}{2}}{1+\tan ^{2} \frac{x}{2}}+\frac{1-\tan ^{2} \frac{x}{2}}{1+\tan ^{2} \frac{x}{2}}} d x\\ &=\int \frac{1+\tan ^{2} \frac{x}{2}}{2+2 \tan ^{2} \frac{x}{2}+2 \tan \frac{x}{2}+1-\tan ^{2} \frac{x}{2}} d x \end{aligned}

Multiple 2 by numerators and denominator

$\int \frac{2\left(\sec ^{2} \frac{x}{2}\right)}{2\left(\tan ^{2} \frac{x}{2}+2 \tan \frac{x}{2}+3\right)} d x$

\begin{aligned} &t=\tan \frac{x}{2} \\ &\frac{d t}{d x}=\frac{1}{2} \sec ^{2} \frac{x}{2} \\ &d t=\frac{1}{2} \sec ^{2} \frac{x}{2} d x \end{aligned}

\begin{aligned} &=2 \int \frac{d t}{t^{2}+2 t+3} \\ &=2 \int \frac{d t}{\left(t^{2}+2 t+1\right)+2} \\ &=2 \int \frac{d t}{(t+1)^{2}+2} \end{aligned}

\begin{aligned} &t+1=u \\ &1=\frac{d u}{d t} \\ &d u=d t \\ &=2 \int \frac{d u}{(u)^{2}+(\sqrt{2})^{2}} \end{aligned}

\begin{aligned} &\int \frac{d x}{x^{2}+a^{2}}=\frac{1}{a} \tan ^{-1}\left(\frac{x}{a}\right)+c \\ &=\sqrt{2} \times \frac{\sqrt{2}}{\sqrt{2}} \tan ^{-1}\left(\frac{u}{\sqrt{2}}\right)+c \\ &=\sqrt{2} \tan ^{-1}\left(\frac{t+1}{\sqrt{2}}\right)+c \end{aligned}

$=\sqrt{2} \tan ^{-1}\left(\frac{\tan \frac{x}{2}+1}{\sqrt{2}}\right)+c$