Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

December 3, 2025

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 1xdx\displaystyle\int \frac{1}{x}\,dx is? The standard answer is ln|x|+C\ln{|x|}+C, with CC an “arbitrary constant”. But that’s wrong if \displaystyle\int means (as we also usually tell students it does) the “most general antiderivative”, since

F(x)={ln|x|+C ifx<0 ln|x|+C + ifx>0 F(x) = \begin{cases} \ln{|x|} + C^- &\text{if}\;x\lt 0\\ \ln{|x|} + C^+ &\text{if}\;x\gt 0 \end{cases}

is a more general antiderivative, for two arbitrary constants C C^- and C +C^+. (I’m writing ln\ln for the natural logarithm function that Tom wrote as log\log, for reasons that will become clear later.)

In the ensuing discussion it was mentioned that other standard indefinite integrals like 1x 2dx=1x+C\displaystyle\int \frac{1}{x^2}\,dx = -\frac{1}{x} + C are just as wrong. This happens whenever the domain of the integrand is disconnected: the “arbitrary constant” CC is really only locally constant. Moreover, Mark Meckes pointed out that believing in such formulas can lead to mistaken calculations such as

1 11x 2dx=1x] 1 1=2 \int_{-1}^1 \frac{1}{x^2}\,dx = \left.-\frac{1}{x}\right]_{-1}^1 = -2

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 1x 2dx=1x+C\displaystyle\int \frac{1}{x^2}\,dx = -\frac{1}{x} + C is correct, while 1xdx=ln|x|+C\displaystyle\int \frac{1}{x}\,dx = \ln{|x|}+C is wrong for a different reason.

Posted at 2:23 AM UTC | Permalink | Post a Comment