janmr blog

a to the bth power versus b to the ath power

Which quantity is larger, aba^b or bab^a, for positive numbers aa and bb? As it turns out, sometimes aba^b is the larger number, other times it is bab^a, and it may even be the case that the two quantities are equal, even though aba \neq b.

Let us start by rewriting the inequality:

ab<baeblna<ealnbblna<alnblnaa<lnbb  .\begin{aligned} a^b &< b^a \quad &\Leftrightarrow \\ e^{b \ln a} &< e^{a \ln b} \quad &\Leftrightarrow \\ b \ln a &< a \ln b \quad &\Leftrightarrow \\[6pt] \frac{\ln a}{a} &< \frac{\ln b}{b} \; . \end{aligned}

(Here we use the fact that xexx \mapsto e^x is a (strictly) increasing function and that aa and bb are positive.)

The variables have now been separated and let us introduce s(x)=lnxxs(x) = \frac{\ln x}{x} for x>0x > 0. Note how s(a)<s(b)ab<bas(a) < s(b) \Leftrightarrow a^b < b^a for all a,b>0a, b > 0 (and similarly for the relations == and >>).

We see that ss is continuous on the positive real numbers, that s(1)=0s(1)=0, that s(x)<0s(x)<0 for 0<x<10<x<1 and that s(x)>0s(x)>0 for x>1x>1. This gives us our first, partial, result:

0<a<1bs(a)<s(b)ab<ba  .0 < a < 1 \leq b \quad \Leftrightarrow \quad s(a) < s(b) \quad \Leftrightarrow \quad a^b < b^a \; .

The function ss is, in fact, differentiable on the positive reals and the derivative can give us all the information we need:

s(x)=1xxlnx1x2=1lnxx2  .s'(x) = \frac{\frac{1}{x} \cdot x - \ln x \cdot 1}{x^2} = \frac{1 - \ln x}{x^2} \; .

We see that s(x)>0s'(x)>0 for 0<x<e0 < x < e, s(e)=0s'(e)=0, and s(x)<0s'(x)<0 for x>ex > e. See a plot of xs(x)x \mapsto s(x) in Figure 1.

Plot of s(x)=(ln x)/x
Figure 1. A plot of s(x) = (ln x)/x.

From the information of the derivative of ss, we have the following:

0<a<bes(a)<s(b)ab<ba  ,ea<bs(a)>s(b)ab>ba  .\begin{aligned} 0 < a < b \leq e \quad &\Leftrightarrow \quad s(a) < s(b) \quad &\Leftrightarrow \quad a^b < b^a \; , \\ e \leq a < b \quad &\Leftrightarrow \quad s(a) > s(b) \quad &\Leftrightarrow \quad a^b > b^a \; . \end{aligned}

To summarize, we now have the following relations, provided that a<ba < b:

0<b10 < b \leq 1 1b<e1 \leq b < e e<be < b
0<a10 < a \leq 1 ab<baa^b < b^a ab<baa^b < b^a ab<baa^b < b^a
1a<e1 \leq a < e - ab<baa^b < b^a ?
e<ae < a - - ab>baa^b > b^a

The only unresolved case is when 1a<e<b1 \leq a < e < b. In fact, given the fact that s(x)0s(x) \to 0 as xx \to \infty, we have that s(a)=s(b)s(a) = s(b) has infinitely many solutions with 1<a<e1 < a < e and b>eb > e. Or, equivalently:

ab=ba has infinitely many solutions for 1<a<e and b>e.a^b = b^a \text{ has infinitely many solutions for $1 < a < e$ and $b > e$.}

Let us conclude by considering integer aa and bb.

The case a=1a=1 is trivial (1b<b11^b < b^1 for all b>1b > 1).

The case a=2a=2 is especially interesting because 2 is the only integer between 1 and ee. This means, as argued above, that there is a nontrivial solution to ab=baa^b=b^a and, in fact, 24=422^4=4^2. So

23<32,24=42,2b>b2for all integer b3.\begin{aligned} 2^3 &< 3^2, \\ 2^4 &= 4^2, \\ 2^b &> b^2 \quad \text{for all integer $b \geq 3$.} \end{aligned}

When a3a \geq 3 it is more simple as we are in the e<a<be < a < b category. We have

ab>bafor integer a3 and integer b>a.a^b > b^a \quad \text{for integer $a \geq 3$ and integer $b > a$.}

Feel free to leave any question, correction or comment in this Mastodon thread.