Prove $ \frac1{\sqrt{(z+a)(z+b)}}=\frac1\pi \int_a^b \frac1{\sqrt{(t-a)(b-t)}}\frac1{t+z}dt $ Reading papers online i found the following definition 
$$ \frac1{\sqrt{(z+a)(z+b)}}=\frac1\pi \int_a^b \frac1{\sqrt{(t-a)(b-t)}}\frac1{t+z}dt $$
for $$ b>a \,\, and \,\,\,z \in \Bbb C |(-\infty,-a] $$
Question : How can this be proven? would the proof for this above definition be similar for another expression of type:
$$\frac{f(x)}{\sqrt{(z+a)(z+b)}}$$
Thank you kindly for your help and time. 
 A: Substitute $x= \frac1{t+z}$, along with the shorthands $p = b+z$, $q=a+z$,
\begin{align}
I &=\int_a^b \frac{1}{\sqrt{(t-a)(b-t)}}\frac{1}{t+z} dt \\
&=-\frac{1}{\sqrt{pq}}\int_{\frac1q}^{\frac1p}\frac{dx}{\sqrt{(x-\frac1p)(\frac1q-x)}}
=\frac{1}{\sqrt{pq}}\int_{\frac1q}^{\frac1p}\frac{-\frac{2pq}{p-q}dx}{\sqrt{1-\left(\frac{p+q-2pqx}{p-q}\right)^2}}\\
\end{align}
Then, let $u = \frac{p+q-2pqx}{p-q}$,
$$I =\frac{1}{\sqrt{pq}}\int_{-1}^{1}\frac{du}{\sqrt{1-u^2}}=\frac{1}{\sqrt{pq}}\sin^{-1}u|_{-1}^{1} = \frac{\pi}{\sqrt{pq}} = \frac{\pi}{\sqrt{(z+b)(z+a)}}
$$
A: Let $t = \frac{a+b}{2}+\frac{b-a}{2}\sin\theta$. Then
$$\pi I(z) = \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{d\theta}{\frac{a+b}{2}+\frac{b-a}{2}\sin\theta+z} = \int_0^\pi \frac{d\theta}{\frac{a+b}{2}+\frac{b-a}{2}\cos\theta+z}$$
Then denoting $\frac{a+b}{2}+z \equiv k_1$ and $\frac{b-a}{2} \equiv k_2$ we get that
$$\pi I(z) = \int_0^\pi \frac{d\theta}{(k_1+k_2)\cos^2\left(\frac{\theta}{2}\right)+(k_1-k_2)\sin^2\left(\frac{\theta}{2}\right)}$$
$$= \frac{2}{k_1-k_2}\int_0^{\pi}\frac{\frac{1}{2}\sec^2\left(\frac{\theta}{2}\right) \:d\theta}{\frac{k_1+k_2}{k_1-k_2}+\tan^2\left(\frac{\theta}{2}\right)} = \frac{2}{\sqrt{k_1^2-k_2^2}}\tan^{-1}\left(\tan\left(\frac{\theta}{2}\right)\sqrt{\frac{k_1+k_2}{k_1-k_2}}\right)\Biggr|_0^\pi = \frac{\pi}{\sqrt{k_1^2-k_2^2}}$$
Then plugging in for $k_1$ and $k_2$ gives us that
$$I(z) = \frac{1}{\sqrt{(k_1-k_2)(k_1+k_2)}} = \frac{1}{\sqrt{(z+a)(z+b)}}$$
