Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.8K Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:

Solve problem with the lambert W function?

Posted 6 years ago

I have facing a problem in solving the lambert W function in mathematica. I have generated the x values from lambert function but I cant get the solution .ProductLog",

\[Phi] = 0.5; \[Kappa] = 0.2; u = RandomReal[ {0, 1}, 10]; 
x = (1/\[Phi])*
   Log[(\[Kappa] - 1 + ((1 + \[Kappa])^2 - 4*\[Kappa]*u)^0.5)/(
    2*\[Kappa])] - (1/\[Phi]^2) - (1/\[Phi])*\!\(\*
ButtonBox["ProductLog",
BaseStyle->"Link",
ButtonData->"paclet:ref/ProductLog"]\)[-(1/\[Phi])*
     Exp[-(1/\[Phi])] ((\[Kappa] - 
       1 + ((1 + \[Kappa])^2 - 4*\[Kappa]*u)^0.5)/(2*\[Kappa]))]
POSTED BY: Maha haroon
2 Replies
Posted 6 years ago

Hi Maha,

there was a problem with whitespace characters and formatting likely caused by copying stuff from the documentation into the notebook. I fixed it below (it reads still the same):

\[Phi] = 0.5; \[Kappa] = 0.2; u = RandomReal[ {0, 1}, 10]; 

x = (1/\[Phi])*
Log[(\[Kappa] - 1 + ((1 + \[Kappa])^2 - 4*\[Kappa]*u)^0.5)/(
2*\[Kappa])] - (1/\[Phi]^2) - (1/\[Phi])* ProductLog[
-(1/\[Phi])*
Exp[-(1/\[Phi])] ((\[Kappa] - 

1 + ((1 + \[Kappa])^2 - 4*\[Kappa]*u)^0.5)/(2*\[Kappa]))]

It should run now OK.

Regards,

Michael

POSTED BY: Michael Helmle
Posted 6 years ago

Thank you so much Michael. God bless you!

POSTED BY: Maha haroon
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard