The Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

2^x = x^2

Date: 02/13/2002 at 23:26:33
From: Jeremy Kelly
Subject: Exponents

Recently I was trying to do some random math problems to get a little 
smarter when I came across something that I couldn't do. 

   2^x = x^2

I noticed first that there were 2 roots (2 and 4) but there was one 
that I didn't know of that was negative. Thinking that this was too 
obvious, I switched the problem to 5^x = x^2 and tried to solve. I 
took the ln of both sides and tried from there, but I didn't really 
know where to go. Using some big 'o' and such, I deduced that x had to 
be negative and there was only one Real value for x that worked, (and 
graphing proved that), but I didn't know how to find it without 
graphing it. If you could help that would be great.

Jeremy Kelly

Date: 02/14/2002 at 09:24:29
From: Doctor Rick
Subject: Re: Exponents

Hi, Jeremy.

I don't know of a way to solve your problem analytically, but I know a 
method by which we can find successively better approximations to the 
solution. It's called the Newton-Raphson method, and it can be 
understood from graphical considerations. Here is an explanation:

   Cow Grazing Half the Circle: Newton-Raphson Method   

Let's change your problem

   2^x = x^2 for what x?

into a function:

   f(x) = 2^x - x^2

Now the question is, for what x is f(x) = 0; or, what are the roots of 
f(x)? The Newton-Raphson method starts with some first guess, x[0], 
and finds the next guess, x[1], by a formula. Then, using this guess, 
we apply the same formula to find a new guess, x[2]. We continue until 
we're as close as we wish. The formula is

  x[i+1] = x[i] - f(x[i])/f'(x[i])

We need f'(x), the derivative of f(x). It is

  f'(x) = 2^x * ln(2) - 2x

Thus the formula for our problem is

  x[i+1] = x[i] - (2^x[i]-x^2)/(2^x[i]*ln(2)-2x)

You can set this up in a spreadsheet. Then try different first guesses 
x[0]. You'll find that the algorithm zeroes in on one of the three 
roots, depending on the starting value. If I start with x[0] = 0, I 
get the root:

  x = -0.766664696

after 5 iterations. You can verify:

  2^-0.766664696   = 0.587774756
  (-0.766664696)^2 = 0.587774756

If I start with x[0] = 1, I get the root x=2. If I start with 
x[0] = 3, I get the root x = 4. You have observed that there are three 

I'll leave the variant with 5^x, and others, up to you.

- Doctor Rick, The Math Forum   
Associated Topics:
High School Functions

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.