cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

is there a way to get the Lamberth W function?

WalterSchrabmai
12-Amethyst

is there a way to get the Lamberth W function?

HI,

We would need the Lambert W function. IN Mathematica it is ProductLog(x) and in Maple W.

When could this important function be get in Mathcad 15 or Prime ?

Thanks

Walter

ACCEPTED SOLUTION

Accepted Solutions

WALTER SCHRABMAIR wrote:

HI,

We would need the Lambert W function. IN Mathematica it is ProductLog(x) and in Maple W.

When could this important function be get in Mathcad 15 or Prime ?

Thanks

Walter

It already exists in Mathcad 15 ...

Stuart

View solution in original post

17 REPLIES 17

Found: https://community.ptc.com/t5/PTC-Mathcad/Lambert-s-W-function/m-p/298293#57489

But unfortunately it`s just an approximation, but a good one.

Thanks

For those interested - the article in the attachment.

Hi,

You can use the following built-in Mathcad functions:

  • LambertW(x) - Lambert's W function;
  • LambertW(n,x) - nth branch of Lambert's W function. Note that LambertW(x) = LambertW(0,x).

And this themes may also be of interest to you:

Lambert Function

Lambert's W function

Thanks Vladimir!

Walter,

Please change the "Correct Answer" is not to introduce other people astray (which will also look for the answer to this question in the future).

WALTER SCHRABMAIR wrote:

HI,

We would need the Lambert W function. IN Mathematica it is ProductLog(x) and in Maple W.

When could this important function be get in Mathcad 15 or Prime ?

Thanks

Walter

It already exists in Mathcad 15 ...

Stuart

Thanks a lot!!!!! Greetings, Walter

No problem, Walter.  Although I think Werner's solve block solution is probably a better route to go for repeated working within a worksheet (eg, for large vectors) as the symbolic solution occupies quite a bit of space (alternatively, put LambertW evaluations into an Area and hide the Area).

Stuart

Is was already said that LambertW exists in Mathcad for symbolic evaluations and that we can use it for numeric evaluations in some way.

I remember threads a long time ago where it was tried to create true numeric functions based on functions which only are available in the  symbolics, like LambertW.

As far es I remember there was no real success as ever so often we would experience rather strange effects.

Here is one try which on first sight looks pretty OK

But trying to uses this function in a plot fails

On further investigation it gets really strange

Sometimes there is a workaround using a dummy numeric eval, but its pretty clear, that LW() can't be used as a normal numeric function

So I guess that it will be often the better choice to use a user written function like the one of Stuart you referred to.

Maybe even a solve block function would do the job in a satisfactory way (the following at least for arguments greater that -1/e so the result is real)

Werner

Dear Werner,

I really can not share your expericence. I did a normal Range Var and got right values. See: LambertW_Mathcad15.gif

Ok Werner, I saw you did a Y := here


Sometimes there is a workaround using a dummy numeric eval, but its pretty clear, that LW() can't be used as a normal numeric function


That is what I did originately.

So your bug did not come up at my sheet. Thanks for your investigation.

WALTER SCHRABMAIR wrote:

Ok Werner, I saw you did a Y := here


The important thing here is the numeric inline evaluation after the assignment ->  Y:=Y=

So your bug did not come up at my sheet.

As explained above thats  because your arguments are float values, forcing the symbolic into float mode.

Guess with real world problems you won't experience the problem you get into when all arguments are integer. But you should be prepared anyway.

WE

WALTER SCHRABMAIR wrote:

Dear Werner,

I really can not share your expericence. I did a normal Range Var and got right values. See:

First the main goal I mentioned in my reply was to create a function (LW in my example) based on the symbolic LambertW which could be used in every situation like any other numeric function. This seems not to be possible.

BTW, the expression you show works (as does Stuarts example here) because your argument values are float values which forces the symbolic evaluation not just the display) in float mode.

It does not work if the arguments are all integers unless you manually force float mode.

If only one value is non-integer, symbolic evaluation is automatically forced in float mode (a nasty and annyoing "feature" of muPad) and so it works.

But as you can see in the following example, creating the vector y in a different way (it would work OK with any numeric function) fails

So the conclusio is that using symbolic-only function for numeric calculations/plots is unreliable and the effects are to some extent unpredictable.

Furthermore Stuart already mentioned another problem you may run into if you have large vector. The symbolic eval always would display the full vector in matrix mode with no way to collapse. Only way to deal with that woul be to put this symbolic eval in a collapsed area to keep it out of the way.

WE

ok, Werner, I have understood it, thanks for the clear and simple explanantions.

One more Question to my problem. IN Mathematica I can solve the following, but how it is done in MathCad 15?

omega_mma.gif

I found the solution with odesolve, sorry. but is there a way so show the symbolic solution like in MMA? MathCad_Solution.gif

Announcements

Top Tags