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

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)}$.