<s>[INST] Integrate $\int_0^{\pi/2} \frac{1}{1+\tan^\alpha{x}}\,\mathrm{d}x$ Evaluate the integral $$\int_0^{\pi/2} \frac{1}{1+\tan^\alpha{x}}\,\mathrm{d}x$$
 [/INST] The answer given by Gordon is very good for computing the integral.
But it does not provide much why it works. The following figure might help with that

This is the integral for $\alpha=\sqrt{2}$. It looks as if the area under the function
is exactly half of the dashed rectangle... A good guess is therefore
$$ 
    \int_0^{\pi/2} \frac{\mathrm{d}x}{1 + \tan(x)^\sqrt{2}} = \frac{1}{2}\left(\frac{\pi}{2}\right)
$$
This striking symmetry can be shown true for any choice of $\alpha$, play around in geogebra or any ploting tool you fancy =)
The symmetry of such integrals is studied further in the paper
Symmetri and Integration by Roger Nielsen
Where it is shown that if $f(x) + f(a+b-x)$ is constant for all $x\in[a,b]$ - meaning it has this nice symmetric property.
Then the area can calculated as
$$
   \int_a^b f(x) \mathrm{d}x = \frac{f(a)+f(b)}{2}(b-a) = f\left(\frac{a+b}{2}\right)(b-a)\,.
$$
I will leave it to you to check that $f(x)+f(a+b-x)$ is constant. 
Alternatively the integral can also be computed as follows
\begin{align*}
   \int_0^{\pi/2} \frac{\mathrm{d}\theta}{(1 + (\tan \theta)^b}
 = \int_0^\infty \frac{\mathrm{d}x}{(1+x^2)(1+x^b)} 
 = \frac{1}{2} \int_0^\infty \frac{\mathrm{d}x}{1 + x^2} 
 = \frac{\pi}{4}
\end{align*}
Where the substitution $u \mapsto \tan \theta$ was used and that 
$$
\int_0^\infty \frac{R(x)}{x^b+1}\mathrm{d}x = \frac{1}{2} \int_0^\infty R(x)\,\mathrm{d}x
$$
Given that $R(x) = R(1/x)/x^2$, again check that this holds for $1/(1+x^2)$. A proof of the latter can be found on page $27$ here, section 1.9. More directly one has by the same methods
\begin{align*}
   \int_0^\infty \frac{\mathrm{d}x}{(1+x^2)(1+x^b)}
 & = \int_0^1 \frac{\mathrm{d}x}{(1+x^2)(1+x^b)} +
          \int_1^\infty \frac{\mathrm{d}x}{(1+x^2)(1+x^b)} \\
 & = \int_0^1 \frac{1}{(1+x^2)(1+x^b)} + 
                        \frac{x^b}{(1+x^2)(1+x^b)} \mathrm{d}x \\
        & = \int_0^1 \frac{\mathrm{d}x}{1+x^2}
   = \frac{1}{2} \int_0^\infty \frac{\mathrm{d}x}{1+x^2}
          = \frac{\pi}{4}
\end{align*}
Where the substitution $x \mapsto 1/x$ was used in the last integral.
These theorems and ideas are not the simplest way to attack the problem. But it might give you some broader insight further down the road.
</s>