# The natural logarithm

There’s an interesting question you might ask after learning the power rule for integration, which says that for every positive integer $n$, $x \in \mathbb R \mapsto \frac {x^{n + 1}} {n + 1}$ is an antiderivative of $x \in \mathbb R \mapsto x^n$. This can almost be extended to all integers: for every negative integer $n$ less than $-1$, $x \in \mathbb R \setminus \{0\} \mapsto \frac {x^{n + 1}} {n + 1}$ is an antiderivative of $x \in \mathbb R \setminus \{0\} \mapsto x^n$ (although 0 has to be excluded from the domain because $0^n$ is undefined if $n$ is negative). But the rule cannot apply to $x \in \mathbb R \setminus \{0\} \mapsto \frac 1 x$, since applying the rule in the case would involve dividing by zero. The question, then, is how we can find an antiderivative in this case.

Well, since $x \in \mathbb R \setminus \{0\} \mapsto \frac 1 x$ is continuous it must be integrable. It can’t be the case that there simply aren’t any antiderivatives. So let’s just give a name to one of the antiderivatives and see what properties we can discover. By the fundamental theorem of calculus, for every positive real number $a$, $x \in (0, \infty) \mapsto \int_a^x \frac 1 t \mathrm d t$ is an antiderivative of $x \in (0, \infty) \mapsto \frac 1 x$. The domain here is $(0, \infty)$ rather than $\mathbb R \setminus \{0\}$ because it has to be an interval for the definite integral over that domain to be defined. The most natural choice for a positive real number is 1, so the particular antiderivative to whom we’ll give the name will be $x \in (0, \infty) \mapsto \int_1^x \frac 1 t \mathrm d t$. What name shall we give it? Well, let’s just pick one completely at random… how about “the logarithm function”? I like the sound of that. And for every positive real number $x$, we’ll write the output of the function as $\log x$ (and call it “the logarithm of x“), so that

$\log x = \int_1^x \frac 1 t \mathrm d t.$

We can make a few simple conclusions from this definition about the properties of the logarithm function.

• The logarithm of 1 is 0, because $\int_1^1 \frac 1 t \mathrm d t$ is a definite integral over an empty interval and therefore is equal to 0.
• The derivative of the logarithm function is $x \in (0, \infty) \mapsto \frac 1 x$.
• The logarithm function is strictly increasing, since for every positive real number $x$, $\frac 1 x$, which is the derivative of the logarithm function at $x$, is positive. Consequently, it is also one-to-one and invertible.
• The second derivative of the logarithm function is $x \in (0, \infty) \mapsto -\frac 1 {x^2}$.
• The logarithm function is concave, since for every positive real number $x$, $-\frac 1 {x^2}$, which is the second derivative of the logarithm function at $x$, is negative.

Also, if we want to find the value of the logarithm of any positive real number, well, we can’t find the exact value, but we can approximate it using numerical integration techniques. For example we can find that the logarithm of 2 is about 0.69, the logarithm of 3 is about 1.10, the logarithm of 4 is about 1.39, the logarithm of 5 is about 1.61, and the logarithm of 6 is about 1.79. You might notice that this is the sum of the logarithms of 2 and 3. Is there any significance to this? Well, 6 is the product of 2 and 3, so let’s investigate another product, like 4, which is the product of 2 and 2. Well, the logarithm of 4 is 1.39 which is about 0.69 doubled, which is the logarithm of 2. Not convinced? Calculating to another degree of precision, $\log 4$ is 1.386, and $\log 2$ is 0.693—again, $\log 4$ is $\log 2$ doubled. It seems like we have a general rule here that for every pair of real numbers $x$ and $y$, the logarithm of $x y$ is the sum of $\log x$ and $\log y$. If you want, try to find a counterexample. You won’t have any luck! But how can we prove that this rule really will work for every pair of real numbers?

We simply use the definition of the logarithm as a definite integral and do some clever transformations. By this definition, $\log x y = \int_1^{x y} \frac 1 t \mathrm d t$ and $\log x + \log y = \int_1^x \frac 1 t \mathrm d t + \int 1^y \frac 1 t \mathrm d t$. So how can we get from the first to the second? Well, we will have to split the integral into a sum of two integrals at some point. At which point will we split the range of integration? The obvious choice is $x$, because then the first term in the resulting sum will be $\int_1^x \frac 1 t \mathrm d t$, i.e. $\log x$. The remaining term will be $\int_x^{x y} \frac 1 t \mathrm d t$, and this must be equal to $\int_1^y \frac 1 t \mathrm d t$. Often two integrals can be shown to be equivalent by making a substitution. In this case, the substitution would have to change the limits $x$ and $x y$ into 1 and $y$. This is easy, you just need to divide by $x$. So we let $u = \frac t x$, i.e. $t = u x$, which means $\mathrm d t = x \mathrm d u$, and the integrand changes from $\frac 1 t \mathrm d t$ to $\frac x {u x} \mathrm d u$, i.e. $\frac 1 u \mathrm d u$, and we are done. I’ve rewritten this process below as a sequence of equations, which you may find easier to understand.

$\begin{array}{rll} \log x y &= \int_1^{x y} \frac 1 t \mathrm d t \\ &= \int_1^x \frac 1 t \mathrm d t + \int_x^{x y} \frac 1 t \mathrm d t \\ &= \log x + \int_{\frac x x}^{\frac {x y} x} \frac x {u x} \mathrm d u \\ &= \log x + \int_1^y \frac 1 u \mathrm d u \\ &= \log x + \log y. \end{array}$

For every positive integer $n$, it is clear by applying this rule that we can also say that $\log x^n$ is $n \log x$. This turns out to also apply for every rational number $r$. Again, this is proven using a substitution. As an integral, $\log x^r$ is $\int_1^{x^r} \frac 1 t \mathrm d t$, while $r \log x$ is $r \int_1^x \frac 1 t \mathrm d t$. In order to get to the latter integral from the first using a substitution, the limits need to change from 1 and $x^r$ to 1 and $x$. This is, again, easy: we just need to raise each limit to the power of $\frac 1 r$. So we let $u = t^{\frac 1 r}$, i.e. $t = u^r$, which means $\mathrm d t = r u^{r - 1} \mathrm d u$, and the integrand changes from $\frac 1 t \mathrm d t$ to $\frac {r u^{r - 1}} {u^r} \mathrm d u$, i.e. $\frac r u$. Then the proof is completed by taking the $r$ out using the constant factor rule for integration.

$\begin{array}{rll} \log {x^r} &= \int_1^{x^r} \frac 1 t \mathrm d t \\ &= \int_{1^{\frac 1 r}}^{(x^r)^{\frac 1 r}} \frac {r u^{r - 1}} {u^r} \mathrm d u \\ &= \int_1^x \frac r u \mathrm d u \\ &= r \int_1^x \frac 1 u \mathrm d u \\ &= r \log x. \end{array}$

These two rules are extremely useful because they essentially turn products into sums and powers into products, making calculations easier. In particular, they make differentiation easier, because using the chain rule, we can show that there is a simple relation between a function $f$ and its logarithm $x \mapsto \log f(x)$, namely

$\frac {\mathrm d f(x)} {\mathrm d x} = f(x) \frac {\mathrm d \log f(x)} {\mathrm d x},$

which allows us to find the derivative of $f$ in terms of the derivative of $x \mapsto \log f(x)$. If $f$ is a product, $x \mapsto \log f(x)$ is a sum, which is easier to differentiate, and if $f$ is a power, $x \mapsto \log f(x)$ is a product, which is easier to differentiate. In fact, logarithmic differentiation can be used to prove the product rule from the sum rule, or the power rule from the product rule. Because for every pair of functions $f$ and $g$,

$\begin{array}{rll} \frac {\mathrm d f(x) g(x)} {\mathrm d x} &= f(x) g(x) \frac {\mathrm d \log f(x) g(x)} {\mathrm d x} \\ &= f(x) g(x) \frac {\mathrm d (\log f(x) + \log g(x))} {\mathrm d x} \\ &= f(x) g(x) \left( \frac {\mathrm d \log f(x)} {\mathrm d x} + \frac {\mathrm d \log g(x)} {\mathrm d x} \right) \\ &= f(x) g(x) \left( \frac {f'(x)} {f(x)} + \frac {g'(x)} {g(x)} \right) \\ &= \frac {f(x) g(x) f'(x)} {f(x)} + \frac {f(x) g(x) g'(x)} {g(x)} \\ &= g(x) f'(x) + f(x) g'(x), \end{array}$

and for every function $f$ and every rational number $r$,

$\begin{array}{rll} \frac {\mathrm d f(x)^r} {\mathrm d x} &= f(x)^n \frac {\mathrm d \log f(x)^r} {\mathrm d x} \\ &= f(x)^n \frac {\mathrm d r \log f(x)} {\mathrm d x} \\ &= r f(x)^n \frac {\mathrm d \log f(x)} {\mathrm d x} \\ &= r f(x)^n \frac {f'(x)} {f(x)} \\ &= r f'(x) f(x)^{n - 1}. \end{array}$

The key thing about the logarithm function, though, is that it shows us how to generalise the operation of taking powers to account for irrational powers. But I’ll explain this in a later post.

### One response to “The natural logarithm”

1. What name shall we give it? Well, let’s just pick one completely at random… how about “the logarithm function”? I like the sound of that.

Reminds me of how the characters come up with the name in Algebra The Easy Way: I think somebody dropped a bunch of logs outside the window; one of the characters suggested the name “log function”; and another character said, “No, how about ‘logarithm’? That has a nicer rhythm to it.”

I like your approach (i.e. declaring that definite integrals of 1/x defined a Mysterious Function, and working out properties of the Mysterious Function such as the multiplication-to-addition identity), and in general am really enjoying these posts which introduce such mathematical concepts and functions from a motivated perspective. One example I use of math education making math look like a bunch of arbitrarily invented names and rules is my memory of my eighth-grade algebra teacher teaching natural logarithms and the constant e without any kind of motivation or applications.

I remember deciding at some point that there should be an even more direct way to attack the problem of how to integrate 1/x from the standpoint of an investigator who has no idea about natural logarithms or the constant e. I think my idea was as follows (apologies for the lack of equation processing; I’m too lazy to figure out how to do it in a WordPress comment right now):

Okay, so the expression x^{n} / n is some sort of infinity when n = 0. Fine, but let’s see what happens when we take the difference between this expression evaluated at an arbitrary x and evaluated at x = 1, and take the limit as n approaches 0 — maybe if we’re lucky, the difference between infinities will turn out to be something interesting and meaningful. We get
lim_{n -> 0} (x^n – 1^n) / n = lim_{n -> 0} (x^n – 1^n) / n.
With a little algebraic manipulation, we see that the inverse of this Mysterious Function is lim_{n -> 0} (1 + nx)^{1/n}. Now this is a common formulation of the exponential function, but we can even pretend that we don’t know that and use it to directly show that this Mysterious Inverse Function is an exponential function (I think, without too much hand-waving?); let’s call the base e. Plugging in x = 1 to the Mysterious Inverse Function gives us lim_{n -> 0} (1 + n)^{1/n}, which can be used directly to get a pretty good approximation of e (for instance, by deriving the sum-of-factorials expansion).