TITLE: A question comparing $\pi^e$ to $e^\pi$
QUESTION [29 upvotes]: I was doing an algebra problem set following a chapter on logarithms and exponentiation, and it presented this "bonus question":

Without using your calculator, determine which is larger: $e^\pi$ or $\pi^e$.

I wasn't able to come up with anything, and I'm just curious how you might tackle this, keeping in mind it came out of a college algebra textbook, less than halfway through, so I don't imagine the author had any super-advanced tactics in mind.

REPLY [6 votes]: So, we want to prove $e^\pi>\pi^e$. Taking $\log$ (where $\log$ means $\ln$) of both sides tells us this is equivalent to showing that
$$\pi\log(e)>e\log(\pi)$$
or
$$\frac{\log(e)}{e}-\frac{\log(\pi)}{\pi}>0$$
But,
$$\frac{\log(e)}{e}-\frac{\log(\pi)}{\pi}=-\int_{e}^{\pi}\frac{d}{dx}\left(\frac{\log(x)}{x}\right)  dx$$
but,
$$-\frac{d}{dx}\left(\frac{\log(x)}{x}\right)=\frac{\log(x)-1}{x^2}$$
Thus, we see that
$$\frac{\log(e)}{e}-\frac{\log(\pi)}{\pi}=\int_e^\pi \frac{\log(x)-1}{x^2} dx\,$$
Since, for $x\in(e,\pi)$ we have that
$$\frac{\log(x)-1}{x^2}>0$$
it follows that
$$0<\int_e^\pi \frac{\log(x)-1}{x^2}dx=\frac{\log(e)}{e}-\frac{\log(\pi)}{\pi}$$