Mistake in integration by parts The partial integration rule says: $\int f'g=fg-\int fg'$ . If I use the rule for $f'(x)=2x,g(x)=\frac{1}{x^2}$, I get that:
\begin{align}\int\frac{1}{x^2}2x\,dx& =\frac{1}{x^2}x^2-\int\frac{-2}{x^3}x^2\,dx,\\
\int\frac{2}{x}\,dx& =1+\int\frac{2}{x}\,dx
\end{align}
and from this equation I get that $0=1$
Where did I make a mistake?
 A: The mistake is thinking that antiderivatives are unique. The fact that $(x^2 + 1)' = (x^2 + 0)'$ does not imply $1 = 0$.
In the case of the integration by parts formula, you can avoid the nonuniqueness issue  if you use definite integrals. You will have $$\int_a^b \frac{1}{x^2} 2x \, dx = \left.1 \right|_a^b - \int_a^b \frac{-2}{x^3}x^2 \, dx$$
where $1|_a^b = 1 - 1 = 0$.
A: How exactly do you get $1=0$?
I mean you have
$\int \underbrace{\frac{1}{x^2}}_{=x^{-2} = g}\underbrace{2x}_{=f'}\,dx$
and by partial integration this is 
$\int f'(x) g(x)\,dx = fg - \int f(x)g'(x)\,dx$.
As you stated
$f = x^2 \Rightarrow fg = 1$. It remains to compute $\int f(x)g'(x)\,dx$.
The derivative of $g$ is (as you stated) $g'(x) = -2x^{-3}$. Therefore you have
$\int f(x)g'(x)\,dx = \int x^2 (-2x^{-3})\,dx = \int -2x^{-1}\,dx$.
Do you know what the antiderivative of this thing is?
A: When dealing with antiderivatives in a purely formal way, you're always working modulo an element of the kernel of the derivation operator, that is modulo a constant.
If you call C the set of constants and F the set of differentiable functions, then you effectively have 0=1 in the quotient set F/C.
