Solve It Numerically
Date: 05/21/97 at 11:20:55 From: Nick Riviera Subject: Exponents and logs How do you solve the equation x^x = 100? It doesn't have to be 100, I just think that's a nice number. It can be any constant, just as long as there isn't a simple integer solution. I know that the answer is about 3.597285. I have tried everything, including taking logs. Thanks for your help.
Date: 05/27/97 at 15:29:47 From: Doctor Rob Subject: Re: Exponents and logs This equation seldom has an integer solution, never a rational one unless it is an integer. Thus, if you can't find an integer solution by inspection, you must solve it numerically. There are several ways to proceed, of which I will outline two. Rewrite the equation as x^x - 100 = f(x) = 0. Newton's method (yes, Sir Isaac Newton!) says to start with a guess at the answer, say x(0) = 4. Then from each guess, you compute a better one using the formula: x(n+1) = x(n) - f(x(n))/f'(x(n)), for every n >= 0 where f'(x) is the derivative of f(x) with respect to x. In your case, f'(x) = x^x*(1 + ln(x)), so the equation becomes: x(n+1) = x(n) - (x^x - 100)/[x^x*(1 + ln(x))] x(1) = 4 - (4^4 - 100)/[4^4*(1 + ln(4))] = 4 - 156/[256*2.38629] = 3.74464 This is a better approximation, so compute: x(2) = 3.620734188 x(3) = 3.597934158 x(4) = 3.597285529 x(5) = 3.597285024 x(6) = 3.597285024 The correct answer is approximately this last value (to 10 significant figures). If you don't understand derivatives (a topic in calculus), here is an alternate approach. Another iterative method is based on taking logarithms of both sides of the original equation. Then x*log(x) = log(100). Dividing both sides of the equation by log(x), you get: x = log(100)/log(x). Now guess x(0) = 4, and use the iteration formula: x(n+1) = log(100)/log[x(n)] x(1) = 3.321928095 x(2) = 3.835898515 x(3) = 3.425437005 x(4) = 3.740303368 As you can see, these values are alternately larger and smaller than the correct one, converging to it but more slowly than before. x(26) = 3.597892291 x(27) = 3.596810765 ... x(50) = 3.597286641 x(51) = 3.597283760 ... x(75) = 3.597285020 x(76) = 3.597285026 etc. Even better would be to use the average of x(n) and x(n+1) from the latter method: x(n+1) = (x(n) + log(100)/log[x(n)])/2 Here, with x(0) = 4, we get the answer in 10 steps: x(10) = 3.597285024 -Doctor Rob, The Math Forum Check out our web site! http://mathforum.org/dr.math/
Search the Dr. Math Library:
Ask Dr. MathTM
© 1994-2013 The Math Forum