Site map 

 Contact Graeme 

 Skip Navigation LinksMath Help > Basic Algebra > Simplifying > Lambert W Function

Simplifying Exponential Equations Using Lambert W Function

The Basic Idea

The W function is defined as the inverse of f(x)=x ex, which means

x = W(x ex)


z = W(z) eW(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) eW(z), you can divide both sides by W(z), giving you this useful identity:

z/ W(z) = eW(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 eb 

Then you "take the W of both sides", giving you

W(a) = b

Example 1: Solve for t, 2t=5t

To solve the equation 2t=5t, we divide by 2t 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 eb, so we "take the W of both sides" giving us

W(-ln(2)/5) = -ln(2)t 
t = -W(-ln(2)/5)/ln(2)

Example 2: Solve for x, xx=16

For this problem, which I will generalize to xx=z, the trick is to express x as eln(x). Here are the steps:

xx = z
(eln(x))^(eln(x)) = z
eln(x) e^ln(x) = z
ln(x) eln(x) = ln(z)
ln(x) = W(ln(z))
x = eW(ln(z))
x = ln(z)/W(ln(z))

So the solution to xx=16 is ln(16)/W(ln(16)), or about 2.74536802356746.

Example 3: Solve iz=z

Depiction of  i,  i^i,  i^i^i,  ...,  which
converges on z, the solution of iz=z

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.

az = 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 

Internet references

Wikipedia: Lambert W function
Mathworld: Lambert W-Function  

Related pages in this website

Partial Fractions


The webmaster and author of this Math Help site is Graeme McRae.