How to solve this indefinite integral using integral substitution? So while working on some physics problem for differential equations,  I landed at this weird integral $$ \int \frac 1 {\sqrt{1-\left(\frac 2x\right)}}\,dx $$
So since there is a square root, I thought I could use trig substitution, but I couldn't find anything that works out. How can one solve this integral in a nice simple manner? If you can solve it in a different way, it is still fine. $Thank$ $you!$
This is the answer given to me by symbolab $$ 4\left(-\frac{1}{4\left(\sqrt{1-\frac{2}{x}}-1\right)}-\frac{1}{4\left(\sqrt{1-\frac{2}{x}}+1\right)}-\frac{1}{4}\ln \left|\sqrt{1-\frac{2}{x}}-1\right|+\frac{1}{4}\ln \left|\sqrt{1-\frac{2}{x}}+1\right|\right)+C $$

Some hints
First of all, simple, thing, just rewrite the integrand this way
$$\frac{1}{\sqrt{\frac{x-2}{x}}}$$
Then substitute
$$y = \frac{x-2}{x} ~~~~~~~ \text{d}y = \frac{1}{x} - \frac{x-2}{x^2}\ \text{d}x$$
You're now with
$$2\int \frac{1}{(1 + y^2)\sqrt{y}}\ \text{d}y$$
And for this one, use
$$z = \sqrt{y} ~~~~~~~ \text{d}z = \frac{1}{2\sqrt{y}}\ \text{d}y$$
and your integral is now:
$$4\int \frac{1}{(1 - z^2)^2}\ \text{d}z$$
which is easily solvable by partial fractions:
$$\frac{1}{(1 - s^2)^2} = \frac{1}{4(z+1)} + \frac{1}{4(z+1)^2} - \frac{1}{4(z-1)} + \frac{1}{4(z-1)^2}$$
Split and do the easy integrals.
Final Result
$$x\sqrt{\frac{x-2}{x}} - \ln\left(\sqrt{\frac{x-2}{x}} - 1\right) + \ln\left(\sqrt{\frac{x-2}{x}} + 1\right) + C$$
