log|x| + C revisited
Posted by Mike Shulman
A while ago on this blog, Tom posted a question about teaching calculus: what do you tell students the value of is? The standard answer is , with an “arbitrary constant”. But that’s wrong if means (as we also usually tell students it does) the “most general antiderivative”, since
is a more general antiderivative, for two arbitrary constants and . (I’m writing for the natural logarithm function that Tom wrote as , for reasons that will become clear later.)
In the ensuing discussion it was mentioned that other standard indefinite integrals like are just as wrong. This happens whenever the domain of the integrand is disconnected: the “arbitrary constant” is really only locally constant. Moreover, Mark Meckes pointed out that believing in such formulas can lead to mistaken calculations such as
which is “clearly nonsense” since the integrand is everywhere positive.
In this post I want to argue that there’s actually a very natural perspective from which is correct, while is wrong for a different reason.
The perspective in question is complex analysis. Most of the functions encountered in elementary calculus are actually complex-analytic — the only real counterexamples are explicit “piecewise” functions and things like , which are mainly introduced as counterexamples to illustrate the meaning of continuity and differentiability. Therefore, it’s not unreasonable to interpret the indefinite integral as asking for the most general complex-analytic antiderivative of . And the complex domain of and is , which is connected!
Thus, for instance, since , it really is true that the most general (complex-analytic) antiderivative of is for a single arbitrary constant , so we can write . Note that any such antiderivative has the same domain as the original function.
In addition, the dodgy calculation
is actually correct if we interpret to mean the integral along some (in fact, any) curve in from to that doesn’t pass through the singularity . Of course, this doesn’t offend against signs because any such path must pass through non-real numbers, whose squares can contribute negative real numbers to the integral.
The case of is a bit trickier, because the complex logarithm is multi-valued. However, if we’re willing to work with multi-valued functions (which precisely means functions whose domain is a Riemann surface covering some domain in ), we have such a multi-valued function that I’ll denote (in contrast to the usual real-number function ) defined on a connected domain, and there we have . Thus, the most general (complex-analytic) antiderivative of is where is a single arbitrary constant, so we can write .
What happened to ? Well, as it happens, if is a negative real number and denotes the principal branch of the complex logarithm, then , hence . Therefore, the antiderivative for negative real is of the form , where is a branch of the complex logarithm and is a constant (namely, ).
Of course it is also true that for positive real , the antiderivative is of the form for some constant , but in this case the constant is . And changing the branch of the logarithm changes the constant by , so it can never make the constants and coincide. Thus, unlike , the real-number function in the “usual answer” is not the restriction to of any complex-analytic antiderivative of on a connected domain. This is what I mean by saying that is now wrong for a different reason. And we can see that the analogous dodgy calculation
is also still wrong. If is a path from to in , the value of depends on , but it never equals : it’s always an odd integer multiple of , depending on how many times winds around the origin.
I’m surprised that no one in the previous discussion, including me, brought this up. Of course we probably don’t want to teach our elementary calculus students complex analysis (although I’m experimenting with introducing some complex numbers in second-semester calculus). But this perspective makes me less unhappy about writing and (no absolute value!).
