I just saw the following fake proof.
$$\int \frac1x dx =\int 1\cdot \frac1x dx=x\frac1x+\int x \frac1{x^2} dx = 1+ \int \frac1x dx$$
Which would imply $1=0$, hence the fake proof tag.
The explanation given was that there was a discontinuity in the function that we were in essence "integrating over", however the integral is indefinite so we are not explicitly integrating over anything (or maybe integrating over everything?).
Will any function with a discontinuity be exploitable in this way? Could we actually solve the problem by converting the integral to a definite integral in a region there is no discontinuity? I think the trick used would still work, or am not sure why it would provide a result that make sense.
I disagree with alexqwx. His answer is misleading. There is no constant of integration generated in integration by parts until integration actually occurs. The above answer also does not mention that the fallacy occurs when subtracting indefinite integrals not because of a lack of a constant of integration.
There is no reason to write $\int \frac{1}{x}dx=1+\int \frac{1}{x}dx +C$. The error is in assuming $\int \! f\, dx - \int\! f\, dx = 0$ when, in reality, $\int \! f\, dx - \int\! f\, dx = \int \! 0 \, dx = C.$
There is nothing wrong with the statement of $$\int \frac1x dx =1+ \int \frac1x dx,$$
only the conclusion obtained from it. It is just a proof that $1$ is constant. If you decide at this point to add bounds to your integral you find
$$\int_a^b \frac1x dx =1_a^b+ \int_a^b \frac1x dx$$
$$\int_a^b \frac1x dx = \int_a^b \frac1x dx$$
Because $1_a^b = 1 - 1 = 0$.
Again:
$$\int \frac1x dx =1+ \int \frac1x dx$$
$$\int \frac1x dx - \int \frac1x dx =1$$
$$\int \frac1x - \frac1x dx = 1$$
$$\int 0\, dx = 1 $$
$$C = 1$$
The fallacy occurs when subtracting the indefinite integrals, not with anything mentioned by alexqwx.