Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

X^x = n, value of x?

  1. Apr 16, 2010 #1
    This just crossed my mind a while ago after tricking one of my friends that pi^pi = 36 (he's not the fastest).

    Anyway, say we say that x^x = 36. Is there any mathematical way to work out the value of x? The only solution I can think of is trial and error, I can't believe that's the only way to do it though!

    Thank you for your help in advance :)
  2. jcsd
  3. Apr 16, 2010 #2


    User Avatar
    Science Advisor
    Homework Helper

    Lambert's W function works. Numerical methods are usually used; there are plenty that are better than trial and error. The secant method, in particular, is useful here.

    Here's Pari's solution to 500 digits:
    Code (Text):
    > \p500
       realprecision = 500 significant digits
    > solve(x=1,9,x^x-36)
    time = 10 ms.
    %1 = 3.1356423938890448229304002435243798685431704626991494623687331920918980549484396260412000567683132168848411846174309842591610927438140351855194492146118312054308539184700182238312099667934923102924766875469711375568451864527307249738059671297357877550674305563183865792744445601224970373805346735988344847987303772917155627939948275878697780269822512410680975751300644967399011559837869483582429262545760441341171144409909232083024706624771222873986622339663191335540682429994265917887874699294499044
  4. Apr 16, 2010 #3
    Right, how exactly did it generate that? Is there no way of doing it myself to a reasonable degree of accuracy, or do I have to let a computer do it?
  5. Apr 16, 2010 #4


    User Avatar
    Science Advisor
    Homework Helper

    Brent's algorithm, I think.

    You can use Newton's method or the secant method by hand. Each step of Newton's method roughly doubles the number of correct digits, so if you start with 3.14 (2 correct digits) you should be able to get to 4 digits in one step, 8 in 2 steps, 16 in 3 steps, etc.

    But this is like asking how to calculate a square root or a logarithm by hand. There are methods, but beyond just a few digits most people use a calculator or computer for convenience.
  6. Apr 16, 2010 #5
    Very gullible indeed! That's over 1 % error. Engineers won't even accept that anymore.

    Next time try telling him pi^3 = 31. Now that's only just over 0.02 % error. You can at least fool the engineers with that one. :wink:
  7. Apr 16, 2010 #6
    Should have rephrased that, I told him that's how pi was generated and that pi^pi is exactly 36. The sum itself just equalling that wouldn't be a very elaborate prank, haha.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook