Can every indefinite integral of a discontinuous function be written in a way that "proves" something false? 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.
 A: Indefinite integral of f is a set of all such functions F that $F'=f$. They all different by additive constant. And indeed sets $\{F: F'=\frac{1}{x}\}$ and $\{F + 1: F'=\frac{1}{x}\}$ are same.
A: It just occurred to me that none of the answers here, although they critique the “proof” and the "reasoning" given for why the proof is wrong, really answer the question as stated in the title: which is can we get a flawed “proof” from a function with integration no matter what the function? The “discontinuity” requirement has been shown to be superfluous, but the question I mention remains and is itself legitimate. So for a general function, can we rewrite its integral in such a way as to “prove” something false, using valid transformations of integrals but then a final fallacious (but seemingly "sensible") step?
While a thorough investigation of all integration techniques would seem to be difficult, we can investigate integration by parts. The integration by parts formula is
$$\int u\ dv = uv\ – \int v\ du$$
To get a fallacy of the form shown in the original post, we need that
$$\int u\ dv = -\int v\ du$$
which implies
$$u\ dv = -v\ du$$
or
$$u = -v \frac{du}{dv}$$
which is a differential equation for $u$ with solution $u = K/v$, where $K$ is a constant. Note that in the given example, $u = 1/x$, $dv = dx$, $v = x$, $du = -\frac{1}{x^2} dx$. Note that $1/v = 1/x = u$, so with $K = 1$ the condition is satisfied. Also, note that $uv = K$.
So for the case of integration by parts, any integrand $u dv$ where $u$ is a constant times the reciprocal of $v$ will work. We can take $u = x^2 + 1$, so that $v = \frac{1}{x^2 + 1}$, then $dv = -\frac{2x}{(x^2 + 1)^2} dx$, so the function to integrate is $-\frac{2x}{x^2 + 1}$. If you integrate that with $u = x^2 + 1$ and $dv = -\frac{2x}{(x^2 + 1)^2}$, you can get another fallacy of the form shown in the post.
Indeed, this shows that the answer to the question is in fact yes: Just write the function (“times” $dx$) as a product $u dv$ where $uv = K$. The condition $uv = K$ implies $u'v + uv' = 0$, or $v' = -\frac{u'}{u} v = -\frac{u'}{u} \frac{K}{u} = -K\frac{u'}{u^2}$. Thus $uv' = u \frac{dv}{dx} = -K \frac{u'}{u}$. Setting this equal to an arbitrary function $f$ gives $u(x) =  Le^{\int -f(x)/K\ dx}$, $L$ another arbitrary constant. Now you have $u$ and $dv$ for any function you want and can "prove" something false from it.
A: 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.
A: alexqwx's answer is wrong. Brad's is notationally confusing because it pretends the "$1$" is a nonzero constant when it's not.
There is no actual "$1$" after the integration by parts. It's easy to see if you pretend there are integration bounds:
$$\int_a^b \frac1x dx =\int_a^b 1\cdot \frac1x dx=\left[x\frac1x\right]_a^b+\int_a^b x \frac1{x^2} dx = \left[1\right]_a^b + \int_a^b \frac1x dx$$
No matter what bounds you pick, $\left[1\right]_a^b = 0$. So integration by parts just gives
$$\int \frac1x dx = \int \frac1x dx$$
We don't need to worry about whether subtracting indefinite integrals is okay.
A: What you showed is that if $F$ is a primitive of $x\mapsto\frac1x$ (on some interval where the latter is defined, in other words that does not contain$~0$), then so is $x\mapsto1+F(x)$. This is true, since the derivative of $x\mapsto 1$ is $x\mapsto 0$.
A: $\int \frac{1}{x}dx=1+\int \frac{1}{x}dx \color{red}{+C}$ (you forgot the constant of integration).
Then we have that $C=-1$, which is fine.
