# Lambert W Function Calculator

Lambert Function Calculator
x = W(x)eW(x)
x =
W(x) =

The Lambert W function W(x) is defined by the relation

x = W(x)eW(x).

In other words, the Lambert function is the inverse of the function

f(x) = xex,

so W(x) = f-1(x).

The domain of the Lambert W function is [-1/e, ∞) and the range is (-∞, ∞). However, when x is in the interval (-1/e, 0), the function returns two values of W(x), so the complete Lambert function is not a true function in the strictest sense.

To make the Lambert W function a true function, mathematicians split it into two branches, both of which are one-to-one. W0(x) denotes the upper part of the Lambert function whose domain is [-1/e, ∞) and range [-1, ∞). W-1(x) denotes the lower part of the Lambert function whose domain is (-1/e, 0) and range (-∞, -1).

### Evaluating W(x)

Because the inverse of the function f(x) = xex cannot be expressed in terms of elementary functions, analysts use numerical algorithms to evaluate the Lambert W function at a value of x. The calculator above computes W(X) for any x value in the interval [-1/e, ∞). If x is within the sub interval (-1/e, 0), the calculator returns two values. In this case, the greater value is W0(x) and the lesser value is W-1(x).

Some particular values of W(x) are:

W(-1/e) = -1
W(0) = 0
W(e) = 1
W(2e²) = 2

### Special Properties of W(x)

The Lambert W function satisfies the functional relations

W(x) = xe-W(x) and
eW(x) = x/W(x).

Using the technique of implicit differentiation, you can find the first and second derivatives of W(x), which are

W'(x) = W(x)/[x + xW(x)]
W"(x) = -[2W(x)2 + W(x)3]/[x2(1 + W(x))3].

Using the substitution x = zez, w(x) = z, and dx = (zez + ez)dz, you can evaluate integrals involving W(x):

∫W(x) dx = xW(x) - x + x/W(x) + C
∫W(x)/x dx = 0.5W(x)2 + W(x) + C
∫x/W(x) dx = x2[1/(2W(x)) + 1/(4W(x)2)] + C

### Uses of W(x)

The Lambert function arises in many physics and engineering applications. From a mathematical standpoint, the W function can be used to express the solution(s) of other inversion problems.

For example, consider the function A(x) defined by the relation x = 2A(x) + LN[A(x)]. (A(x) is the inverse of the function f(x) = 2x + LN(x).) With the following steps, we can express A(x) in terms of W(x):

x = 2A(x) + LN[A(x)]
ex = A(x)e2A(x)
2ex = 2A(x)e2A(x)
which implies that
2A(x) = W(2ex)
A(x) = 0.5W(2ex)

Here are four more examples with the functions
B(x) defined by x = B(x)2eB(x),
C(x) defined by x = C(x)LN[C(x)] + 3,
D(x) defined by x = D(x) + 2D(x),
E(x) defined by x = E(x)E(x)

* * * * * * * * * *

x = B(x)2eB(x)
x0.5 = B(x)e0.5B(x)
0.5x0.5 = 0.5B(x)e0.5B(x)
which implies that
0.5B(x) = W(0.5x0.5)
B(x) = 2W(0.5x0.5)

x = C(x)LN[C(x)] + 3
x-3 = C(x)LN[C(x)]
x-3 = eLN[C(x)]LN[C(x)]
which implies that
LN[C(x)] = W(x-3)
C(x) = eW(x-3)

x = D(x) + 2D(x)
2x = 2D(x)22D(x)
2x = 2D(x)eLN(2)*2D(x)
LN(2)*2x = LN(2)*2D(x)eLN(2)*2D(x)
which implies that
LN(2)*2D(x) = W(LN(2)*2x)
2D(x) = W(LN(2)*2x)/LN(2)
D(x) = log2[W(LN(2)*2x)/LN(2)]

x = E(x)E(x)
LN(x) = E(x)LN[E(x)]
LN(x) = eLN[E(x)]LN[E(x)]
which implies that
LN[E(x)] = W(LN(x))
E(x) = eW(LN(x))