Evaluate the following integrals:
$\int \frac{1}{\sqrt{3} \sin x+\cos x} d x$
Given $I=\int \frac{1}{\sqrt{3} \sin x+\cos x} d x$
Let $\sqrt{3}=r \cos \theta$ and $1=r \sin \theta$
$r=\sqrt{3+1}=2$
And $\tan \theta=1 / \sqrt{3} \rightarrow \theta=\pi / 6$
$\Rightarrow \int \frac{1}{\sqrt{3} \sin x+\cos x} d x=\int \frac{1}{r \cos \theta \sin x+r \sin \theta \cos x} d x$
$=\frac{1}{r} \int \frac{1}{\sin (x+\theta)} d x$
$=\frac{1}{r} \int \operatorname{cosec}(x+\theta) d x$
We know that $\int \operatorname{cosec} x d x=\log \left|\tan \frac{x}{2}\right|+c$
$\Rightarrow \frac{1}{r} \int \operatorname{cosec}(x+\theta) d x=\frac{1}{2} \log \left|\tan \left(\frac{x}{2}+\frac{\theta}{2}\right)\right|+c$
$=\frac{1}{2} \log \left|\tan \left(\frac{\mathrm{X}}{2}+\frac{\pi}{12}\right)\right|+\mathrm{c}$
$\therefore \mathrm{I}=\int \frac{1}{\sqrt{3} \sin \mathrm{x}+\cos \mathrm{x}} \mathrm{dx}=\frac{1}{2} \log \left|\tan \left(\frac{\mathrm{x}}{2}+\frac{\pi}{12}\right)\right|+\mathrm{c}$