lambertV, lambertW -- lower and
upper real branch of the Lambert function
IntroductionFor real x, the values y=lambertV(x) and y=lambertW(x) represent the real solutions of the equation y*exp(y)=x.
Call(s)lambertV(x)
lambertW(x)
Parametersx |
- | an arithmetical expression |
Returnsan arithmetical expression.
Side
EffectsWhen called with a floating point argument, the functions are
sensitive to the environment variable DIGITS which determines the numerical
working precision.
DetailsFor all real x in the range 0>x>-exp(-1), there are exactly two real solutions. The larger one is represented by y=lambertW(x), the smaller one by y=lambertV(x).
Exactly one real solution lambertW(-exp(-1))=lambertV(-exp(-1))=-1 exists for x=-exp(-1).
lambertW is defined for real
arguments from the interval [-exp(-1),infinity). It is
monotonically increasing, attaining values in the interval
[-1,infinity).
The lower branch lambertV is defined for real arguments
from the interval [-exp(-1),0). It is monotonically
decreasing, attaining values in the interval
[-1,-infinity).
lambertV(0)=-infinity and
lambertW(0)=0 are implemented. Further, the
result y is returned for some exact arguments of the form
x=y*exp(y). For real floating point arguments from the range
of definition a floating point value is returned. For all other
arguments, unevaluated function calls are returned.float attributes
are kernel functions, i.e., floating point evaluation is fast.
Example
1We demonstrate some calls with exact and symbolic input data:
>> lambertV(-4), lambertW(-3), lambertV(-5/2), lambertW(1/2), lambertV(I), lambertW(1 + I), lambertV(x + 1)
lambertV(-4), lambertW(-3), lambertV(-5/2), lambertW(1/2),
lambertV(I), lambertW(1 + I), lambertV(x + 1)
Some exact values are found:
>> lambertV(-exp(-1)), lambertW(-2*exp(-2)), lambertV(-3/2*exp(-3/2)), lambertW(exp(1)), lambertW(2*exp(2)), lambertW(5/2*exp(5/2))
-1, -2, -3/2, 1, 2, 5/2
Floating point values are computed for floating point arguments:
>> lambertV(-0.3), lambertW(2000.0)
-1.781337024, 5.836731495
The following arguments are not from the range of definition and lead to unevaluated calls:
>> lambertV(-1.0), lambertW(-0.4), lambertV(0.1), lambertV(exp(1)), lambertV(5*exp(5))
lambertV(-1.0), lambertW(-0.4), lambertV(0.1),
lambertV(exp(1)), lambertV(5 exp(5))
Example
2The functions diff and float handle expressions involving the
Lambert function:
>> diff(lambertV(x), x), diff(lambertW(x), x)
lambertV(x) lambertW(x)
-------------------, -------------------
x (lambertV(x) + 1) x (lambertW(x) + 1)
>> float(ln(3 + lambertW(sqrt(PI))))
1.334475971
Background