How do I integrate: $\int\sqrt{\frac{x-3}{2-x}} dx$? 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?
 A: Hint:
For solving the integral, notice that 
$$t^2 = \frac{x-3}{2-x} \Rightarrow dx = -\frac{2t}{(t^2+1)^2}dt.$$ Hence,
$$\int \sqrt{\frac{x-3}{2-x}}dx = -2\int\frac{t^2}{(t^2+1)^2}dt. $$
A: 
$$I=\int\sqrt{\frac{x-3}{2-x}}~{\rm d}x$$

Integrating
Let $x=2\cos^2t+3\sin^2t$, $dx=\sin2tdt$
$$I=\int\sqrt{\frac{-\cos^2t}{-\sin^2t}}\sin2tdt=\int2\cos^2tdt=\int(1+\cos2t)dt=t+\frac12\sin2t+c\\I=\underbrace{\cos^{-1}\sqrt{3-x}}_{\pi/2-\sin^{-1}\sqrt{3-x}}+\sqrt{x-2}\sqrt{3-x}+c\\I=\underbrace{\sqrt{x-2}\sqrt{3-x}}_{\sqrt{5x-x^2-6}}-\sin^{-1}{\sqrt{3-x}}+c'$$
Differentiating back
$$I'=\frac1{2\sqrt{(x-2)(3-x)}}\cdot(5-2x)-\underbrace{\frac1{\sqrt{1-(\sqrt{3-x})^2}}}_{\sqrt{x-2}}\cdot\frac1{2\sqrt{3-x}}(-1)\\I'=\frac{2(3-x)}{2\sqrt{(x-2)(3-x)}}=\sqrt{\frac{3-x}{x-2}}=\sqrt{\frac{x-3}{2-x}}$$
A: $2(\cos x)^2=1+\cos(2x)$ but $2(\cos x)^2\neq1-\sin(2x)$ 
A: to shorten the working, since the function is only well-defined for $x \in (2,3)$ we may substitute
$$
3-x \to s
$$
giving
$$
I=\int\sqrt{\frac{x-3}{2-x}} .dx = - \int\sqrt{\frac{s}{1-s}} .ds
$$
now substitute
$$
s \to \sin^2 \theta \\
ds \to 2\sin\theta \cos\theta\cdot d\theta
$$ 
so
$$
I = -\int2\sin^2 \theta \cdot d\theta = \int (\cos 2\theta-1)\cdot d\theta=\frac12\sin2\theta-\theta+c \\
= \sqrt{s(1-s)} - \sin^{-1}s \\
=\sqrt{(3-x)(x-2)} - \sin^{-1} \sqrt{3-x} + c
$$
