TITLE: Can you have different integration constants for functions like $1/x^2$, one on each component of its domain?
QUESTION [14 upvotes]: We all learned back in calculus class that $\int \frac{1}{x^2}dx$ is $\frac{-1}{x}+C$ via the power rule for integrals.  However, looking back at my calculus book, they define the indefinite integral of a function $f$ as the collection of all functions $F$ where $F$ is an antiderivative of $f$. But, isn't 
\begin{equation}
F(x) = \left\{ 
\begin{array}{lr}
       -\frac{1}{x}+C_1, & x>0\\\\ 
       -\frac{1}{x}+C_2, & x<0 
\end{array}\right.
\end{equation}
an antiderivative of $\frac{1}{x^2}$. I think the derivative of the function above is  $1/x^2$ on the relevant domain. The calculus books on my shelf do not speak on this issue.

REPLY [7 votes]: I was just griping about this yesterday, coincidentally, for a similar function.  Calculus books will almost universally say that
$$\int \frac{dx}{x} = \ln\lvert x\rvert + C,$$
as though the addition of the absolute value is an improvement in generality.  In fact, just as you describe, it is actually incorrect, because $1/x$ and, correspondingly, $\ln \lvert x \rvert$, have asymptotes at 0 and this decouples the constant of integration somewhat.
The reason is that the notation $\int f(x) \, dx$ is wrong, or at least, bad.  It suggests that the limits of integration don't matter, because "they only add a constant".  In fact, the difference between the integrals
$$\int_a^x \frac{dt}{t}$$
for $a > 0$ and $a < 0$ is complete: there is no value of $x$ for which both are defined.  They only differ by a constant if the integrand is integrable across the interval between two different values of $a$.  So for $a > 0$ and $a < 0$ you are, in effect, defining two completely unrelated functions, not one single function $\ln \lvert x \rvert + C$ for a single constant $C$.