I want to find the integral
$$\int\frac{x}{2x-2}dx$$
This is just a simple question from my textbook. But there seems to be two ways of solving it.
If I simplify it to:
$$\int1+\frac{2}{2x-2}dx$$
I can then either just integrate that and end up with this: (which is the answer in my textbook)
$$\frac{x+ln|2x-2|}{2}+C$$
Or I can simplify $\frac{2}{2x-2}$ to $\frac{1}{x-1}$ and then integrate, ending up with:
$$\frac{x+ln|x-1|}{2}+C$$
I'm not sure if you one of these methods is wrong. Or if I've made a mistake somewhere.