Tuesday, February 16, 2010

e to the pi vs pi to the e

(ANSWER to Trivia Questions from Last Post: The last president who became president NOT by being VP and having the prez die, but then did not run again, was Rutherford B. Hayes. Hayes and Obama are the only presidents who have law degrees from Harvard. For more on both of these questions see this excerpt from my Prez Trivia Quiz.)

When I was 12 my school got a very primitive computer. The teacher asked me what I wanted it to do for me. I said
I want to know whats bigger eπ or πe.
I typed both of them in, but I forgot the order I typed them in so I didn't find out. I didn't try again because I realized that even if I found out the answer it would not tell me a reason for the answer.

I had forgotten all about it until last week when I got a review of the book When Least is Best (book by Paul Nahim, review by Yannis Haralambous) in my capacity of SIGACT NEWS book review editor. Here is a quote from the review:
Imagine you are stranded on a desert island (without logarithm tables or computers) and--- probably due to an emotional shock---your only concern is to find out which one among numbers πe and eπ is bigger. The solution is: take h(x)=ln(x)/x, take the derivative twice to prove that x=e is a maximum, and that gives eπ is bigger.
I am sure this is well known; however, since I didn't know it until last week I hope this will enlighten some of my readers.

11 comments:

  1. You may enjoy the following related facts:

    Of the two expressions a^b and b^a, in general, the larger one is the one whose base is closer to e. For example, with integers, this is almost always the smaller one, except for 3^2 is bigger than 2^3. The "proof" is the one you mentioned. (Note: 1 is infinitely far from e for these purposes.)

    e^π is known to be transcendental, but π^e is not.

    ReplyDelete
  2. Boris, are your sure this is correct? Take a=2 and b=3.9

    ReplyDelete
  3. @Anonymous: Sorry, I meant "closer to e" in a vague sense. I meant to put it in quotes, but forgot. As Gasarch mentions, the actual relevant quantity is log(x)/x. This is unimodal with a maximum at e. Its value at 2 and 4 are equal, so in my vague sense, 3.9 is closer to e than 2 is.

    I guess that's what I get for making imprecise claims.

    ReplyDelete
  4. Rutherford B. Hayes, the man who in the far future will be thought to have invented the modem.

    ReplyDelete
  5. If you're going to prove it, you may as well give a complete proof...

    Raising each side to 1/(\pi e), we see that the question is equivalent to determining which of \pi^{1/\pi} or e^{1/e} is larger. Taking the derivative of the function x^{1/x} shows that this function is maximized at e.

    Looking at this now, I'm pleasantly amazed to recall that I solved this in high school. (Given the trick the proof is easy, but finding the trick is not immediate.)

    ReplyDelete
  6. You can just look at the partial derivatives of f(x,y) = x^y. You can use these to see that f grows faster by changing y when x and y are both at least e.

    More formally, f_x = x^y ln x and f_y = y x^(y-1). If a>e, then ln a < a/e, so f_x(a,e) < f_y(e,a). So by integrating over a on both sides from e to pi, you get f(e,pi)>f(pi,e). A similar calculation should give you something like Boris's claim.

    ReplyDelete
  7. "I realized that even if I found out the answer it would not tell me a reason for the answer"

    I am curious whether at that age you knew any "reason" behind the fact that $\pi \neq e".

    ReplyDelete
  8. To the last Anon- good point, not I doubt I knew then, or even now, a
    ``good reason'' why
    pi\ne e. Also, I should have
    clarified the original post by saying that my thoughts BACK THEN were NOT so clearly thought out.
    I am putting my muddled thoughts from back then into clearer language then I could ever have used then.

    ReplyDelete
  9. Is there an element of "elegance" regarding the use of log(x)/x instead of going brute force with x^e/e^x ?
    I know that log(x) - 1 = 0 is easier to solve than x^e*e^x-e*x^(e-1)*e^x = 0. But it's not that much easier.
    (OK, the second derivative is a real drag.)

    Rick

    ReplyDelete
  10. Here's how I approached it - is there a function that has both outputs? Start by taking logs of each. Then factor out what is common to both and what one is left with is the logarithm of something divided by that something - that is, (log e)/e and (log Pi)/Pi. This suggests the function (log x)/x. The further analysis and graph of this function shows that e raised to the Pi is THE maximum and every other output (Pi raised to the e being just one) is less than that.

    ReplyDelete
  11. e^x>x+1 for all x<>0 . Choose x to be (pi/e)-1. The rest is left to the reader as an exercise ;-)

    ReplyDelete