Evaluate $\int \frac{1}{2+\cos x} d x$
To solve this type of solution , we are going to substitute the value of $\sin x$ and $\cos x$ in terms of $\tan (x / 2)$
$\sin x=\frac{2\left[\tan \frac{x}{2}\right]}{1+\tan ^{2} \frac{x}{2}}$
$\cos x=\frac{\left(1-\frac{\tan ^{2} x}{2}\right)}{1+\frac{\tan ^{2} x}{2}}$
$I=\int \frac{1}{\left(2+\frac{1-\tan ^{2} \frac{x}{2}}{1+\tan ^{2} \frac{x}{2}}\right)} d x$
$I=\int \frac{\sec ^{2} \frac{x}{2}}{\left(2+2 \tan ^{2} \frac{x}{2}+1-\tan ^{2} \frac{x}{2}\right)} d x$
In this type of equations we apply substitution method so that equation may be solve in simple way
Let $\tan (x / 2)=\mathrm{t}$
$1 / 2 \cdot \sec ^{2}(x / 2) d x=d t$
Put these terms in above equation, we get $l=2 \int \frac{d t}{\left(3+t^{2}\right)}$
$I=\frac{2.1}{(\sqrt{3})} \tan ^{-1} \frac{t}{\sqrt{3}}$
$=\frac{2}{\sqrt{3}} \cdot \tan ^{-1}\left(\frac{x}{2 \sqrt{3}}\right)$