Can you have different integration constants for functions like $1/x^2$, one on each component of its domain?

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.


Solution 1:

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$.

Solution 2:

Yes, you have the choice of a constant of integration on each component of the domain of the integrand function.

Solution 3:

I always believed that the notation $F(x) = \int f(x)\, dx$ presented to calculus students was slang for the fundamental theorem of calculus. To this point, we not only want $F(x)$ to be an antiderivative, but we also want to be able to write $F(x) = \int_a^x f(t)\, dt + F(a)$. In particular, we expect the students to know (a version of) the FTC as $\int_a^b f(x)\,dx = F(b)-F(a)$. It is true that the "$+C$" term is a convenient way to remark that we haven't chosen the integration constant; however, we need to be able to "connect the points" $a$ to $x$ on a connected component of the domain of $f$.