2
$\begingroup$

This question already has an answer here:

What are the roots of $ x^{2} = 2^{x} $? I drew the graphs and found $ x = 2 $ and $ x = 4 $, and there is one other root in $ [-1,0] $. Can anyone describe an algebraic method to obtain all roots?

$\endgroup$

marked as duplicate by user147263, Mark Viola, Claude Leibovici calculus Dec 1 '15 at 7:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    $\begingroup$ This question was already asked here. There is no nice formula to get the solution. You either need numerical methods or the Lambert-W-Function. $\endgroup$ – Peter Nov 30 '15 at 19:03
  • $\begingroup$ The negative solution is $-0.7666646959621230931112044225$ $\endgroup$ – Peter Nov 30 '15 at 19:05
2
$\begingroup$

Taking the logarithm and assuming $x>0$,

$$2\ln(x)=x\ln(2),$$ or $$\frac{\ln(x)}x=\frac{\ln(2)}2.$$

The derivative of the LHS is $$\frac{1-\ln(x)}{x^2},$$ which has a single root at $x=e$.

As there is a single extremum and the function is continuous, the equation

$$\frac{\ln(x)}x$$has at most two roots, which you found.


For negative $x$, the equation turns to

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

As the LHS function is positive only on one side of the extremum, there is at most one negative root. This root exists as the function goes to $\infty$, but it has no closed form.

$\endgroup$
  • $\begingroup$ With this method, we do not get the negative solution. $\endgroup$ – Peter Nov 30 '15 at 19:07
  • $\begingroup$ It has at most two positive solutions. But if $x<0$ then $\ln(x^2)$ is defined and $\ln(x)$ is not, so $\ln(x^2)=2 \ln(x)$ fails there. $\endgroup$ – Ian Nov 30 '15 at 19:07
  • $\begingroup$ That's right, should be $2\ln(|x|)$. $\endgroup$ – Yves Daoust Nov 30 '15 at 19:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.