Is My Proof that $\pi^e < e^{\pi}$ Valid? The other day, a math teacher at my college gave me a challenge problem: Prove that $$\pi^e < e^{\pi}$$ without using a calculator. The next day, I found a valid proof, but I used a log table instead of a calculator, so my proof is hardly satisfying. I went looking for another proof and I came up with something that might not be legitimate. Here's my proof:
Suppose that is an $x$ such that $x^e < e^x$
Then taking the natural log of both sides,
$$\ln(x^e) < \ln(e^x)$$
$$e\ln(x) < x$$
$$\ln(x) < \frac{x}{e}$$
Differentiate both sides,
$$\frac{1}{x} < \frac{1}{e}$$
$$x>e$$
Thus, $x^e < x^e$, for $x > e$
Since $\pi > e$, therefore $\pi^e < e^{\pi}$
I think my proof is good except perhaps where I differentiated both sides of the inequality. I know that there are many cases where this is invalid, but I'm not sure about this case.
 A: You cannot differentiate like that. That's very wrong.
Hint: consider the function $f(x)=x^{1/x},\space x>0$. Show that $f$ attains its maximum when $x=e$. And you are done.
A: As others have pointed out, you cannot differentiate and think the inequality remains valid. However, you can integrate, retracing your steps. 
$$x>e\implies \frac1x<\frac1e\implies \int_e^{\pi}\frac1x\,dx<\int_e^{\pi}\frac1e\,dx\implies \log \pi < \frac{\pi}e\implies \pi^e<e^\pi$$
A: No, your proof is invalid. The idea is good, though: the inequality
$$
x^e<e^x
$$
is equivalent (for $x>0$) to $e\log x<x$. Consider the function
$$
f(x)=x-e\log x
$$
defined for $x>0$. Its limits at $0$ and at $\infty$ are both $\infty$.
Next you can consider the derivative:
$$
f'(x)=1-\frac{e}{x}=\frac{x-e}{x}
$$
which shows the function is decreasing for $0<x<e$ and increasing for $x>e$. The absolute minimum is
$$
f(e)=e-e=0
$$
so, for $x>e$, we know that $f(x)>0$.
Thus, for $x\ne e$, $x>e\log x$, that is, $e^x>x^e$. This holds in particular for $\pi\ne e$.
A: Your differentiating is not valid. Comparison of gradients is not enough for comparison of functions. I'll provide two alternatives to prove it below:

Taylor Expansion:
Using the Taylor expansion of $e^x$, $$e^x=1+x+\frac{x^2}{2!}+ \cdots$$
so that $e^x > 1 + x$, as long $x \neq 0$. Then letting $x = \frac{\pi}{e} - 1$ we have $$e^{\pi/e -1} > \pi/e,$$
and so, multiplying both sides by $e$ give us
$$e^{\pi/e} > \pi.$$
Thus,
$$e^{\pi} > \pi^e.$$

Calculus-based alternative:
Consider the function $x^{\frac{1}{x}}$. Differentiating this function yields $$x^{\frac{1}{x}}\left(\frac{1}{x^2}\right)(1-\ln x)$$ We can see that this function attains its global maximum at $x=e$ by setting the derivative to $0$ and solving.
Hence we have $$e^{\frac{1}{e}} > \pi^{\frac{1}{\pi}}$$ so we get $$e^{\pi}>\pi^{e}.$$
