1 = 0 finding the mistake I was shown the following calculation. There is clearly something wrong but I can not see the mistake. Could someone point out the wrong step or something?
$$ \int \frac{1}{x} dx = \int 1 \cdot \frac{1}{x} dx$$
Let's say $ u = \frac{1}{x}$ and $ dv = 1\ dx$.
So $ du = -\frac{1}{x^2} \ dx$ and $ v = x$.
Putting that into per partes formula:
$$ \int \frac{1}{x} dx = \int 1 \cdot \frac{1}{x} dx= x \cdot \frac{1}{x} - \int x \cdot (-\frac{1}{x^2})dx = 1 + \int \frac{1}{x} dx$$
So we can substract $\int \frac{1}{x}dx$ from both sides which then gives us
$$0 = 1$$
 A: You are forgetting the constant of integration. When you write $\int\frac1xdx$, that could represent any of a family of functions. So in this case, the left-hand $\int\frac1x dx$ represents an antiderivative of $\frac1x$ which is $1$ larger than the $\int \frac1xdx$ on the right-hand side. This also means that you cannot "subtract $\int\frac1xdx$" as easily as you might think.
The moment you put bounds on your integrals, everything changes. In that case (assuming the bounds are valid), we get
$$
\int_a^b\frac1xdx = 1\Big|_{x = a}^b + \int_a^b\frac1xdx
$$
and we see that the $1|_a^b$ term disappears, and all is well.
A: It is an indefinite integral. So for the same integrand, we will have a number of curves or functions varying by a constant C. Here if you add C to the right, C will be -1 and the equation holds good! 
(i.e, 0 = 1 + C = 1 - 1 = 0)
For example in this case, 
$\int\frac{1}{x}dx = ln(x) +C$
For different values of C, we have different anti-derivatives varying by a constant.

A: The indefinite integral is not a single function that you can cancel out, it is a family of functions in which every two members differ by some constant, so that equality holds up to a constant (some real number). In that case the constat must be precisely 1 (or $-1$, depending on the side of the equation you add it).
A: $\int {f(x)dx} -\int {f(x)dx}=c$
