I need to solve:
$$\int\sqrt{\frac{x-3}{2-x}}~{\rm d}x$$
What I did is:
Substitute: $x=2\cos^2 \theta + 3\sin^2 \theta$. Now:
$$\begin{align} x &= 2 - 2\sin^2 \theta + 3 \sin^2 \theta \\ x &= 2+ \sin^2 \theta \\ \sin \theta &= \sqrt{x-2} \\ \theta &=\sin^{-1}\sqrt{x-2} \end{align}$$
and, $ cos \theta = \sqrt{(3-x)} $
$ \theta=\cos^{-1}\sqrt{(3-x)}$
The integral becomes:
$$\begin{align} &= \int{\sqrt[]{\frac{2\cos^2 \theta + 3\sin^2 \theta-3}{2-2\cos^2 \theta - 3\sin^2 \theta}} ~~(2 \cos \theta\sin\theta)}~{\rm d}{\theta}\\ % &= \int{\sqrt[]{\frac{2\cos^2 \theta + 3(\sin^2 \theta-1)}{2(1-\cos^2 \theta) - 3\sin^2 \theta}}~~(2 \cos \theta\sin\theta)}~{\rm d}{\theta} \\ % &= \int\sqrt[]{\frac{2\cos^2 \theta - 3\cos^2 \theta}{2\sin^2 \theta - 3\sin^2 \theta}}~~(2 \cos \theta\sin\theta) ~{\rm d}\theta \\ % &= \int\sqrt[]{\frac{-\cos^2 \theta }{- \sin^2 \theta}}~~(2 \cos \theta\sin\theta) ~{\rm d}\theta \\ % &= \int \frac{\cos \theta}{\sin\theta}~~(2 \cos \theta\sin\theta)~{\rm d}\theta \\ % &= \int 2\cos^2 \theta~{\rm d}\theta \\ % &= \int (1- \sin 2\theta)~{\rm d}\theta \\ % &= \theta - \frac {\cos 2\theta}{2} + c \\ % &= \sin^{-1}\sqrt{x-2} - \frac {\cos 2(\sin^{-1}\sqrt{x-2})}{2} + c \end{align}$$
But, The right answer is :
$$\sqrt{\frac{3-x}{x-2}} - \sin^{-1}\sqrt{3-x} + c $$
Where am I doing it wrong?
How do I get it to the correct answer??
UPDATE:
I am so sorry I wrote:
= $\int 2\cos^2 \theta .d\theta$
= $\int (1- \sin 2\theta) .d\theta$
It should be:
= $\int 2\cos^2 \theta .d\theta$
= $\int (1+ \cos2\theta) .d\theta$
= $ \theta + \frac{\sin 2\theta}{2} +c$
What do I do next??
UPDATE 2:
= $ \theta + \sin \theta \cos\theta +c$
= $ \theta + \sin \sin^{-1}\sqrt{(x-2)}. \cos\cos^{-1}\sqrt{(3-x)}+c$
= $ \sin^{-1}\sqrt{(x-2)}+ \sqrt{(x-2)}.\sqrt{(3-x)}+c$
Is this the right answer or I have done something wrong?