How to solve $\int_{0}^{\frac{π}{2}} \frac{dx}{4\sin^2(x) +5\cos^2(x)} $ $?$ I apply the substitutions:
$$t=\tan(x), \sin(x)=\frac{t}{\sqrt{1+t^2}}, \cos(x)=\frac{1}{\sqrt{1+t^2}}\ \&\ dx=\frac{dt}{1+t^2}$$
(using $t=\tan(x)$ you can draw a right angled triangle to find the other substitutions)
So we get:
$$\int_{0}^{\frac{π}{2}} \frac{1}{\frac{4t^2}{1+t^2}+\frac{5}{1+t^2}}\frac{dt}{1+t^2}=\frac{1}{4}\int_{0}^{\frac{π}{2}} \frac{1}{t^2+\Big(\frac{\sqrt{5}}{2}\Big)^2} dt$$
This is in a standard integral form, thus:
$$\frac{1}{4}\cdot\frac{2}{\sqrt{5}}\tan^{-1}\Bigg(\frac{2t}{\sqrt{5}}\Bigg)=\frac{1}{2\sqrt{5}}\tan^{-1}\Bigg(\frac{2\tan(x)}{\sqrt{5}}\Bigg)$$
this is from $0$ to $π/2$.
But I can't substitute for $π/2$, because $\tan(x)$ is undefined for $π/2$. If I input this integral into Mathcad I get $\frac{π\sqrt{5}}{20}$. How can I get the right answer out of this? Thanks in advance!

$$
\begin{aligned}
 \int_{0}^{\frac{\pi}{2}} \frac{d x}{4 \sin ^{2} x+5 \cos ^{2} x} =& \int_{0}^{\frac{\pi}{2}} \frac{\sec ^{2} x}{4 \tan ^{2} x+5} d x \\
=& \frac{1}{2} \int_{0}^{\frac{\pi}{2}} \frac{d(2 \tan x)}{(2 \tan x)^{2}+(\sqrt{5})^{2}} \\
=& \frac{1}{2 \sqrt{5}}\left[\tan ^{-1}\left(\frac{2 \tan x}{\sqrt{5}}\right)\right]_{0}^{\frac{\pi}{2}} \\
=& \frac{1}{2 \sqrt{5}} \cdot \frac{\pi}{2} \\
=& \frac{\pi}{4 \sqrt{5}}
\end{aligned}
$$
