How to solve the integral $\int\frac{x-1}{\sqrt{ x^2-2x}}dx $ How to calculate  $$\int\frac{x-1}{\sqrt{ x^2-2x}}dx $$

I have no idea how to calculate it. Please help.
$$t=x^2-2x$$
$$dt=2x-2dx$$
$$dx=\frac{dt}{2(x-1)}$$
$$\int\frac{x-1}{\sqrt{x^2-2x}}dx=\int\frac{1}{2}\frac{1}{t}dt=\frac{1}{2}\int t^{\frac{-1}{2}}=\frac{1}{2}2t^{\frac{1}{2}} +C = \sqrt{x^2-2x}+C$$
we have,

$$I=\int \frac{x-1}{\sqrt(x^2 -2x)}dx----------(1)
    $$

put ,              $$ (x^2 -2x)=t $$
                      on differentiating, we get,    $$ 2xdx-2dx=dt$$

$$2dx(x-1)=dt$$
$$dx(x-1)=\frac{dt}{2}$$
substitute on equation (1) we get,

$$I=\int \frac{\frac{1}{2}dt}{\sqrt(t)} $$

$$I=1/2 \int t^-(\frac{1}{2}) dt $$

$$I=1/2 \frac{t^(-\frac{1}{2} +1)}{(-\frac{1}{2} +1)} + C $$

$$I=\frac{1}{2} \frac{t^\frac{1}{2}}{\frac{1}{2}} + C$$

now substitute the value of t,

$$I=\sqrt(x^2-2x) + C-------(2)$$

equation (2) is the required integration of equation (1)