# Evaluate the following integrals:

Question:

Evaluate $\int \frac{\sqrt{1-\sin x}}{1+\cos x} e^{-x / 2} d x$

Solution:

$=\int e^{\frac{x}{2}} \frac{\sqrt{\sin ^{2} \frac{x}{2}+\cos ^{2} \frac{x}{2}-2 \sin \frac{x}{2} \cos \frac{x}{2}}}{2 \cos ^{2} \frac{x}{2}}=$

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

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

$=\int\left[\frac{1}{2} \tan \frac{x}{2} \sec \frac{x}{2} e^{-\frac{x}{2}}-\frac{1}{2} \sec \frac{x}{2} e^{-\frac{x}{2}}\right] d x$

$=\frac{1}{2} \int \tan \frac{x}{2} \sec \frac{x}{2} e^{-\frac{x}{2}} d x-\frac{1}{2} \int \sec \frac{x}{2} e^{-\frac{x}{2}} d x$

$=\frac{1}{2} \int \tan \frac{x}{2} \sec \frac{x}{2} e^{-\frac{x}{2}} d x-\frac{1}{2}\left[\sec \frac{x}{2} \int e^{-\frac{x}{2}} d x-\int \frac{d}{d x}\left(\sec \frac{x}{2}\right) \int\left(e^{-\frac{x}{2}} d x\right) d x\right.$

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

$=\sec \frac{x}{2}\left(e^{\frac{-x}{2}}\right)+c$