Comparing ##a^b## and ##b^a##

  • Context: Undergrad 
  • Thread starter Thread starter PeroK
  • Start date Start date
PeroK
Science Advisor
Homework Helper
Insights Author
Gold Member
2025 Award
Messages
29,558
Reaction score
21,361
I noticed the following question generated quite a lot of interest on the Internet. Which is larger ##e^{\pi}## or ##\pi^e##?

Most (if not all) solutions focus on this as a problem for these specific numbers. And, in fact, the same question was then asked for other specific pairs of numbers. Moreover, most of the solutions seemed to be quite complicated. So, I thought I would post my solution here.

First, since the natural log is an increasing function, we have for any ##a, b > 0##:
$$a^b > b^a \Leftrightarrow b\ln(a) > a\ln(b) \Leftrightarrow \frac{\ln(a)}a > \frac{\ln(b)}b$$We look at the function ##f(x) = \frac{\ln(x)}x## and note that:
$$f'(x) = \frac 1 {x^2}(1 - \ln(x))$$We see that the function is increasing for ##x < e##, has a maximum at ##x=e##, and is decreasing for ##x > e##. In particular, we can see that:

If ##e \le a < b##, then ##a^b > b^a##. (That answers the question for ##e## and ##\pi##)

If ##a < b \le e##, then ##a^b < b^a##.
 
  • Like
  • Informative
Likes   Reactions: pines-demon, Paul Colby, anuttarasammyak and 5 others
Mathematics news on Phys.org
Here is a plot of the region where ##a^b>b^a##
1771855668364.webp

I think your rule covers the upper right and lower left quadrants. (the quadrant lines are ##a=e## and ##b=e##)
 
Last edited:
  • Like
  • Informative
Likes   Reactions: javisot, berkeman and PeroK
Dale said:
Here is a plot of the region where
Cool plot! How did you generate it?
 
berkeman said:
Cool plot! How did you generate it?
Mathematica has a function called "RegionPlot" that makes them very easy. Without the "pretty" options for the labels and the gridlines this figure is:
Code:
RegionPlot[a^b > b^a, {a, 0, 6}, {b, 0, 6}]
 
  • Informative
Likes   Reactions: AlexB23, PeroK and berkeman
My high school friend in the 1960s played with this problem for a long time. I never understood what he was trying to determine. He was an MAA champion and was on the team that went to England to compete with the English and Russians. The US team came in last because they were used to multiple-choice tests, while the English and Russians were trained on fill-in-the-blank tests, which is how the competition test was constructed.

My recollection was the famous exact solution of ##2^4 = 4^2##

I guess he wanted to find algebraically the point where the a and b were equal inflection point, which I think is ##e^e##
 
  • Like
Likes   Reactions: Dale
jedishrfu said:
My high school friend in the 1960s played with this problem for a long time. I never understood what he was trying to determine. He was an MAA champion and was on the team that went to England to compete with the English and Russians. The US team came in last because they were used to multiple-choice tests, while the English and Russians were trained on fill-in-the-blank tests, which is how the competition test was constructed.

My recollection was the famous exact solution of ##2^4 = 4^2##

I guess he wanted to find algebraically the point where the a and b were equal inflection point, which I think is ##e^e##
The general solution must be transcendental, similar to the Lambert W-function.
 
  • Like
Likes   Reactions: Dale
If I use Mathematica to solve ##a^b=b^a## for ##b## as a function of ##a## then I get $$b=-\frac{a \ W_0\left(-\frac{\ln(a)}{a} \right)}{\ln(a)}$$ where ##W_0## is the principal branch of the Lambert W product log function. I am not at all familiar with this function, but the result looks correct:
1771867175783.webp
 
  • Like
Likes   Reactions: PeroK
PeroK said:
The general solution must be transcendental, similar to the Lambert W-function.
Yes, good call. I am not familiar with it but you appear to be exactly right.
 
Last edited:
I love threads like this. Thank-you, @PeroK !
 
  • #10
With no loss of generality a<b
$$f:=\ln \frac{b^a}{a^b}=ab(\frac{\ln b}{b}-\frac{\ln a}{a})$$
The remaining case from OP is a<e<b.
Obviously for a<1, f>0.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
888
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
Replies
4
Views
2K
Replies
12
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K