I was trying to compute
$$ \int_0^{\frac{\pi}{2}} \frac{1}{1+\cos^4x} dx$$
Which I was successfully able to evaluate as $\frac{\sqrt{\sqrt{2}+1}\pi}{4}$ by substituting $\tan x = t$, replacing $\cos^2x$ with $\frac{1}{1+t^2}$ and evaluating further, splitting the integral into two forms whose integrals are of the form $\frac{dv}{v^2+a^2}$ and $\frac{du}{u^2+b^2}$.
I was wondering if we can evaluate the same integral for higher exponents of $\cos x$, i.e. an expression for
$$\ I = \int_0^{\frac{\pi}{2}} \frac{1}{1+\cos^nx} dx$$
I tried the same substitution as above, but the integral turned out to be something I could not integrate.
$$\ I = \int_0^{\infty} \frac{dt}{(t^2+1)\cdot(1+(\frac{1}{1+t^2})^{n/2})}$$
$$\ I = \int_0^{\infty} \frac{dt}{(t^2+1)^{1-\frac{n}{2}}\cdot((t^2+1)^{\frac{n}{2}}+1))}$$
Let $\ (1+t^2)^{\frac{n}{2}} = v$, $\space$ i.e. $\ t = (v^{\frac{2}{n}}-1)^{\frac{1}{2}}$.
Substituting $\ v$ in the integral, we get:
$$ I = \frac{1}{n} \cdot \int_1^{\infty} \frac{dv}{(v+1)\cdot(v^{\frac{2}{n}}-1)^{\frac{1}{2}}}$$
I got stuck here. Can anyone give some suggestions on how to proceed further, or a better approach? I have yet to study complex integration or hypergeometric functions, so it would be greatly appreciated if you provide a solution without using them.