Evaluate the following integrals:
Question:

Evaluate the following integrals:

$\int \frac{1}{\cos 2 x+3 \sin ^{2} x} d x$

Solution:

Given $I=\int \frac{1}{\cos 2 x+3 \sin ^{2} x} d x$

We know that $\cos 2 x=1-2 \sin ^{2} x$

$\Rightarrow \int \frac{1}{\cos 2 x+3 \sin ^{2} x} d x=\int \frac{1}{1-2 \sin ^{2} x+3 \sin ^{2} x} d x$

$=\int \frac{1}{1+\sin ^{2} x} d x$

Dividing numerator and denominator by $\cos ^{2} x$,

$\Rightarrow \int \frac{1}{1+\sin ^{2} x} d x=\int \frac{\sec ^{2} x}{\sec ^{2} x+\tan ^{2} x} d x$

Replacing $\sec ^{2} x$ in denominator by $1+\tan ^{2} x$

$\Rightarrow \int \frac{\sec ^{2} x}{\sec ^{2} x+\tan ^{2} x} d x=\int \frac{\sec ^{2} x}{1+2 \tan ^{2} x} d x$

Putting $\tan x=t$ so that $\sec ^{2} x d x=d t$,

$\Rightarrow \int \frac{\sec ^{2} x}{1+2 \tan ^{2} x} d x=\int \frac{d t}{1+2 t^{2}}$

$=\frac{1}{2} \int \frac{1}{\frac{1}{2}+t^{2}} d t$

We know that $\int \frac{1}{\mathrm{a}^{2}+\mathrm{x}^{2}} \mathrm{dx}=\frac{1}{\mathrm{a}} \tan ^{-1}\left(\frac{\mathrm{x}}{\mathrm{a}}\right)+\mathrm{c}$

$\Rightarrow \frac{1}{2} \int \frac{1}{\frac{1}{2}+t^{2}} d t=\frac{1}{2} \times \frac{1}{\frac{1}{\sqrt{2}}} \tan ^{-1}\left(\frac{t}{\frac{1}{\sqrt{2}}}\right)+c$

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

$\therefore \mathrm{I}=\int \frac{1}{\cos 2 \mathrm{x}+3 \sin ^{2} \mathrm{x}} \mathrm{dx}=\frac{1}{\sqrt{2}} \tan ^{-1}(\sqrt{2} \tan \mathrm{x})+\mathrm{c}$