Context:
I have recently become interested in integrals of the form $$T(n)=\int_0^{\pi/2}\frac{dx}{1+\sin(x)^n},$$ and I conjecture that $T(n)$ has a closed form evaluation for all $n\in\Bbb Z_{\ge0}$, or at least all non-negative even integers $n$. Trivially, one has $T(0)=\pi/4$. Less trivially, there is $T(1)=1$ (easy with $t=\tan(x/2)$), and $T(2)=\frac\pi{2\sqrt{2}}$ as seen here. The integral $J=T(3)$, however, is not so easy. We see that this integral is $$3J=\int_0^{\pi/2}\frac{dx}{1+\sin x}-\int_0^{\pi/2}\frac{\sin (x)dx}{\sin(x)^2-\sin(x)+1}+2\int_0^{\pi/2}\frac{dx}{\sin(x)^2-\sin(x)+1}.$$ The first integral is easy, and we get $$3J=1-J_1+J_2.$$ The next integral is $$J_1=\int_0^{\pi/2}\frac{\sin (x)dx}{\sin(x)^2-\sin(x)+1},$$ which is, from $t=\tan(x/2)$, $$J_1=2\int_0^1\frac{\frac{2t}{1+t^2}}{(\frac{2t}{1+t^2})^2-\frac{2t}{1+t^2}+1}\frac{dt}{1+t^2},$$ which is the awful $$J_1=4\int_0^1\frac{tdt}{t^4-2t^3+6t^2-2t+1}.$$ I found that nothing but brute force could tackle this integral, so I used partial fractions and got $$J_1=4\sum_{a\in A}\frac{1}{f'(a)}\left(1+a\log(1-a)-a\log(-a)\right)$$ where $$A=\left\{\frac12\left(1+p_1i\sqrt3+p_2\sqrt{-6+2p_3i\sqrt3}\right):p_1,p_2,p_3\in\{-1,1\}\right\}$$ is the set of roots of the polynomial $f(z)=z^4-2z^3+6z^2-2z+1,$ and $\log(z)$ is the complex logarithm.
However, the remaining integral is a little worse. We have from the substitution $t=\tan(x/2)$ the awful $$J_2=4\int_0^1\frac{1+t^2}{1-2t+5t^2-2t^3}dt.$$ We can do the same sort of trick here as with the last integral and get $$J_2=4\sum_{b\in B}\frac1{g'(b)}\int_0^1\frac{t^2+1}{t-b}dt$$ where $$B=\{z\in\Bbb C: 1-2z+5z^2-2z^3=0\}$$ is the set of roots of the polynomial $g(z)=1-2z+5z^2-2z^3$. These roots do indeed have explicit evaluations. The integral in the summation is easy enough to calculate, but I'm not going to, as we already see that the integral has a closed form.
Next up, Wolfram evaluates $$T(4)=\int_0^1\frac{dx}{1+\sin(x)^4}=\frac\pi4\sqrt{1+\sqrt2},$$ as well as $$T(6)=\int_0^{\pi/2}\frac{dx}{1+\sin(x)^6}=\frac{\pi}{12}(\sqrt{2}+2\sqrt{3}),$$ which is here.
In fact, we may evaluate $T(2n)$ in terms of hypergeometric functions, which may have a general closed form. We do so by noting that $$\frac{1}{1+\sin(x)^{2n}}=\sum_{k\ge0}(-1)^k\sin(x)^{2nk}$$ so that $$T(2n)=\sum_{k\ge0}(-1)^k\int_0^{\pi/2}\sin(x)^{2nk}dx=\frac{\sqrt\pi}{2}\sum_{k\ge0}(-1)^k\frac{\Gamma(nk+\tfrac12)}{(nk)!}.$$ This is $$T(2n)=\frac\pi2\,_{n}F_{n-1}\left(1-\tfrac{1}{2n},A_n;B_n;-1\right)$$ where $$\begin{align} A_n&=\left\{\frac{2r+1}{2n}:0\le r\in\Bbb Z\le n-2\right\}\\ B_n&=\left\{\frac{r}{n}:1\le r\in\Bbb Z\le n-1\right\}. \end{align}$$ Whether or not this hypergeometric has a closed form I am unsure, but it looks simple enough to be evaluated exactly.
Questions:
Can $T(n)$ be computed in closed form of all $n$? If not, when can it be computed in closed form?
And at the very least, what is $T(5)$? It seems to be very nasty.
Thanks!