Integrate $\int \frac{dx}{\sqrt{(x-a)(b-x)}}$ 
Integrate $\int \frac{dx}{\sqrt{(x-a)(b-x)}}$ where $b>a$

My Attempt
$$
\begin{align}
&\int \frac{1}{\sqrt{(x-a)(b-x)}}dx=\int\frac{dx}{\sqrt{-x^2+(a+b)x-ab}}\\
&=\int\frac{dx}{\sqrt{-(x^2-2.\frac{a+b}{2}x+ab+\frac{(a+b)^2}{4}-\frac{(a+b)^2}{4})}}\\
&=\int\frac{dx}{\sqrt{\frac{a^2+b^2+2ab}{4}-ab-\big[x-\frac{a+b}{2}\big]^2}}=\int\frac{dx}{\sqrt{\frac{(a-b)^2}{4}-\big(x-\frac{a+b}{2}\big)^2}}\\
&=\sin^{-1}\frac{x-\frac{a+b}{2}}{\frac{b-a}{2}}+C\color{red}{=\sin^{-1}\frac{2x-(a+b)}{b-a}+C}
\end{align}
$$
My reference shows the solution $I=2\sin^{-1}\sqrt{\frac{x-a}{b-a}}$, yet why am I getting a different solution or both the same ?
Thanx@lab bhattacharjee for the hint.
$$
\begin{align}
\sin^{-1}\frac{2x-(a+b)}{b-a}+C&=\frac{\pi}{2}-\cos^{-1}\frac{2x-(a+b)}{b-a}+C\\&=\frac{\pi}{2}-\pi+\cos^{-1}\frac{(a+b)-2x}{b-a}+C_1\\
&=\cos^{-1}\frac{(a+b)-2x}{b-a}+C_2
\end{align}
$$
Let,
$$
y=\cos^{-1}\frac{(a+b)-2x}{b-a}\implies\cos y=\frac{(a+b)-2x}{b-a}\\
2\sin^2\frac{y}{2}=1-\cos y=1-\frac{(a+b)-2x}{b-a}=\frac{b-a-a-b+2x}{b-a}=\frac{2x-2a}{b-a}\\
\sin^2\frac{y}{2}=\frac{x-a}{b-a}\implies \sin\frac{y}{2}=\sqrt{\frac{x-a}{b-a}}\\
\frac{y}{2}=\sin^{-1}\sqrt{\frac{x-a}{b-a}}\implies\boxed{y=2\sin^{-1}\sqrt{\frac{x-a}{b-a}}}
$$

Use the Euler substition $$\sqrt{(x-a)(x-b)}=(x-a)t$$ Then is $$x=\frac{at^2+b}{1+t^2}$$ and then is $$dx=\frac{2(a-b)t}{(1+t^2)^2}dt$$
