How to integrate $\frac{dx}{(x-p)\sqrt {(x-p)(x-q)}} $? How to integrate $\frac{dx}{(x-p)\sqrt {(x-p)(x-q)}} $ ? 
I tried substituting $x=1/t$ but that's making it more complicated. Any suggestions?
 A: Hint. By the change of variable
$$
u=\sqrt{\frac{x-q}{x-p}},\qquad du=-\frac{(p-q)}2\cdot \frac{dx}{(x-p)\sqrt {(x-p)(x-q)}} 
$$ one deduces

$$
\int\frac{dx}{(x-p)\sqrt {(x-p)(x-q)}} =-\frac2{(p-q)} \int du=-\frac2{(p-q)} \sqrt{\frac{x-q}{x-p}}+C.
$$

A: An excellent approach would be to substitute $(x-p)=1/t $.Most of the terms can be cancelled out after that.Next using the integration formula for $x^n$ i.e  $(x^{n+1})/(n+1) $ is sufficient to reach final answer !
A: This question is all about substitution. By using $(x-p)(x-q)=(x-\frac{p+q}{2})^2-(\frac{p-q}{2})^2$. Now substitute $x-\frac{p+q}{2}=\frac{p-q}{2}sec(t)$. So $x-p=\frac{p-q}{2}(sec(t)-1)$. Now integral will become
$$I=\int \frac{\frac{(p-q)}{2}sec(t)tan(t)dt}{\frac{p-q}{2}(sec(t)-1)|\frac{p-q}{2}|tan(t)}=\int \frac{2dt}{|p-q|(1-cos(t))}$$ So $I$ will be equal to
$$I=-\frac{2cot(\frac{t}{2})}{|p-q|}$$ Put the value of $t$ and get integral in terms of $x$
A: $\newcommand{\angles}[1]{\left\langle\,{#1}\,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\Li}[1]{\,\mathrm{Li}_{#1}}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

With the Euler Substitution:
  $$
t = \root{\pars{x - p}\pars{x - q}} - x\quad\imp\quad
x = {pq - t^{2} \over p + q + 2t}
$$

\begin{align}
&\color{#f00}{\int{\dd x \over \pars{x - p}\root{\pars{x - p}\pars{x - q}}}} =
\int{2\,\dd t \over \pars{p + t}^{2}} = -\,{2 \over p + t} =
-\,{2 \over p + \root{\pars{x - p}\pars{x - q}} - x}
\\[4mm] = &\
-2\,{\root{\pars{x - p}\pars{x - q}} + x - p \over
\pars{x - p}\pars{x - q} - \pars{x - p}^{2}} =
\color{#f00}{%
{2 \over q - p}\,{\root{\pars{x - p}\pars{x - q}} + x - p \over x - p}} +
\pars{~\mbox{a constant}~}
\end{align}
