Why is Log the Antiderivative of 1/x?

October 30, 2024

The power rule has a weird deficiency that everyone just learns to deal with. Recall, the power rule tells us that the antiderivative of xpx^p is

xp+1p+1\frac{x^{p+1}}{p+1}

which gives us our familiar relations: the antiderivative of xx is 12x2\frac12x^2, the antiderivative of 00 is a constant, and the antiderivative of x1x^{-1} is... logx\log x? What?! This logarithm just seems to come out of nowhere. It's easy to algebraically prove why this happens, but it still feels weird. Most students end up treating this as a rule to be memorized, but it's not hard to see why this happens.

Log as a Limit

(To be clear, the proof of the derivative of log\log is quite simple.[1] My goal here is to bring a more intuitive understanding to the table.)

As with most edge cases/singularities in math, they can be better understood as a limit of local behavior. In this case, we can view the antiderivative of x1x^{-1} as the limit of the antiderivatives of x1.1x^{-1.1}, x1.01x^{-1.01}, x1.001x^{-1.001}, and so on. That is, we should expect

t1dt=limp1tpdt\int t^{-1}\mathrm dt = \lim_{p \to -1} \int t^p\mathrm dt

Note that we need to pay special attention to the bounds of integration here. If we start the integral of t1t^{-1} from t=0t = 0, it diverges, so we need to start from t=1t = 1 instead. Thus, for any positive input xx, we want

1xt1dt=limp11xtpdt\int_1^x t^{-1}\mathrm dt = \lim_{p \to -1} \int_1^x t^p\mathrm dt

Applying the power rule, expression on the right becomes

limp1xp+11p+1\lim_{p \to -1} \frac{x^{p+1} - 1}{p+1}

which, on a graph, actually looks pretty close to a logarithm!

plot

So it would appear that our intuition is correct, and the local limiting behavior is as we expect. Can we do any better? Well, the next step would be to show that the above expression actually approaches a logarithm, i.e.

limp1xp+11p+1=log(x)\lim_{p \to -1} \frac{x^{p+1} - 1}{p+1} = \log(x)

which can be rewritten as

limp0xp1p=log(x)\lim_{p \to 0} \frac{x^p - 1}p = \log(x)

Occasionally, this limit is used as a definition of log\log itself! But there's actually a very simple explanation. Remember that logx\log x is the inverse of exe^x, which is defined as

limn(1+xn)n\lim_{n \to \infty} \left(1+\frac xn\right)^n

(Remember back to your introduction to ee as compound interest!) If we make the substitution p=1np = \frac1n, the above expression becomes

limp0(1+xp)1p\lim_{p \to 0} \left(1+xp\right)^{\frac1p}

Now, just as the defining relationship between exe^x and log\log is logex=x\log e^x = x, we can do the same for their limiting expressions:

limp0(1+xp1pp)1p=limp0(1+xp1)1p=limp0(xp)1p=x\lim_{p \to 0} \left(1 + \frac{x^p - 1}pp\right)^{\frac1p} \\ = \lim_{p \to 0} \left(1 + x^p - 1\right)^{\frac1p} \\ = \lim_{p \to 0} \left(x^p\right)^{\frac1p} \\ = x

and as you can check for yourself, the same applies the other way around, just like elogxe^{\log x}. So it's not a surprise that limp0xp1p=log(x)\lim_{p \to 0} \frac{x^p - 1}p = \log(x).

Another way to view the logarithm here is in terms of growth rate. logx\log x is a subpolynomial function, which means that it grows slower than any polynomial.[2] This is what we should expect from the power rule: we want the antiderivative of x1x^{-1} to look something like x0x^0, which would also be subpolynomial (since it's a constant). And although we don't quite get that answer, its subpolynomial nature is echoed in the logarithm.

Similarly, note that exe^x is superpolynomial, i.e. it grows faster than any polynomial. And just like how the inverse of xpx^p is x1px^\frac1p, we have that the inverse logx\log x is exe^x, or the inverse of a subpolynomial is a superpolynomial. Or, less precisely, the inverse of x0x^0 is x10=xx^{\frac10} = x^\infty, larger than any polynomial!

  1. Take y=logxy = \log x, so x=eyx = e^y. Differentiating both sides with respect to xx, we get 1=eyy1 = e^yy', and therefore y=1ey=1xy' = \frac1{e^y} = \frac1x.
  2. If you're familiar with the notion of uniform convergence, perhaps from a real analysis course, then it's worth noting that the polynomials xp1p\frac{x^p - 1}p don't converge to logx\log x uniformly, precisely because of the logarithm's subpolynomial nature: for any pp, the polynomial gets arbitrarily far away from the logarithm for large xx. However, if we consider a positive bounded interval (ε,1ε)(\varepsilon, \frac1\varepsilon) with ε>0\varepsilon > 0, then we do indeed get uniform convergence.