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

1. Apr 11, 2010

### JungleJesus

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.

2. Apr 11, 2010

### nicksauce

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

3. Apr 11, 2010

### Anonymous217

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

4. Apr 12, 2010

### HallsofIvy

Staff Emeritus
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)$

5. Apr 12, 2010

### JungleJesus

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

6. Apr 12, 2010

### CRGreathouse

There are numerical methods, like Newton's method or the secant method, that can give numerical values for the W function -- or even your original function directly. (If you just want the W function, there are optimizations that can be used to make it go faster.)