Spurred on this question I decided to investigate the following integral:
\begin{equation} I_n = \int_0^{\frac{\pi}{2}}\frac{1}{\sin^{2n}(x) + \cos^{2n}(x)}\:dx \end{equation}
Where $n \in \mathbb{N}$.
The approach I've taken is rather simple and whilst I've arrived at a closed form solution, I'm wondering whether the resultant sum can be expressed in terms of (non)-elementary functions. Would love to see other methods that can be used to solve this! (Using any methods).
First:
\begin{equation} I_n = \int_0^{\frac{\pi}{2}}\frac{1}{\sin^{2n}(x) + \cos^{2n}(x)}\:dx = \int_0^{\frac{\pi}{2}}\frac{1}{\left[\sin^{2}(x)\right]^n + \left[\cos^{2}(x)\right]^n}\:dx \end{equation}
Using the Double-Angle Formulas:
\begin{equation} \sin^2(x) = \frac{1 - \cos\left(2x\right)}{2} \qquad \cos^2(x) = \frac{1 + \cos\left(2x\right)}{2} \end{equation}
Thus:
\begin{align} I_n &= \int_0^{\frac{\pi}{2}}\frac{1}{\left[\sin^{2}(x)\right]^n + \left[\cos^{2}(x)\right]^n}\:dx = \int_0^{\frac{\pi}{2}}\frac{1}{\left[\frac{1 - \cos\left(2x\right)}{2}\right]^n + \left[\frac{1 + \cos\left(2x\right)}{2}\right]^n}\:dx \\ &= 2^n \int_0^{\frac{\pi}{2}} \frac{1}{\left[1 - \cos\left(2x\right)\right]^n + \left[1 + \cos\left(2x\right)\right]^n}\:dx \end{align}
Making the substitution $u = 2x$
\begin{equation} I_n = 2^n \int_0^{\frac{\pi}{2}} \frac{1}{\left[1 - \cos\left(2x\right)\right]^n + \left[1 + \cos\left(2x\right)\right]^n}\:dx = 2^{n - 1} \int_0^{\pi} \frac{1}{\left[1 - \cos\left(u\right)\right]^n + \left[1 + \cos\left(u\right)\right]^n}\:du \end{equation}
Now apply the Weierstrass (/Tangent half angle) substitution $t = \tan\left(\frac{u}{2}\right)$:
\begin{align} I_n &= 2^{n - 1} \int_0^{\pi} \frac{1}{\left[1 - \cos\left(u\right)\right]^n + \left[1 + \cos\left(u\right)\right]^n}\:du = 2^{n - 1} \int_0^{\infty} \frac{1}{\left[1 - \frac{1 - t^2}{1 + t^2}\right]^n + \left[1 + \frac{1 - t^2}{1 + t^2}\right]^n} \frac{2\:dt}{t^2 + 1} \\ &= \int_0^{\infty} \frac{\left[1 + t^2 \right]^{n - 1}}{t^{2n} + 1}\:dt \end{align}
By the Binomial Theorem:
\begin{equation} \left[1 + t^2 \right]^{2n - 1} = \sum_{j = 0}^{n - 1} {n - 1 \choose j}t^{2j} \end{equation}
Thus: \begin{align} I_n &= \int_0^{\infty} \frac{\left[1 + t^2 \right]^{2n - 1}}{t^{2n} + 1}\:dt = \sum_{j = 0}^{n - 1} {n - 1 \choose j} \int_0^{\infty} \frac{t^{2j}}{t^{2n} + 1} \end{align}
Using the solution I found here we find:
\begin{align} I_n &= \sum_{j = 0}^{n - 1} {n - 1 \choose j} \int_0^{\infty} \frac{t^{2j}}{t^{2n} + 1} = \sum_{j = 0}^{n - 1} {n - 1 \choose j} \cdot \frac{1}{2n} \cdot 1^{\frac{2j + 1}{2n} - 1}B\left(1 - \frac{2j + 1}{2n} , \frac{2j + 1}{2n}\right) \\ &= \frac{1}{2n}\sum_{j = 0}^{n - 1} {n - 1 \choose j} B\left(1 - \frac{2j + 1}{2n} , \frac{2j + 1}{2n}\right) \end{align}
Using the relationship between the Beta and Gamma function:
\begin{align} I_n &= \frac{1}{2n}\sum_{j = 0}^{n - 1} {n - 1 \choose j} B\left(1 - \frac{2j + 1}{2n} , \frac{2j + 1}{2n}\right) = \frac{1}{2n}\sum_{j = 0}^{n - 1} {n - 1 \choose j} \frac{\Gamma\left(1 - \frac{2j + 1}{2n}\right)\Gamma\left(\frac{2j + 1}{2n}\right)}{\Gamma\left(1 - \frac{2j + 1}{2n} + \frac{2j + 1}{2n}\right)} \\ &= \frac{1}{2n}\sum_{j = 0}^{n - 1} {n - 1 \choose j}\Gamma\left(1 - \frac{2j + 1}{2n}\right)\Gamma\left(\frac{2j + 1}{2n}\right) \end{align}
As $\frac{2j + 1}{2n} \not \in \mathbb{Z}$ we can employ Euler's Reflection Formula to yield:
\begin{align} I_n &= \frac{1}{2n}\sum_{j = 0}^{n - 1} {n - 1 \choose j}\Gamma\left(1 - \frac{2j + 1}{2n}\right)\Gamma\left(\frac{2j + 1}{2n}\right) = \frac{1}{2n}\sum_{j = 0}^{n - 1} {n - 1 \choose j} \frac{\pi}{\sin\left(\pi \cdot \frac{2j + 1}{2n}\right)} \\&= \frac{\pi}{2n}\sum_{j = 0}^{n - 1} {n - 1 \choose j} \operatorname{cosec}\left(\frac{\pi}{2n}\left(2j + 1\right) \right) \end{align}
Thus,
\begin{equation} \int_0^{\frac{\pi}{2}}\frac{1}{\sin^{2n}(x) + \cos^{2n}(x)}\:dx = \frac{\pi}{2n}\sum_{j = 0}^{n - 1} {n - 1 \choose j} \operatorname{cosec}\left(\frac{\pi}{2n}\left(2j + 1\right) \right) \end{equation}
Edit - Realised that $2n - 1$ should be $n - 1$
Extra Addition:
Using the same method as above an by letting \begin{equation} S_n(x) = \sin^{2n}(x) + \cos^{2n}(x) \end{equation}
It becomes rather easy to solve:
\begin{equation} I_{n,m} = \int_0^{\frac{\pi}{2}} \frac{S_n(x)}{S_m(x)}\:dx \end{equation}
Where $n \lt m$. After applying the double angle formulas, $u$-substitution, and half tangent formula we arrive at:
\begin{equation} I_{n,m} = \int_0^{\infty} \frac{S_n(x)}{S_m(x)}\:dx = \int_0^{\infty} \frac{t^{2n} + 1}{t^{2m} + 1} \left[1 + t^2 \right]^{m - n - 1}\:dt \end{equation}
Applying the Binomial Expansion:
\begin{align} I_{n,m} &= \sum_{j = 0}^{n - 1} {m - n - 1 \choose j} \int_0^{\infty} \frac{t^{2n} + 1}{t^{2m} + 1} \cdot t^{2j}\:dt \\ &= \sum_{j = 0}^{n - 1} {m - n - 1 \choose j} \int_0^{\infty} \frac{t^{2\left(n + j\right)} }{t^{2m} + 1} \:dt + \sum_{j = 0}^{n - 1} {m - n - 1 \choose j} \int_0^{\infty} \frac{t^{2j} }{t^{2m} + 1} \:dt\\ \end{align}
Again applying another of my solutions (referenced above) we arrive at:
\begin{align} I_{n,m} &= \sum_{j = 0}^{n - 1} {m - n - 1 \choose j} \frac{\pi}{2m}\operatorname{cosec}\left(\frac{\pi}{2m}\left(2\left(n + j\right) + 1\right) \right) + \sum_{j = 0}^{n - 1} {m - n - 1 \choose j}\frac{\pi}{2m}\operatorname{cosec}\left(\frac{\pi}{2m}\left(2j + 1\right) \right) \\ &= \frac{\pi}{2m}\sum_{j = 0}^{n - 1} {m - n - 1 \choose j}\left[\operatorname{cosec}\left(\frac{\pi}{2m}\left(2\left(n + j\right) + 1\right) \right) + \operatorname{cosec}\left(\frac{\pi}{2m}\left(2j + 1\right) \right) \right] \end{align}
Note: Using the same method we can easily solve
\begin{equation} I_{n,p} = \int_0^{\frac{\pi}{2}}\frac{1}{\left(\sin^{2n}(x) + \cos^{2n}(x) \right)^p}\:dx = \frac{1}{2n\Gamma(p)}\sum_{m = 0}^{np - 1} {np - 1 \choose m}\Gamma\left(p - \frac{2m + 1}{2n}\right)\Gamma\left(\frac{2m + 1}{2n}\right) \end{equation} Where $p \in \mathbb{N}$