#### need solution for RD Sharma maths class 12 chapter Indefinite Integrals exercise 18.26 question 3

The correct answer is $e^{x} \tan \frac{x}{2}+c$
Hint:

Using formula:

\begin{aligned} i.\; \; \; \; &\sin ^{2} x+\cos ^{2} x=1 \\ ii.\; \; \; &\sin x=2 \sin \frac{x}{2} \cos \frac{x}{2} \end{aligned}

Given: $\int e^{x}\left(\frac{1+\sin x}{1+\cos x}\right) d x$

Solution:

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

$=e^{x}\left(\frac{\sin ^{2} \frac{x}{2}+\cos ^{2} \frac{x}{2}+2 \sin \frac{x}{2} 2 \cos \frac{x}{2}}{2 \cos ^{2} \frac{x}{2}}\right) d x$

$=\frac{e^{x}\left(\sin \frac{x}{2}+\cos \frac{x}{2}\right)^{2}}{2\left(\cos \frac{x}{2}\right)^{2}}$

$=\frac{1}{2} e^{x}\left(\frac{\sin \frac{x}{2}+\cos \frac{x}{2}}{\cos \frac{x}{2}}\right)^{2}$

\begin{aligned} &=\frac{1}{2} e^{x}\left[\tan \frac{x}{2}+1\right]^{2} \\ &=\frac{1}{2} e^{x}\left[1+\tan \frac{x}{2}\right]^{2} \end{aligned}

\begin{aligned} &=\frac{1}{2} e^{x}\left[1+\tan ^{2} \frac{x}{2}+2 \tan \frac{x}{2}\right] \\ &=\frac{1}{2} e^{x}\left[\sec ^{2} \frac{x}{2}+2 \tan \frac{x}{2}\right] \end{aligned}

$=e^{x}\left[\frac{1}{2} \sec ^{2} \frac{x}{2}+\tan \frac{x}{2}\right]------(1)$

Suppose  $\tan \frac{x}{2}=f(x)$

$f^{\prime}(x)=\frac{1}{2} \sec ^{2} \frac{x}{2}$

We know that, $\int e^{x}\left\{f(x)+f^{\prime}(x)\right\} d x=e^{x} f(x)+c$

From equation (1), we get

$\int e^{x}\left(\frac{1+\sin x}{1+\cos x}\right) d x=e^{x} \tan \frac{x}{2}+c$

So, the correct answer is $e^{x} \tan \frac{x}{2}+c$