2

How can I find the point of intersection between a function like $2^x$ and $x^2$?

I know you have to equate them but I don't know what to do after that.

Sam Houston
  • 2,277
Neel Shah
  • 383

5 Answers5

3

There is no general "algebraic" method for finding the roots of a polynomial/exponential equation $r^x = ax^2 + bx + c,$ where $a,b,c,r$ are constants with $r>0.$ Numerical methods such the Bisection or Newton's method as can be used to estimate the location of the root,

However, for your example 2^x = x^2, a guess of $x=2$ seems to do the trick.

  • x=4 works as well. However, there should be a negative solution as well, when the graph is taken into consideration. What is the newton or bisection method? – Neel Shah Apr 23 '15 at 18:17
  • @NeelShah
    http://en.wikipedia.org/wiki/Newton%27s_method#/media/File:NewtonIteration_Ani.gif
    – jameselmore Apr 23 '15 at 18:25
1

You are right, you have to equate them and after that you have (obv) to solve for x, easy to say but hard to do in those cases so you have two choices: 1) approximate the result (I'm not an expert but a quick google will show you a lot of ways to do this) 2) use special functions like Lambert's one (which is omnipresent wherever exponentials are).

Let me show you how to use it in this case:

$$2^x=x^2$$

Take natural log on both sides:

$x\ln2=2\ln x$

divide for $2x$ (assuming $x$ nonzero):

$\frac {\ln 2} 2=\frac {\ln x} x$

Now rewrite $x$ as $e^{\ln x}$ and multiply by $-1$

$-\frac {\ln 2} 2=-\ln (x)e^{-\ln x}$

Lambert's $W$ (Omega) functuion is defined as:

$$W(x)e^{W(x)}=x$$

So you have that:

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

Which leads you to:

$$x=e^{-W(-\frac {\ln 2} 2)}$$

This is a very complicated way to solve a problem which solution is trivial but this way is very general and can help you to solve a lot of harder problems similar to your!

Note that when the argument of the Lambert's function is negative you have more than only one solution (as you probably expected) and, with a little more study of this function you can even find complex solutions!

AlienRem
  • 4,011
0

Another way to reformulate the equation for solution by numerical methods is to transform it into a fixed point equation $f(x) = x$. For non-negative $x$ we have: $$ 2^x = x^2 \Rightarrow\\ 2^{x/2} = x $$ For negative $x$ it is $$ -2^{x/2} = x $$ For this kind of equation there exist solution methods, the simplest one the iteration $x_n = f^n(x_0)$

BTW: Just plotting either equation reveals the positive solutions $x=2$ and $x = 4$ and some negative solution around $-0.77$.

mvw
  • 34,562
0

The equation : $2^x=x^2$ has two obvious soutions for $x=2$ and $x=4$.

We can verify that for $x>4$ the two function $f(x)=2^x$ and $g(x)=x^2$ are such that and $f'>g'$ so they have no other intersections for $x>4$.

For $-1\le x \le 0$ we can see that $f(-1)=1/2$, $g(-1)=1$, $f(0)=1$ $g(0)0$, so, since the two function are contiuous in this interval , there is atleast one other solution between $-1$ and $0$, and an inspection to hte graph of the two function confirm that there is a unique solution that is near $x=0.766..$

Emilio Novati
  • 62,675
0

As said in answers, there are two trivial roots $x=2,x=4$ and the extra one is given in terms of Lambert function.

If you do not want (or cannot) use Lambert function, only numerical methods could do the work. Probably the simplest is Newton which, starting at a "reasonable" guess $x_0$, will update it according to $$x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}$$ Let us try $f(x)=2^x-x^2$ and, because I am lazy, let me start with $x_0=0$. The iterates will be $-1.44270$, $-0.897065$, $-0.773470$, $-0.766685$, $-0.766665$ which is the solution for six significant figures.

Starting with $x_0=-1$ would have provided as iterates : $-0.786923$, $-0.766843$, $-0.766665$.

The second sequence does not show any overshoot of the solution because $$f(-1)f''(-1)=1-\frac{\log ^2(2)}{4}>0$$ while $$f(0)f''(0)=\log ^2(2)-2<0$$ If I properly remember, this condition corresponds to some theorem by Darboux.

Edit

You can generate a good starting point from Taylor series built at $x=0$ $$f(x)=1+x \log (2)+x^2 \left(\frac{\log ^2(2)}{2}-1\right)+O\left(x^3\right)$$ If you just keep the first order, you then have $x_0=-\frac{1}{\log (2)}$ we already obtained in the first path; but, using the second order and solving the quadratic, you obtain $$x_0=\frac{\sqrt{4-\log ^2(2)}-\log (2)}{\log ^2(2)-2} \approx -0.778455$$