I came across an exercise in a textbook that says to show that $$ \int_{-1}^{1} \frac{(1+x)^{2m-1}(1-x)^{2n-1}}{(1+x^{2})^{m+n}} \, dx = 2^{m+n-2} B(m,n), \ (m,n >0),$$ and then deduce that $$ \int_{-\frac{\pi}{4}}^{\frac{\pi}{4}} \Big( \frac{\cos x + \sin x}{\cos x - \sin x} \Big)^{\cos \alpha} \, dx = \frac{\pi}{2 \sin \left( \pi \cos^{2} \frac{\alpha}{2}\right)}, $$ where $\alpha$ is not a multiple of $\pi$.
(Considering that $m$ and $n$ aren't necessarily integers here, using them for the parameters is perhaps a bit unconventional.)
I managed to figure out the second part of the exercise (which I'll show below), but not the first part.
I assume that with the right substitution, one can show that $$\int_{-1}^{1} \frac{(1+x)^{2m-1}(1-x)^{2n-1}}{(1+x^{2})^{m+n}} \, dx = 2^{m+n-2} \int_{0}^{1} u^{m-1} (1-u)^{n-1} \, du. $$
$$ \begin{align} \int_{-1}^{1} \frac{(1+x)^{2m-1}(1-x)^{2n-1}}{(1+x^{2})^{m+n}} \, dx &= \int_{-\frac{\pi}{4}}^{\frac{\pi}{4}} \frac{(1 + \tan u)^{2m-1}(1-\tan u)^{2n-1}}{\sec^{2(m+n)} (u)} \, \sec^{2} (u) \, du \\ &= \int_{-\frac{\pi}{4}}^{\frac{\pi}{4}} (\cos u + \sin u)^{2m-1}(\cos u - \sin u)^{2n-1} \ du \end{align}$$
If we then let $\displaystyle m = \frac{1 + \cos \alpha}{2}$ and $\displaystyle n= \frac{1- \cos \alpha}{2}$, we get
$$ \begin{align} \int_{-\frac{\pi}{4}}^{\frac{\pi}{4}} \Big( \frac{\cos x + \sin x}{\cos x - \sin x} \Big)^{\cos \alpha} \, dx &= \frac{1}{2} \frac{\Gamma \left(\frac{1 + \cos \alpha}{2} \right) \Gamma \left(\frac{1 - \cos \alpha}{2} \right)}{\Gamma (1)} \\ &= \frac{1}{2} \, \Gamma \left(\frac{1 + \cos \alpha}{2} \right) \Gamma \left( 1- \frac{ 1 + \cos \alpha}{2} \right) \\ &= \frac{1}{2} \, \frac{\pi}{\sin \, \left( \pi \frac{1+\cos \alpha}{2} \right)} \\ &= \frac{\pi}{2 \sin \left( \pi \cos^{2} \frac{\alpha}{2}\right)} . \end{align}$$
Let's prove the first part, you need change the variables.