$\int_{0}^{\frac{\pi}{2}} \frac{\cos ^{2} x d x}{\cos ^{2} x+4 \sin ^{2} x}$
Let $I=\int_{0}^{\frac{\pi}{2}} \frac{\cos ^{2} x}{\cos ^{2} x+4 \sin ^{2} x} d x$
$\Rightarrow I=\int_{0}^{\frac{\pi}{2}} \frac{\cos ^{2} x}{\cos ^{2} x+4\left(1-\cos ^{2} x\right)} d x$
$\Rightarrow I=\int_{0}^{\frac{\pi}{2}} \frac{\cos ^{2} x}{\cos ^{2} x+4-4 \cos ^{2} x} d x$
$\Rightarrow I=\frac{-1}{3} \int_{0}^{\frac{\pi}{2}} \frac{4-3 \cos ^{2} x-4}{4-3 \cos ^{2} x} d x$
$\Rightarrow I=\frac{-1}{3} \int_{0}^{\frac{\pi}{2}} \frac{4-3 \cos ^{2} x}{4-3 \cos ^{2} x} d x+\frac{1}{3} \int_{0}^{\frac{\pi}{2}} \frac{4}{4-3 \cos ^{2} x} d x$
$\Rightarrow I=\frac{-1}{3} \int_{0}^{\frac{\pi}{2}} 1 d x+\frac{1}{3} \int_{0}^{\frac{\pi}{2}} \frac{4 \sec ^{2} x}{4 \sec ^{2} x-3} d x$
$\Rightarrow I=\frac{-1}{3}[x]_{0}^{\frac{\pi}{2}}+\frac{1}{3} \int_{0}^{\frac{\pi}{2}} \frac{4 \sec ^{2} x}{4\left(1+\tan ^{2} x\right)-3} d x$
$\Rightarrow I=-\frac{\pi}{6}+\frac{2}{3} \int_{0}^{\frac{\pi}{2}} \frac{2 \sec ^{2} x}{1+4 \tan ^{2} x} d x$ ...(1)
Consider, $\int_{0}^{\frac{\pi}{2}} \frac{2 \sec ^{2} x}{1+4 \tan ^{2} x} d x$
Let $2 \tan x=t \Rightarrow 2 \sec ^{2} x d x=d t$
When $x=0, t=0$ and when $x=\frac{\pi}{2}, t=\infty$
$\begin{aligned} \Rightarrow \int_{0}^{\frac{\pi}{2}} \frac{2 \sec ^{2} x}{1+4 \tan ^{2} x} d x &=\int_{0}^{\infty} \frac{d t}{1+t^{2}} \\ &=\left[\tan ^{-1} t\right]_{0}^{\infty} \\ &=\left[\tan ^{-1}(\infty)-\tan ^{-1}(0)\right] \\ &=\frac{\pi}{2} \end{aligned}$
Therefore, from (1), we obtain
$I=-\frac{\pi}{6}+\frac{2}{3}\left[\frac{\pi}{2}\right]=\frac{\pi}{3}-\frac{\pi}{6}=\frac{\pi}{6}$