# What's the link between logarithms and the zeroth power, if any?

I have noticed that in some instances, $\log(x)$ (with base $e$) appears to "fill the role" of $x^0$ in situations where $x^0$ would not create a sensible answer. Here are a few examples of what I'm talking about:

### The Power Rule for Integration

Any first-year calculus student will be familiar with the power rule of integration, which states: $$\int x^n \, dx = \frac1{n+1} x^{n+1}, n \ne -1$$ Essentially, integration of $x^n$ has the effect of incrementing the power of $x$. Normally, following this rule for $x^{-1}$ would result in $\frac10x^0$, but there's that suspicious-looking $n \ne -1$ there. A natural question many students might ask, then, would be what the integral of $x^{-1}$ really is. And of course: $$\int x^{-1} \, dx = \log|x|$$ So in a sense, $\log(x)$ is "replacing" $x^0$ in the context of the power rule.

### The Generalized Mean

Taken from the Wikipedia article for the generalized mean:

If $p$ is a non-zero real number, and $x_1,\dots,x_n$ are positive real numbers, then the generalized mean or power mean with exponent $p$ of these positive real numbers is: $$M_p(x_1,\dots,x_n) = \left( \frac{1}{n} \sum_{i=1}^n x_i^p \right)^{\frac{1}{p}}$$

Specific cases include the harmonic mean ($p = -1$), the arithmetic mean ($p = 1$), and the quadratic mean ($p = 2$). What about $p = 0$? Well, unfortunately, this would involve raising every individual data point to the zeroth power (which annihilates the data), adding them, and raising them to the infinite-th power. Instead,

For $p=0$ we set it equal to the geometric mean (which is the limit of means with exponents approaching zero, as proved below): $$M_0(x_1, \dots, x_n) = \sqrt[n]{\prod_{i=1}^n x_i}$$

This doesn't seem immediately connected to the logarithm, but it's possible to rephrase this formula somewhat. $$M_0(x_1, \dots, x_n) = \exp\left( \frac{1}{n} \sum_{i=1}^n \log(x_i) \right)$$ As you can see, $\log(x)$ arises in place of $x^0$, and $\exp(x)$ replaces the exponent of $1/0$.

# Other bits

Admittedly, this connection is a lot more tenuous than the previous two, but I have noticed that $x^0$ and $\log(x)$ are both undefined at 0, and defined everywhere else, assuming you allow complex numbers. This could just be a coincidence, though, since the same is true of negative powers (though I do wonder if $\log(0)$ is defined in the projectively extendeed real line, where negative powers are defined; if not, that could mean a stronger link to $0^0$).

The logarithmic function will grow slower than any positive, finite power; on the other hand, the exponential function will grow faster than any positive, finite power. Thus, if you were to "sort" the logarithmic, exponential, and all (positive finite) power functions by how quickly they grow, the logarithmic function would be sorted at 0 and the exponential function would be sorted at infinity.

If you want to play with the relationship $(x^p+y^p)^{1/p}$, I've created a Desmos calculator that plots this relationship with the numbers $a$ and $b$, along with the generalized mean shown above. The horizontal axis is the power $p$; at $p=0$, this "generalized addition" diverges to $0$ from the negative direction and $\infty$ from the positive direction, while the generalized mean approaches the geometric mean. In fact, if one were to remove the root from the expression, one would get $\exp(\log(a)+\log(b))$, which simplifies to $ab$.

Overall, I get the impression that $\log$ and $\exp$ act analogously to the "zeroth power" and a sort of "infinite power," and I think I've provided some evidence to support this intuition. Is there a fundamental reason as to why the logarithm tends to replace the zeroth power, or is this just a coincidence that I've over-analysed?

• "So in a sense, log(x) is "replacing" $x^0$ in the context of the power rule. Well, no... since then integral is "supposed to be $\log x = \frac 10 x^0 \ne x^0$ so it doesn't fit the bill. We do get the $x^0 = 0*\log x$ which .... if you squint .... – fleablood Feb 2 '18 at 6:57
• I should clarify that I am not attempting to claim that $\log(x)$ is somehow "equal" to $x^0$, merely that there appears to be a connection between the two expressions. As for the specific qualm about $\tfrac{1}{0} x^0 \ne x^0$, that's true; however, constant factors don't tend to change the underlying properties of a function. Of course, when that constant factor diverges to infinity, that throws a wrench in the works. – TristanBomb Feb 2 '18 at 7:02
• Regarding $\int x^n \, dx$, see math.stackexchange.com/questions/498339/… (and the linked questions there). – Hans Lundmark Feb 2 '18 at 7:09
• In some treatments, the natural logarithm is defined as a definite integral of $1/x$. – amd Feb 2 '18 at 10:28

Your initial statement $$\int x^n dx = \frac1{n+1} x^{n+1}, n \ne -1$$ hides a variety of issues.

• as an indefinite integral you could add a constant of integration
• alternatively you could do a definite integral $\int_0^y x^n dx = \frac1{n+1} y^{n+1}$ but that only makes sense when $n \gt -1$ to avoid problems around $x=0$
• you want to consider what happens when $n=-1$ but you are talking about the zeroth power

One approach to solving this would be use a definitive integral keeping well away from $x=0$ and to use $m=n+1$, for example considering $$F(y,m)=\int_1^y x^{m-1} dx = \frac1{m} \left(y^{m}-1\right), m \ne 0$$ Note that both $\frac1m$ and $y^m-1$ change sign as $m$ changes sign. This expression makes the issue with $m=0$ even more stark: $\frac10(1-1)$ is not something you want to consider except perhaps with the careful application of limits

If you do use limits, it starts to be clearer. For example $F(5,0.0001)\approx 1.609567434$ while $F(5,-0.0001)\approx 1.609308405$, which are both very close to $\log_e(5)\approx 1.609437912$

In general $$\lim_{m \to 0} \frac1{m} \left(y^{m}-1\right)= \log_e(y)$$ for $y \gt 0$, and so might be a reasonable definition of $F(y,0)$ to provide continuity over $m$. This is not quite the same as saying $\log_e(x)$ appears to fill the role of $x^0$

• Your last equation, I believe, is the long and short of it. In other words: Define $f_m(x)=ax^m+b$, with $a$ and $b$ chosen so that $f(1)=0,f'(1)=1$. Then $f_m(x)\to\log x$ as $m\to 0$. – user856 Feb 13 '18 at 4:21

Write $\bar x = M_p(x_1,x_2,\ldots,x_n).$ Then for $p \neq 0,$ \begin{align} (\bar x)^p &= \frac1n \sum_{i=1}^n x_i^p,\\[.6ex] \frac{(\bar x)^p - 1}{p} &= \frac1n \sum_{i=1}^n \frac{x_i^p - 1}{p},\\[.6ex] \int_1^{\bar x} t^{p - 1} dt &= \frac1n \sum_{i=1}^n \int_1^{x_i} t^{p - 1}dt,\\ \end{align} and so it is perhaps not so surprising that $$\log\left(\lim_{p\to0} M_p(x_1,x_2,\ldots,x_n)\right) = \frac1n \sum_{i=1}^n \log x_i,$$ since after all, $$\lim_{p\to0} \int_1^y t^{p - 1}dt = \lim_{p\to0} \frac{y^p - 1}{p} = \log y = \int_1^y t^{-1}dt.$$