Which Is Larger: e to the Pi or Pi to the e?

Brain Teaser · Easy · Free problem

Without evaluating either number, determine which is larger: $$e^{\pi} \quad \text{or} \quad \pi^{e}.$$ Give a proof, not a calculator answer.

Hints

  1. Taking logs turns the comparison into $\pi \ln e$ versus $e \ln \pi$, i.e. $\pi$ versus $e \ln \pi$. Dividing by $e\pi$ makes it a comparison of the same function at two points.
  2. Study $f(x) = \dfrac{\ln x}{x}$. Where is it increasing, where decreasing, and where is its maximum?
  3. $f'(x) = \dfrac{1 - \ln x}{x^2}$ is negative for $x > e$, so $f(e) > f(\pi)$. Unwind the inequality. Alternatively, apply $e^{t} > 1 + t$ with $t = \pi/e - 1$.

Worked Solution

How to Think About It: Comparing $a^b$ with $b^a$ is a comparison of $b \ln a$ with $a \ln b$, equivalently of $\frac{\ln a}{a}$ with $\frac{\ln b}{b}$. So the whole problem reduces to knowing the shape of $g(x) = \ln x / x$.

Quick Estimate: $\pi \approx 3.14$ and $e \approx 2.72$. Roughly, $e^{\pi} = e^{3.14} \approx 20 \times e^{0.14} \approx 23$, and $\pi^{e} = e^{e \ln \pi} = e^{2.72 \times 1.145} = e^{3.11} \approx 22.5$. So $e^{\pi}$ should win, but only by about $3\%$, which is why the question asks for a proof.

Formal Solution:

*Step 1 -- Reduce to one function.* Since $\ln$ is increasing, $$e^{\pi} > \pi^{e} \iff \pi \ln e > e \ln \pi \iff \frac{\ln e}{e} > \frac{\ln \pi}{\pi}.$$

*Step 2 -- Analyze $g(x) = \ln x / x$.* By the quotient rule, $$g'(x) = \frac{\frac{1}{x}\cdot x - \ln x}{x^2} = \frac{1 - \ln x}{x^2},$$ which is positive for $0 < x < e$, zero at $x = e$, and negative for $x > e$. Hence $g$ is strictly decreasing on $[e, \infty)$ and attains its global maximum at $x = e$.

*Step 3 -- Conclude.* Because $\pi > e$ and $g$ is strictly decreasing there, $g(e) > g(\pi)$, i.e. $\frac{1}{e} > \frac{\ln \pi}{\pi}$. Multiplying by $e\pi > 0$ gives $\pi > e \ln \pi = \ln(\pi^{e})$, and exponentiating gives $e^{\pi} > \pi^{e}$.

*Alternative one-liner.* The tangent-line inequality $e^{t} > 1 + t$ for $t \neq 0$ with $t = \pi/e - 1$ gives $e^{\pi/e - 1} > \pi/e$, so $e^{\pi/e} > \pi$; raising both sides to the power $e$ yields $e^{\pi} > \pi^{e}$.

Answer: $e^{\pi} > \pi^{e}$ (numerically $23.14 > 22.46$).

Intuition

The function $\ln x / x$ peaks at $x = e$, which is exactly why $e$ is the 'best' base: $a^b$ versus $b^a$ is settled by comparing $\ln a / a$ with $\ln b / b$, and $e$ wins against every other positive number. The same monotonicity argument decides $\sqrt{2}^{\sqrt{3}}$ vs $\sqrt{3}^{\sqrt{2}}$ type questions and shows up in growth-rate comparisons like compounding frequency versus rate.

Open the full interactive solver →