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

1-Newbie

## Symbolic evaluation (float) within function assignment?

I'm trying to use a floating point evaluation of the LambertW function, within the assignment of a numerically evaluated function, but once the argument to the LambertW function becomes dynamic (i.e. the numerical wrapper function's arguments passed into the symbolic LambertW function), the LambertW function turns red and shows the error "This variable is undefined." I've been searching the archives of this forum and I see a few posts with similar questions, specificallly pertaining to the polylog symbolic function, but frankly I don't understand the discrepancy yet. If anybody has time to check out the attached worksheet and give me some pointers, I'd appreciate the help. Thanks!

Update...

Been working on this... I still don't really understand the disconnect between the symbolic and numerical solver, but after searching this forum more, I found a few worksheets and posts that provided some insight into numerical evaluation of the LambertW function. Specifically, this post:

http://communities.ptc.com/message/58209#58209

Using examples in the worksheets attached to the above post, and with a little tweaking of the initial value for the root function, I came up with a solution to my function that appears to be working well (attached).

Thanks to everyone who's posted about this in the past - I learned a lot from browsing old posts!

4 REPLIES 4
24-Ruby IV
(To:spolak)

If you still would like to use the symbolic LambertW in your function f you can get it to work with a little trick using a local assignment:

You have to type the highlighted expression somewhere in you worksheet and copy it from there in your "program".

WE

24-Ruby IV
(To:Werner_E)

Just played around and found, that you do not need the local assignement and the dummy variable.

A normal bracket around the highlighted expression is all that is needed. You still have to copy and paste the expression with the symbolic evaluation

19-Tanzanite
(To:Werner_E)

My oft repeated warning:

The float keyword does not just change the precision of the displayed result. It changes the precision of the calculations. It should be used very sparingly!

1-Newbie
(To:spolak)

Thanks to everybody for the followup comments. Very insightful and interesting.

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."