
The W function is defined as the inverse of f(x)=x e^{x}, which means
x = W(x e^{x})
and
z = W(z) e^{W(z)}
You can think of it as a kind of "log" function. In fact, Mathematica calls the function "ProductLog".
Starting with the definition z = W(z) e^{W(z)}, you can divide both sides by W(z), giving you this useful identity:
z/ W(z) = e^{W(z)}
This is a handy factoid, because sometimes (as we will see) we get a solution that looks like e^W(something), which now we know is the same as something/W(something). We'll use this in the last step of example 2, below.
To solve equations involving exponents, the trick is to get the variables all on the right side, and then manipulate the right side until the equation looks something like
a = b e^{b}
Then you "take the W of both sides", giving you
W(a) = b
To solve the equation 2^{t}=5t, we divide by 2^{t} to get
1 = 5t 2^{t}
1 = 5t e^{ln(2)t}
then multiply by ln(2)/5 to get
ln(2)/5 = ln(2)t e^{ln(2)t}
Now the right hand side is in that special form that looks like b e^{b}, so we "take the W of both sides" giving us
W(ln(2)/5) = ln(2)t
t = W(ln(2)/5)/ln(2)
For this problem, which I will generalize to x^{x}=z, the trick is to express x as e^{ln(x)}. Here are the steps:
x^{x} = z
(e^{ln(x)})^(e^{ln(x)}) = z
e^{ln(x) e^ln(x)} = z
ln(x) e^{ln(x)} = ln(z)
ln(x) = W(ln(z))
x = e^{W(ln(z))}
x = ln(z)/W(ln(z))
So the solution to x^{x}=16 is ln(16)/W(ln(16)), or about 2.74536802356746.

This is a problem that comes up in connection with the value of i^i^i^...
As is our custom, let's solve the more general problem, a^z=z, where a is any constant.
a^{z} = z
a^{z} = 1/z
z a^{z} = 1
z e^{z ln(a)} = 1
z ln(a) e^{z ln(a)} = ln(a)
z ln(a) = W(ln(a))
z = W(ln(a))/(ln(a))
So, for our problem, in which ln(i) = i pi/2,
z = W(i pi/2)/(i pi/2)
z = (i 2/pi) W(i pi/2)
Approximate value: z = 0.4382829367270321 + 0.3605924718713855i
Wikipedia: Lambert W function,
Mathworld: Lambert WFunction
The webmaster and author of this Math Help site is Graeme McRae.