W {LambertW} | R Documentation |
The Lambert W function W(z), W_1(z)
and its first derivative (d1W(z), d1W_1(z)
). For both the principal and non-principal branch. (These are wrapper functions for lambert_W0, lambert_Wm1
in the package gsl
.)
W(z) W_1(z) d1W(z) d1W_1(z)
z |
a numeric vector of real values. |
The Lambert W function W(z) is implicitly defined as the inverse function of
W(z) exp(W(z)) = z.
For z >=q 0 the solution is unique W(z)
.
For -1/e <=q z < 0 it has two solutions: the principal (W(z)
) and non-principal branch (W_1(z)
).
For z < -1/e no solution exists in the reals.
The derivative can be expressed as a function of W(z):
W'(z) = frac{1}{(1 + W(z)) exp(W(z)} = frac{W(z)}{z(1 + W(z))}, quad z neq 0, -1/e.
For details see the references.
Function value or NaN if z < -1/e.
Georg M. Goerg
Corless, R. M., G. H. Gonnet, D. E. G. Hare, and D. J. Jeffrey (1993). “On the Lambert W function”. preprint.
W(5) # exists in R W(-5) # does not exist in R W(-0.25) # the "reasonable" input event W_1(-0.25) # the "extreme" input event