An integral involving beta function For $-1 \leq \theta \leq 1$ and $\nu > -1/2$, prove that the function 
$$
f(x; \theta,\nu) = \frac{(1-x^2)^{\nu -1/2}} {(1-2\theta x +\theta^2)^\nu B(\nu+1/2,1/2)}
$$
is a valid probability density function for $-1 \leq x \leq 1$. Here $B(.,.)$ denotes the Beta function.
My attempt: I substituted $x=\sin(\alpha)$ in the integral and it reduced to
$$
I= \frac{1}{B(\nu+1/2,1/2)}\int_{-\pi/2}^{\pi/2} \frac{\cos(\alpha)^{2 \nu}}{(1-2 \theta \sin(\alpha)+\theta^2)^\nu} d \alpha.
$$
But how do I simplify the above integral to a Beta function? Notice that the integral turns out to be independent of $\theta$.
 A: Playing with the integral, I found a solution which also proves @You're In My Eye's formula.
First, we define $\phi : [-\pi/2, \pi/2] \to \Bbb{R}$ by
$$\phi(t) = \frac{\cos^2 t}{1 - 2\theta \sin t + \theta^2}.$$
It is easy to check that $\phi$ has a unique maximum at $t_{\max} = \arcsin \theta$ with $\phi(t_{\max}) = 1$.  Thus we can uniquely define two functions $t_{\pm} : [0, 1] \to \Bbb{R}$ satisfying the following conditions
$$ -\frac{\pi}{2} \leq t_{-}(y) \leq t_{+}(y) \leq \frac{\pi}{2} \quad \text{and} \quad \phi(t_{\pm}(y)) = y, \qquad \forall y \in [0, 1]. $$
$\hspace{8em}$ 
In fact, we can find a simple formula for $t_{\pm}$. To this end, let $s_{\pm} = \sin(t_{\pm})$. Then they solve
$$ 1 - s_{\pm}^2 = y(1 - 2\theta s_{\pm} + \theta^2) \qquad \Leftrightarrow \qquad s_{\pm} = \theta y \pm \sqrt{\smash[b]{(1 - y)(1 - \theta^2 y)}}. $$
Now here comes the trickiest part: the above expression for $s_{\pm}$ can be written as follows:
$$ s_{\pm} = \sqrt{\smash[b]{1 - (1-y)}} \cdot \theta \sqrt{\smash[b]{\vphantom{1}y}} \pm \sqrt{\smash[b]{1-y}} \sqrt{\smash[b]{1 - \theta^2 y}}. $$
Thus taking arcsine to both side and taking advantage of the sine addition formula, we have
$$ t_{\pm} = \arcsin(s_{\pm}) = \arcsin(\theta\sqrt{u}) \pm \arcsin\sqrt{1-y}. $$
Now we are almost done. For any nice function $g$ on $[0, 1]$, we get
\begin{align*}
\int_{-\pi/2}^{\pi/2} g(\phi(t)) \, dt
&= \int_{0}^{1} g(y) \, d (t_{+}(y) - t_{-}(y)) \\
&= \int_{0}^{1} g(y) \, d (2\arcsin\sqrt{1-y}) \\
&= 2 \int_{0}^{\pi/2} g(\cos^2 \alpha) \, d\alpha,
\end{align*}
where the last line follow from the substitution $\alpha = \arcsin\sqrt{1-y}$. This is now equivalent to @You're In My Eye's formula and the computation is done.
A: Getting rid of everything unnecessary, we need to evaluate the following integral:
$$I( \nu, \theta) = \int_{-1}^1 \frac{(1-x^2)^{\nu -1/2}} {(1-2\theta x +\theta^2)^\nu }dx$$
We use the substitution:
$$x=-\cos \alpha$$
$$I( \nu, \theta) = \int_{0}^\pi \frac{\sin^{2\nu} \alpha} {(1+2\theta \cos \alpha +\theta^2)^\nu }d \alpha$$
There is a theorem, saying:

$$\int_{0}^\pi g \left( \frac{\sin^{2} \alpha} {1+2\theta \cos \alpha +\theta^2 } \right)d \alpha= \begin{cases} \int_{0}^\pi g \left( \sin^{2} \alpha \right)d \alpha, \quad \theta^2 < 1 \\ \int_{0}^\pi g \left( \frac{\sin^{2} \alpha}{\theta^2} \right)d \alpha, \quad \theta^2 \geq 1 \end{cases}$$

See for example Gradstein-Ryzhik 3.036. (the old edition I have has it wrong though, the values of $\theta$ are confused).
You have the first case. Thus:
$$I( \nu, \theta) = \int_{0}^\pi \sin^{2\nu} \alpha ~d \alpha=\frac{\sqrt{\pi} ~\Gamma\left(\nu+\frac{1}{2} \right)}{\Gamma\left(\nu+1 \right)}=B \left( \frac{1}{2},\nu+\frac{1}{2} \right)$$
Use the definition of the Beta function and the properties of the Gamma function to prove this.
See here for example https://en.wikipedia.org/wiki/Beta_function
