Leibniz’s calculus knew how to differentiate powers with a fixed exponent, like $x^3$ or $x^{1/2}$: the derivative of $x^n$ is $nx^{n-1}$. But in 1694, in a letter to Leibniz, Johann Bernoulli put a strange creature on the table: the expression

$$y=x^x,$$

in which the base and the exponent vary at the same time. The rule for $x^n$ does not work, because the exponent is not fixed. Nor does the rule for $a^x$, because the base is not fixed. In 1697 Johann published in the Acta Eruditorum the “principles of the exponential calculus”, with the method for handling these powers, which he called percurrent, because the exponent runs through values.

The logarithm trick

The idea is to turn the power into a product, which we know how to differentiate. For $x>0$, take the natural logarithm of both sides:

$$\ln y=x\ln x.$$

Now differentiate both sides with respect to $x$. On the left, by the chain rule, we get $\dfrac{y'}y$. On the right, by the product rule, we get $1\cdot\ln x+x\cdot\dfrac1x=\ln x+1$. So $\dfrac{y'}{y}=\ln x+1$, and

$$\boxed{\frac{d}{dx}\,x^x=x^x\,(\ln x+1).}$$

This technique, differentiating the logarithm of the function instead of the function itself, came to be called logarithmic differentiation. It works for any $y=f(x)^{g(x)}$ with $f>0$:

$$\ln y=g\ln f\quad\Longrightarrow\quad y'=f^{\,g}\left(g'\ln f+g\,\frac{f'}f\right).$$

The two terms in the bracket account for the two changes: that of the exponent, $g'\ln f$, and that of the base, $g\frac{f'}f$. If the base is fixed, only the first remains and we are back to $\frac{d}{dx}a^x=a^x\ln a$; if the exponent is fixed, only the second remains and we are back to $nx^{n-1}$.

Where x to the power x is smallest

Since $x^x$ is always positive, the derivative has the sign of $\ln x+1$. It is negative for $x<\frac1e$ and positive for $x>\frac1e$. The function goes down until $x=\frac1e\approx0.368$ and then goes up. The minimum value is

$$\left(\frac1e\right)^{1/e}=e^{-1/e}\approx0.692.$$

In other words: among all positive numbers, none raised to itself gives less than $0.692$. For example, $0.5^{0.5}=\sqrt{0.5}\approx0.707$ and $0.3^{0.3}\approx0.697$, both a little above.

And near zero?

What happens to $x^x$ as $x$ approaches zero? The base goes to zero, which pulls downwards; the exponent goes to zero, which pulls towards 1. Who wins? Write $x^x=e^{x\ln x}$ and compute the exponent with l’Hôpital’s rule:

$$\lim_{x\to0^+}x\ln x=\lim_{x\to0^+}\frac{\ln x}{1/x}=\lim_{x\to0^+}\frac{1/x}{-1/x^2}=\lim_{x\to0^+}(-x)=0.$$

So $x^x\to e^0=1$. The exponent wins. With a calculator: $0.1^{0.1}\approx0.794$, $0.01^{0.01}\approx0.955$, $0.001^{0.001}\approx0.993$.

Exercise: differentiate (1 + x) to the power x, for x > −1.

With $f=1+x$ and $g=x$, we have $g'=1$ and $f'=1$, so

$$\frac{d}{dx}(1+x)^x=(1+x)^x\left[\ln(1+x)+\frac{x}{1+x}\right].$$

At $x=1$, the function is $2$ and the derivative is $2\left(\ln2+\frac12\right)\approx2.386$.

Exercise: what is the slope of the curve y = x to the power x at x = 1? And at x = e?

At $x=1$: $1^1(\ln1+1)=1$. The tangent at $(1,1)$ has slope 1, like the line $y=x$. At $x=e$: $e^e(\ln e+1)=2e^e\approx30.3$. The function grows very fast: $e^e\approx15.15$, and already at $x=4$ it is $4^4=256$.

Sources: Johann Bernoulli, “Principia calculi exponentialium seu percurrentium”, Acta Eruditorum (1697) · Florian Cajori, “History of the exponential and logarithmic concepts”, The American Mathematical Monthly 20 (1913) · biography of Johann Bernoulli, MacTutor.


All topics on Johann Bernoulli · ← The brachistochrone: the challenge of 1696 · The principle of virtual work →

Image credits.