Question:
$$\int\frac{dx}{\sqrt{(x-a)(b-x)}}$$
Doubt:
I took take $x=a\cos^2\theta+b\sin^2\theta$ and solved. The final answer that I got was: $$2\sin^{-1}\sqrt{\left(\frac{x-a}{b-a}\right)}+c$$
It matched the answer at the back of my book :)
I was thinking of another way in which I opened the brackets and got a quadratic equation. I then converted it into perfect square to get this form: $$\int\frac{dx}{\sqrt{a^2-x^2}}=\sin^{-1}\left(\frac{x}{a}\right)+c$$ where $x$ was $x-(\frac{a+b}{2})$ and $a$ was $\frac{(a-b)}{2}$.
With this, I got the final answer which was different from the previous one.
Kindly tell what was wrong with the other method?
Basically, we have, $$2 \arcsin \sqrt {\frac {x-a}{b-a}} = \arcsin ( 2 \sqrt {\frac {x-a}{b-a}} \sqrt {1- \frac {x-a}{b-a}}) =\arcsin (2\sqrt {\frac {(x-a)(b-x)}{(b-a)^2}})$$ (using $\arcsin A +\arcsin B =\arcsin (A\sqrt {1-B^2} +B\sqrt {1-A^2})$)
Can you take it from here?
On a side note, $a $ is $\frac {a-b}{2} $ and not $(\frac {a-b}{2})^2$.