7
$\begingroup$

How many real roots are there to $2^x=x^2$?

  • 0
    Another related question: http://math.stackexchange.com/questions/44206/how-many-points-in-the-xy-plane-do-the-graphs-of-y-x12-and-y-2x-intersect2011-08-09

7 Answers 7

11

An obvious solution is $x=2$.

If $2^x = x^2$, then $x\neq 1$ and $x\neq 0$. I'll treat the positive and negative cases separately.

If $x\gt 0$, then we get $x\ln(2) = 2\ln (a)$, or $\frac{x}{\ln x} = \frac{2}{\ln 2}$.

The derivative of $g(x) = \frac{x}{\ln x}$ is $\frac{\ln x - 1}{(\ln x)^2}$.

On $(1,\infty)$, the derivative is positive on $(e,\infty)$ and negative on $(1,e)$, so there is an absolute minimum at $x=e$, where the value is $e$; $\lim\limits_{x\to 1^+} g(x) = \lim\limits_{x\to\infty}g(x) = \infty$; since $\frac{2}{\ln 2}\gt e$, there are two values of $x$ where $g(x) = \frac{2}{\ln 2}$; one is $x=2$, which we had already found, the other is a value greater than $e$ (which as it happens is $4$).

On $(0,1)$, $g(x)$ is always negative, so there are no values where $g(x)=\frac{2}{\ln 2}$.

So for $x\gt 0$, there are two solutions.

For $x\lt 0$, the equation $2^x = x^2$ is equivalent to the equation $\left(\frac{1}{2}\right)^a = a^2$, where $a=-x\gt 0$. This time, the equation is equivalent to $\frac{a}{\ln a} = -\frac{2}{\ln 2}$. There are no solutions for $a\gt 1$, since $g(x)$ is positive there. On $(0,1)$, g'(x)\lt 0, so the function is strictly decreasing; we have $\lim\limits_{a\to 0^+}\frac{a}{\ln a} = 0$ and $\lim\limits_{a\to 1^-}\frac{a}{\ln a} = -\infty$, so there is one and only one value of $a$ for which $\frac{a}{\ln a} = -\frac{2}{\ln 2}$. Thus, there is one value of $x\lt 0$ which solves the equation.

In summary, there are three real solutions: one lies in $(-1,0)$, the second is $2$, and the third is $4$.

9

Explicitly, the third real solution (besides 2 and 4) is $- \frac{2 W(\ln(2)/2)}{\ln(2)}$, where $W$ is the Lambert W function.

5

Assuming that $x>0$, by taking logs of both sides and rearranging, we get that $ \frac{\log(x)}{x}=\frac{\log(2)}{2} $ Since $\frac{d}{dx}\frac{\log(x)}{x}=\frac{1-\log(x)}{x^2}$ vanishes only when $x=e$, and $\frac{\log(x)}{x}=\frac{\log(2)}{2}$ when $x=2$ and $x=4$, those are the only two positive solutions (i.e. the Mean Value Theorem says that $\frac{d}{dx}\frac{\log(x)}{x}$ vanishes between any two solutions).

For $x<0$, noting that $x^2=(-x)^2$, we have $ \frac{\log(-x)}{x} = \frac{\log(2)}{2} $ Since $\frac{d}{dx}\frac{\log(-x)}{x}=\frac{1-\log(-x)}{x^2}$ only vanishes at $x=-e$, there can be at most one solution in $(-e,0)$ and one in $(-\infty,-e)$.

For $x$ in $(-\infty,-e)$, $\frac{\log(-x)}{x}<0$ so there are no solutions in this range.

Since $\frac{\log(-(-1))}{-1}=0$ and $\frac{\log(-(-1/2))}{-1/2}=2\log(2)>\frac{\log(2)}{2}$, there must be a solution in $(-1,-\frac{1}{2})$, which is $x=-.766664695962123093111204422510$.

So to answer the question asked, there are three solutions.

  • 0
    @lhf: good point. I have now considered x<0 in my answer.2011-08-08
4

Go to Wolfram|Alpha and type $2^x=x^2$ (link)

enter image description here

  • 0
    I wanted to do that for my answer. =P +12011-08-08
4

To flesh out Robert's solution:

$x^2=\exp(x\ln 2)$

can be rearranged as:

$x^2 \exp(-x\ln 2)=1$

Take the appropriate square root of both sides:

$x \exp\left(-x\frac{\ln 2}{2}\right)=-1$

multiply both sides with the appropriate factor:

$-x \frac{\ln 2}{2}\exp\left(-x\frac{\ln 2}{2}\right)=\frac{\ln 2}{2}$

invoke the Lambert function:

$-x \frac{\ln 2}{2}=W\left(\frac{\ln 2}{2}\right)$

and Bob's your uncle:

$x=-\frac{2}{\ln 2}W\left(\frac{\ln 2}{2}\right)$

Also,

$-\frac{2}{\ln 2}W\left(-\frac{\ln 2}{2}\right)=2$

and

$-\frac{2}{\ln 2}W_{-1}\left(-\frac{\ln 2}{2}\right)=4$

where $W_{-1}(x)$ is the other branch of the Lambert function that is real in the interval $[-1/e,0)$

  • 1
    so I better not worsen your by mentioning I had to look for it first... but then again I'm always eager to learn new things by randomly browsing questions here :)2011-08-10
3

you have 3 roots:

You can put your equation 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} - \frac{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} - \frac{(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 roots.

I hope this helps

0

By drawing the graphs of both functions, we can easily guess that there are three. What the roots actually are, I don't know, but at least I can answer your question.

To prove this, one might want to use Rolle's Theorem on the function $f(x) = 2^x - x^2$ to show the existence of the third $0$, which is the non-trivial one (the first two are $x=2$ and $x=4$). Just notice that $f(0) = 1$ and say $f(-100) < 0$, hence there exists a zero between those points. Since the derivative of $f$ is strictly positive in the interval $(-\infty, 0)$, this is the only one in this interval.

  • 0
    It's trivial in the sense that if I tell you "this guy is a root" you can look at me and say "yes". The third root is non-trivial in the sense that I can't do that. =P This is usually the sense of the trivial word in general contexts. If proving that something works doesn't require any argument, it is said to be trivial in general. Trivial does not mean "easy to find", it means "does not require proof in the context"... anyway, those are my perceptions of the word. I believe there are $\infty$ posts about the word "trivial" on every math forum in the world. =P2011-08-08