I need to compute the following integral: $$\int \frac{dx}{(x-1)\sqrt{2x^2-2x+1}}$$
My try:
I saw that the derivative of $\sqrt{2x^2-2x+1}$ is $\frac{2 x - 1}{\sqrt{2 x^2 - 2 x + 1}}$, so I used $u=\sqrt{2x^2-2x+1}$, $du=\frac{2 x - 1}{\sqrt{2 x^2 - 2 x + 1}} dx$. Then the integral is: $$\int \frac{du}{(x-1)(2x-1)} = \int \frac{du}{2x^2-3x+1} $$
So my try doesn't work (I thought I would get $u^2$ or something like that in the denominator, but I'm off by $x$)
Any hints are appreciated.
As $2x^2-2x+1=\dfrac{(2x-1)^2+1^2}2$
using Trigonometric substitution, $2x-1=\tan t$ where $-\dfrac\pi2\le t\le\dfrac\pi2$
$$\int\dfrac{dx}{(x-1)\sqrt{2x^2-2x+1}}=\sqrt2\int\dfrac{\sec^2t\ dt}{(\tan t-1)\sec t}=\sqrt2\int\dfrac{dt}{\sin t-\cos t} =\int\dfrac{dt}{\sin\left(t-\dfrac\pi4\right)}$$