How to solve equations of this form: $x^x = n$?

How would I go about solving equations of this form:

$$ x^x = n $$

for values of n that do not have obvious solutions through factoring, such as $27$ ($3^3$) or $256$ ($4^4$).

For instance, how would I solve for x in this equation: $$x^x = 7$$

I am a high school student, and I haven't exactly ventured into "higher mathematics." My first thought to approaching this equation was to convert it into a logarithmic form and go from there, but this didn't yield anything useful in the end.

My apologies if this question has been asked and answered already; I haven't been able to find a concrete answer on the matter.


you can solve it using newton's method

$$ f(x) = x^x - 7 = 0 \Rightarrow f'(x) = x^x(\ln x+ 1) $$

now choose $ x_0 $ and let it be $ x_0 = 2 $

and use the formula $$ x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)} = x_n - \frac{x_n^{x_n} - 7}{x_n^{x_n}(\ln x_n + 1) }$$

now just evaluate $ x_1 $ by using $ x_0 $ then $ x_2 $ then $x_3 \cdots $ by a calculator and you'll find an approximation

$$ x_1 \approx 2.442962082 $$

$$ x_2 \approx 2.331852211 $$

$$ x_3 \approx 2.316698614 $$

$$ x_4 \approx 2.31645502 $$

$$ x_5 \approx 2.316454959 $$

$$ x_6 \approx x_5 $$

$$ x_7 \approx x_6 $$

$$ x \approx 2.316454959 $$

http://www.ugrad.math.ubc.ca/coursedoc/math100/notes/approx/newton.html

http://mathworld.wolfram.com/NewtonsMethod.html


Equations like $x^x=7$ often don't have ''nice'' solutions. Whenever you see something like $x^x$, something that you should think about is the Lambert W function. This is the function $W(x)$, implicitly defined by $z=W(z)e^{W(z)}$.

In your case, taking natural logs gives $x \log x=\log 7$. So $e^{\log x} \log x=\log 7$, so $\log x=W(\log 7)$, and finally $x=e^{W(\log 7)}$. The Lambert W function has many different branches, which is something sort of akin to the fact that when you take a square root you can choose either the positive or negative square root. This means that there isn't a unique solution to your equation. You can get some families of solutions using Wolfram Alpha: http://www.wolframalpha.com/input/?i=x%5Ex%3D7.


You cannot express the solution of this equation in elementary functions. However, you can express the solution in terms of the Lambert $W$ function: http://en.wikipedia.org/wiki/Lambert_W_function . The $W$-function is defined by: $x = W(x)\cdot e^{W(x)}$.

Let $y = \ln x$. Write your equation as $e^{x \ln x} = n$, or equivalently $x \ln x = \ln n$, or $y e^y = \ln n$. Then $y = W(\ln n)$ and $x = e^y = e^{W(\ln n)}$.