help solving an integral $\int\left(\frac {x-1}{3-x}\right)^\frac{1}{2} dx$ $\displaystyle\int \left(\frac {x-1}{3-x}\right)^\frac{1}{2}\,\rm dx$
I am stuck on this part:
Let $u=\dfrac{x-1}{3-x}~\longrightarrow$  $~~\rm du=\dfrac {2}{(x-3)^2}\,\rm dx,$ which can be represented as
$\rm du=\dfrac{1}{3-x} - \dfrac{1-x}{(3-x)^2}\,\rm dx$
I cannot "see" how to get to this $2$ $\displaystyle\int \: \frac{(u)^\frac{1}{2}}{(u+1)^2} \:\rm dx$
after this part I know how to solve it;
I just wish someone would show me "step by step" this part 
It seems it involves some sort of "leap" of thought; or is there a systematic way doing this using basic algebra?
Thanks.
 A: First note
$$
du=\frac{2}{(x-3)^2}dx
$$
which implies 
$$
\frac{(x-3)^2}{2}du=dx.
$$
Also, 
$$
u+1=\frac{x-1}{3-x}+\frac{3-x}{3-x}=\frac{2}{3-x}
$$
which implies
$$
(u+1)^2=\left(\frac{2}{3-x}\right)^2=\frac{4}{(x-3)^2}.
$$
Putting it together you have
$$
\int \left(\frac {x-1}{3-x}\right)^\frac{1}{2} dx = \int u^{1/2}\cdot\frac{(x-3)^2}{2}du = 2\int u^{1/2}\cdot\frac{(x-3)^2}{4}du
= 2\int \frac{u^{1/2}}{(u+1)^2}du.
$$
A: You probably reached this point after inserting u:
$\int u^\frac{1}{2} \frac{(x-3)^2}{2}du$
The leap of thought you would need here is to realize that the remaining x must be substituted by u and so what you want to find is a function which in terms of u can replace x, in this case we can go for $(x-3)$.
$x-3 = f(u)$
A trial and error approach would be to inspect $u$ and see that (as you realized) $u$ can be written as: $u = -1 + \frac{2}{3-x}$, here we already see the term $3-x$ so we just need to manipulate the equation to let $x-3$ be on one side. step by step:
$u+1 = \frac{2}{3-x}$
$\frac{2}{u+1} = 3-x$
$-\frac{2}{u+1} = x-3$
I.e. $f(u) = -\frac{2}{u+1}$
Now we can substitute $(x-3)$ with $-\frac{2}{u+1}$ in the integral to get  $2$ $\int \frac{(u)^\frac{1}{2}}{(u+1)^2}dx$
A: Notice the $u+1$ in the denominator. What is $u+1$ in terms of $x$? In particular, what is $\frac{1}{(u+1)^2}$?
A: You can write the fraction as $\frac{(x-1)^{1/2}}{(3-x)^{1/2}}$. Then put $3-x =t$. So you have $dt= -dx$ and $x-1 =3-t-1=2-t$. So you have to now evaluate the integral $$\int \sqrt{ \frac{2-t}{t}}\ -\rm{dt}$$ which can be evaluated by sing the subsitution $t = 2 \cos^{2}{v}$.
A: You only came unstuck at the point where you needed to set $\text{d}x$ equal to
$\frac{(3-x)^2}{2} \text{d}u,$ an equality you already had. So your problem reduces to expressing $3-x$ in terms of $u.$
From your expression for $u$ you have $u(3-x)=x-1,$ and adding $3-x$ to both sides gives
$(3-x)(u+1)=2$ and hence $3-x=2/(1+u).$
The sure, but slightly longer approach, is to solve $u(3-x)=x-1$ for $x$ and subtract from $3.$
A: The integrand is so seductively pointing to the use of complex variables which reduces it to a trivial problem. Beware we have a pole within a branch cut!
