# What are the roots of $x^{2} = 2^{x}$? [duplicate]

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?

## marked as duplicate by user147263, Mark Viola, Claude Leibovici calculus StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Dec 1 '15 at 7:07

• 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. – Peter Nov 30 '15 at 19:03
• The negative solution is $-0.7666646959621230931112044225$ – Peter Nov 30 '15 at 19:05

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.

• With this method, we do not get the negative solution. – Peter Nov 30 '15 at 19:07
• 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. – Ian Nov 30 '15 at 19:07
• That's right, should be $2\ln(|x|)$. – Yves Daoust Nov 30 '15 at 19:15