9

There's a simple formula for the antiderivative of any function of the form $x^n$; it's $\frac{x^{n+1}}{n+1}$. But in the case of $n=-1$, and only in that case, you get $\ln x$ instead. Even if you go really close to $-1$, for instance $n=-0.9999$, you still get $\frac{x^{0.0001}}{0.0001}$, not anything logarithm-y.

It makes sense that the formula would break, because the formula would then spit out $\frac{x^0}{0}=\frac{1}{0}$, and of course you can't divide by zero. But why specifically $\ln x$?

I understand that it can be derived from the standard Riemann sum definition of an integral; that's not what I'm looking for, I could do that myself. I want an intuitive understanding of why you would get anything well-defined at all here where the formula spits out a division by zero, let alone why it would be specifically a nice function like $\ln x$ as opposed to some horrible mess.

Hearth
  • 543
  • 4
  • 9
  • 5
    The actual result you need is $\ln x=\lim_{n\to0}\frac{x^n-1}{n}$ for $x>0$. – J.G. Sep 21 '22 at 14:36
  • Compared to polynomials, $\ln x$ is a horrible mess. :-) – JonathanZ Sep 21 '22 at 14:38
  • @J.G. I'm quite surprised that you apparently have to go to statistical physics to see that result, though! It does make sense. – Hearth Sep 21 '22 at 14:51
  • You don't; physicists just have an interesting application of the result, whose name I really, really wanted to remember, after seeing it recently. – J.G. Sep 21 '22 at 14:52
  • 1
    @JonathanZsupportsMonicaC At least it's an elementary function. There are lots of things where you'd expect a simple answer but something like an elliptic integral or some other nonsense falls out. Unlike differentiation, unfortunately (or fortunately, depending) integration isn't closed over the set of elementary functions. – Hearth Sep 21 '22 at 14:52
  • 1
    Note that the formula $\int x^a; dx= \frac{x^{a+1}}{a+1} + C$ is true even if $a$ is not rational. But, an usual definition of $x^a$ for $a$ (not necessarily rational) real number is $x^a=e^{a \ln(x)}$. So power functions are actually quite logarithm-y. – Taladris Sep 21 '22 at 15:48
  • Is it acceptable that $\ln x$ is defined to be $\int_1^x \frac 1t dt$? Does it follow that the derivative of $\ln x$ must be $\frac 1x$ as $\ln x$ is the integral of $\frac 1x$?. – fleablood Sep 22 '22 at 01:20

2 Answers2

17

Adayah's suggestion to look at the definite rather than indefinite integral is the right way to think about this but the most interesting step, in my view, is rushed through, which is the identity

$$\lim_{h \to 0} \frac{x^h - 1}{h} = \ln x$$

so let's go over it carefully, because there's something important to understand here and being too cavalier about evaluating this limit skips over the actual enjoyment of understanding it. Why is it that power functions converge to the logarithm as $h \to 0$? You say:

Even if you go really close to $-1$, for instance $n=-0.9999$, you still get $\frac{x^{0.0001}}{0.0001}$, not anything logarithm-y.

But how sure are you really that $\frac{x^{0.0001}}{0.0001}$ isn't "logarithm-y"? Here's a WolframAlpha plot of $\frac{x^h - 1}{h}$ for $h = 0.1, 0.01$ compared to a plot of $\ln x$, on the interval $[1, e]$:

enter image description here

I didn't include $h = 0.001$, let alone $h = 0.0001$, because the graphs are visually indistinguishable! To play around with this more, here's an interactive Desmos plot where you can adjust the value of $n$ in the graph of $\frac{x^{\frac{1}{n}} - 1}{\frac{1}{n}}$ and compare it to the graph of $\ln x$. To my eye you can barely tell the difference for $x \in [0, 10]$ by about $n \approx 50$.

So, what's really going on here? Let's go all the way back to the definition: if $n$ is a natural number for simplicity, and $x$ is a positive real, then $x^{\frac{1}{n}} = \sqrt[n]{x}$ is the positive real which satisfies $(x^{\frac{1}{n}})^n = x$. Now, as $n$ gets very large the function $x^n$ grows very quickly which means that $x^{\frac{1}{n}}$ correspondingly grows very slowly. How slowly?

To be really concrete, let's try to estimate $2^{\frac{1}{1000}}$. Since $1000$ is a very big number this has to be very small, or more precisely very close to $1$. So let's write it as $1 + \varepsilon$ for some $\varepsilon > 0$. We want $(1 + \varepsilon)^{1000} = 2$. Now, binomial expansion gives

$$(1 + \varepsilon)^n \ge 1 + n \varepsilon$$

which means that in order to have $(1 + \varepsilon)^{1000} = 2 \ge 1 + 1000 \varepsilon$ we need $\varepsilon \le \frac{1}{1000}$, so we learn that

$$2^{\frac{1}{1000}} \le 1 + \frac{1}{1000}.$$

More generally, the same argument gives that if $x \ge 1$ then

$$x^{\frac{1}{n}} \le 1 + \frac{x-1}{n}$$

so we've learned that when $n$ gets really big $x^{\frac{1}{n}}$ looks something like $1$ plus a term linear in $\frac{1}{n}$ (formally, what we're seeing here is an estimate of the first two terms of the Taylor series expansion of $x^h$ as $h \to 0^{+}$). But what is that term linear in $\frac{1}{n}$ exactly? If we write

$$x^{\frac{1}{n}} \approx 1 + \frac{f(x)}{n}$$

then exponentiating both sides gives

$$x \approx \left( 1 + \frac{f(x)}{n} \right)^n.$$

Now where have we seen that before? That expression on the RHS famously appears in one of the limits defining the natural exponential: for large $n$ we have $(1 + \frac{x}{n})^n \approx e^x$, so we get

$$\boxed{ x \approx e^{f(x)} }.$$

This gives

$$\boxed{ f(x) \approx \frac{x^{\frac{1}{n}} - 1}{\frac{1}{n}} \approx \ln x }.$$

This isn't a formal argument but it can be turned into one without much difficulty (write $x^h = \exp(h \ln x)$ then take a Taylor series expansion); much more importantly, this line of reasoning doesn't require you to know in advance what logarithms are, just the much simpler concept of taking $n^{th}$ roots. In fact you can use this line of reasoning to discover logarithms (and the natural exponential, simultaneously). This is actually related to the historical pattern of discovery: roughly, Napier calculates logarithms by doing calculations similar to these with $n = 10^7$.

As a bonus, here's how to see that for $h$ small the function $\frac{x^h - 1}{h}$ approximately satisfies the fundamental logarithm law $\ln xy = \ln x + \ln y$. If we write $f(x) = \frac{x^h - 1}{h}$, as above we have $x^h \approx 1 + h f(x)$ as the first-order approximation to the exponential for $h$ small. We then have, on the one hand,

$$(xy)^h \approx 1 + h f(xy)$$

and on the other hand,

$$(xy)^h = x^h y^h \approx (1 + h f(x))(1 + h f(y))$$

and expanding this out and discarding the $h^2$ term gives $f(xy) \approx f(x) + f(y)$ exactly as desired! This approximation is really quite good: you can ask WolframAlpha to verify, for example, that for $h = 0.001$ we have

$$\frac{2^h - 1}{h} = 0.693 \dots$$ $$\frac{3^h - 1}{h} = 1.099 \dots $$ $$\frac{6^h - 1}{h} = 1.793 \dots $$

Qiaochu Yuan
  • 419,620
  • 1
    One thing I'm coming to see is that the standard presentation of calculus and computing limits using l'Hopital's etc. is much too formulaic; students learn how to calculate things without actually understanding anything about what they're calculating. It's one thing to blithely apply l'Hopital's rule to calculate $\lim_{h \to 0} \frac{x^h - 1}{h}$ and quite another to really understand the significance of this calculation and what it implies for, say, $h = 10^{-4}$ as the OP asks about. – Qiaochu Yuan Sep 21 '22 at 17:07
  • Wonderful explanation. – Théophile Sep 21 '22 at 17:12
  • This is really nice! +1 – Max0815 Sep 21 '22 at 17:27
  • Nice answer. However, I disagree with your point about teaching calculus. Computing the limit $\lim_{h \to 0} \frac{x^h-1}{h}$ with the de l'Hospital's rule is simply wrong because first you need to know the derivative of $x^h$, which is exactly the thing you are computing. Those who compute the limit correctly do it via the substitution $x^h-1 = t$, and from this method a sufficiently engaged student can derive most of what you have written. Also I don't think it would be feasible for the lecturer to derive it for the other students because the lecture would have to be twice as long. – Adayah Sep 21 '22 at 18:36
  • Excellent explanation! I hadn't considered the possibility that $\frac{x^n}{n}$ could be a good approximation of $ln x$ (up to an additive constant), and thus didn't think to evaluate it to see. As for formulaic understandings of calculus, I always just found different aspects of calculus to be fascinating to me personally. Things beyond the basic limits, into differential equations and modelling physical phenomena. I guess that's why I'm an engineer now instead of a mathematician! – Hearth Sep 21 '22 at 19:41
  • 1
    Regarding your comment "Napier calculates logarithms by doing calculations similar to these with n = 10⁷"; could you elaborate on that at all? It feels like you'd hit pretty severe numerical errors doing such computations; you'd have to keep track of an unreasonable number of decimal places to avoid losing precision, no? – Hearth Sep 21 '22 at 19:43
  • @Hearth: Wikipedia has some details on how Napier did his calculations, and among other things he does seem to have used 10 or so decimal places of precision (his tables took him $20$ years to calculate!): https://en.wikipedia.org/wiki/Mirifici_Logarithmorum_Canonis_Descriptio – Qiaochu Yuan Sep 21 '22 at 19:48
8

You can think of it that way: for any $\alpha \neq -1$ an antiderivative $F_{\alpha}(x)$ of $f_{\alpha}(x) = x^{\alpha}$ can be found using Riemann integration:

$$F_{\alpha}(x) = \int \limits_1^x f_{\alpha}(t) \, \text{d} t = \int \limits_1^x t^{\alpha} \, \text{d} t = \left[ \frac{t^{\alpha+1}}{\alpha+1} \right]_1^x = \frac{x^{\alpha+1}-1}{\alpha+1}.$$

This is of course the usual antiderivative $\frac{x^{\alpha+1}}{\alpha+1}$ shifted by a constant, so that $F_{\alpha}(1) = 0$ for all $\alpha \neq -1$. Thanks to this shift, there exists a finite limit:

$$F(x) = \lim_{\alpha \to -1} F_{\alpha}(x) = \lim_{\alpha \to -1} \frac{x^{\alpha+1}-1}{\alpha+1} = \lim_{h \to 0} \frac{x^h-1}{h} = \ln x.$$

On the other hand, since $f_{\alpha}(t) \rightrightarrows \frac{1}{t}$ on every bounded closed interval contained in $(0, \infty)$ as $\alpha \to -1$, we have that

$$\lim_{\alpha \to -1} F_{\alpha}(x) = \int \limits_1^x \frac{1}{t} \, \text{d} t,$$

which means that $\ln x$ is an antiderivative of $\frac{1}{x}$.

Adayah
  • 10,468