# How to solve strange exponential equation?

How would equations of the form

$b^x-x^a=0$ be solved for $x$, given $a$ and $b$? For instance, specifically, how would

$2^x=x^2$ be solved? Does a method exist?

-
The only access we have to most real numbers is by approximating them using rational numbers. Thus the only access we have for the solutions for most equations is approximating them using rational numbers. Approximation is always a method, and usually the only method. –  Mlazhinka Shung Gronzalez LeWy Sep 12 '13 at 3:09

Beginning with $$b^x=x^a$$ and writing $b^x=e^{x\ln b}$: $$1=xe^{-x\frac{\ln b}{a}}.$$ Multiplying both sides by $-(\ln b)/a$ yields $$-\frac{\ln b}{a}=\left(-x\frac{\ln b}{a}\right)e^{-x\frac{\ln b}{a}}.$$ Therefore $$W\left(-\frac{\ln b}{a}\right)=-x\frac{\ln b}{a}$$ where $W$ is the Lambert W function and so $$x=-\frac{a}{\ln b} W\left(-\frac{\ln b}{a}\right).$$ This can be confirmed by Wolfram Alpha.