# How to solve when x is an exponent and a base

Just out of curiosity, I was wondering how to solve for x in an expression of the form
ax = xb

It kinda tripped me out at first.

nicksauce
Homework Helper
There is no way in general to solve this kind of equation in terms of elementary functions.

You can try manipulating it to fit the lambert W function I think.

HallsofIvy
Homework Helper
You can try manipulating it to fit the lambert W function I think.
Yes. Taking the "b"th root of both sides, $(a^{1/b})^x= x$ so that $1= xe^{-(1/b)(ln a)x}$. Multiply on both sides by -(1/b)ln a: $-(1/b)ln a$$= (-(1/b)(ln a)x)e^{-(1/b)(ln a)x}$.

Letting y= -(1/b)(ln a)x, that becomes $ye^y= -(1/b)ln a$. Using the Lambert W function (which is defined as the inverse function to f(x)= xex) we have y= W(-(1/b)ln a).

Then $x= -\frac{b}{ln a}W(-(1/b)ln a)$

Letting y= -(1/b)(ln a)x, that becomes $ye^y= -(1/b)ln a$. Using the Lambert W function (which is defined as the inverse function to f(x)= xex) we have y= W(-(1/b)ln a).

Then $x= -\frac{b}{ln a}W(-(1/b)ln a)$

Is there any way to simplify this expression, or is this the bare bones? How would one procede to calculate this value?

CRGreathouse