# Intergral of x/(2x-2) - Two different answers, which one is correct? [duplicate]

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.

• Maybe you should call your constants $C_1$ and $C_2$. :-) (I've often thought that it is exactly this kind of conundrum that really drives home what "plus a constant" means.) – Brian Tung Aug 19 '20 at 5:38

Both are correct. $$\ln |2x-2|=\ln 2+\ln |x-1|$$ and you can absorb $$(\ln 2) /2$$ into the constant.
I am not sure that the fraction simplifies as you say (check that again). But the fact that the two results are equivalent derives from $$\ln(2x-2)=\ln(2\cdot(x-1))=\ln(2)+\ln(x-1),$$ So that the $$2$$ gets put into the constant $$C$$.