$\frac{1}{\sqrt{(x-a)(x-b)}}$
$(x-a)(x-b)$ can be written as $x^{2}-(a+b) x+a b$.
Therefore
$x^{2}-(a+b) x+a b$
$=x^{2}-(a+b) x+\frac{(a+b)^{2}}{4}-\frac{(a+b)^{2}}{4}+a b$
$=\left[x-\left(\frac{a+b}{2}\right)\right]^{2}-\frac{(a-b)^{2}}{4}$
$\Rightarrow \int \frac{1}{\sqrt{(x-a)(x-b)}} d x=\int \frac{1}{\sqrt{\left\{x-\left(\frac{a+b}{2}\right)\right\}^{2}-\left(\frac{a-b}{2}\right)^{2}}} d x$
Let $x-\left(\frac{a+b}{2}\right)=t$
$\therefore d x=d t$
$\Rightarrow \int \frac{1}{\sqrt{\left\{x-\left(\frac{a+b}{2}\right)\right\}^{2}-\left(\frac{a-b}{2}\right)^{2}}} d x=\int \frac{1}{\sqrt{t^{2}-\left(\frac{a-b}{2}\right)^{2}}} d t$
$=\log \left|t+\sqrt{t^{2}-\left(\frac{a-b}{2}\right)^{2}}\right|+\mathrm{C}$
$=\log \left|\left\{x-\left(\frac{a+b}{2}\right)\right\}+\sqrt{(x-a)(x-b)}\right|+\mathrm{C}$