# Are there any applications of $x^x$?

I'm teaching Calculus I. It's time for the derivative of $$x^x$$. In previous semesters, I've told students we mainly do this just for closure, so that we know that we can find derivatives of every function possible.

Are there any applications of $$x^x$$?

Does anyone actually use logarithmic differentiation?

Edited to add: Are there any applications of this that come up in multi-variable calculus?

• There's a great "joke" involving the derivative of x^x. If you differentiate it each wrong way: using the power rule to get x*x^(x-1) and the rule for exponentials to get x^x ln(x), and add them together you get the right answer. This can be easily verified with the multivariable chain rule, and is true in general for arbitrary exponents f(x)^g(x) and other binary operations. Mar 25 at 4:24
• @Carser, can you please tell me how you fixed my powers, so I can do it myself next time? Mar 25 at 18:01
• @SueVanHattum There is a nice tutorial here: math.meta.stackexchange.com/questions/5020/… but in short, you can wrap LaTeX expressions in dollar signs to format them. Using double dollar signs will put the expression centered on its own line. If you click on "Edit" to edit your post, you will see the addition there. Mar 25 at 18:31
• A point to make to students about this problem is that it's an example of the general strategy where you change a problem into a different form, where the new form is one that you know how to solve.
– user507
Mar 26 at 2:58
• (1) $\int \ln x \, dx = \ln(x^x) - x$, FWIW. (2) $\lim (1+x/n)^n = e^x$. (3) Aside from completeness/closure, it applies logarithms and impl. diff, which may be its most important aspects: connecting things up and recursive practice. (4) Applications of log. diff. (not $x^x$ per se): $d(\ln q)/dt$ is the relative rate of change. See also elasticity in economics. (5) Log. diff. makes the derivative of Cobb-Douglas production/utility functions $x^ay^b\cdots$ easier, and expresses the relative increase in productivity as a weighted sum of the relative increases in the inputs. Mar 27 at 4:00

For the expression $$x^x$$ we could focus on finding occurrences of $$x\ln(x)$$.

One direction is Stirling's approximation $$\ln(N!)\sim N\ln(N)$$ so $$N!$$ is like $$N^N$$.

Another direction is that the prime number theorem gives an estimate for the $$n$$-th prime $$p_n$$ as $$p_n=n\ln(n)$$.

Yet another direction involves entropy. Entropy might be given by an expression like $$S=-\Sigma_i p_i\ln(p_i)$$ where $$p_i$$ are probabilities. Then $$e^S$$ is like the number of micro-states of a system, and is often expressed combinatorially with factorials, bringing us back to Stirling!

Logarithmic differentiation is used in mathematics when dealing with infinite products in complex analysis. Note the construction of $$f’/f$$ from $$f$$ does not require logarithms of $$f$$ as a middle step (except intuitively), so it is perfectly fine to use even when $$f$$ takes non-positive values. The prime number theorem and the link between prime numbers and the Riemann hypothesis involve the logarithmic derivative of the Riemann zeta-function. That is all too advanced for your students. The topic of logarithmic differentiation feels like an archaic topic in a calculus course, since there are almost no worthwhile problems to use it on. Feynman liked to use it to differentiate rational functions with numerator and denominator in factored form. I do not think your students would find this interesting at all.

I think time spent in a calculus course on $$x^x$$ or the “most general” case of $$f(x)^{g(x)}$$ is not time well spent. These are worthless things for students to spend time on in calculus when there are so many more important things to discuss. The exponential-type functions that matter are $$x^c$$ and $$c^x$$ for constant $$c$$. You can branch out and use the chain rule on $$e^{-x^2}$$, which matters in probability, but $$x^x$$ is a time sink. That $$x\log x$$ shows up in math is not a compelling argument to care about $$x^x$$ for a real variable $$x$$: a function $$f(x)$$ is not important just because its logarithm is important. Otherwise we’d make a big deal about $$e^{\sin x}$$ and in basic courses that never shows up in practical situations. The function of a real variable $$x^x$$ is a curiosity and that is all.

• Your are correct that logarithmic differentiation comes up in complex variables in a fundamental way. The form $\frac{f'(z)}{f(z)}$ appears in the argument principle. If $f$ is a polynomial, then upon integrating around a contour, we get the number of zeros inside the contour, up to the factor $2\pi i$. Nice answer! Mar 27 at 0:46
• I like your answer. I may still spend just a little time on it, so they can see this curiosity. Mar 27 at 2:14

$$n^n$$ shows up in combinatorics (number of lists of numbers from 1-n of length n), but I doubt it will have applications for the physical world: $$x$$ cannot have units, since it doesn't make sense to raise something to a power with units.

• $x$ cannot have units, since it doesn't make sense to raise something to a power with units. – By that argument, $e^x$ has no physical application either. Mar 25 at 14:39
• My intuition is that in a lot of real-world applications, the base of an exponent and the exponent are "different types" of numbers, but it's clear as you pointed out that units aren't the right way of formalizing this intuition. I'm curious if anyone has a way of formalizing this intuition. Compare the expression $sin(sin(x))$ which seems odd because one is taking the sine of a length-ratio, not of an angle. Mar 26 at 16:12