I need to solve following equation for $w_1$:

$$\mu=\frac{w_2}{w_1+w_2}\times\left(1-e^{-(w_1+w_2)t}\right)\times N$$ when i use matlab solver to solve this eqution for $w_1$, the result is as follows: $$w_1=\frac{2\times t\times w_2 +\mu \times lambertw \left(0,-\frac{exp \left(\frac{-(2\times t \times w_2)}{\mu}\right)}{\mu}-\mu \times t\times w_2\right)}{\mu \times t}$$ my question is, what is exactly lambertw function and how can i evaluate above equation to find $w_1$ for specific $w_2$, $t$ and $\mu$? for example if $w_2=0.5$, $t=10$ and $\mu=20$, what is $w_1$? (Of course not using the matlab or other softwares)


i need to use above function in my java code. So, i cant use other softwares to evaluate it for specific values.

  • $\begingroup$ Read about it here. en.wikipedia.org/wiki/Lambert_W_function . There are online calculators that will find the value for particular inputs. Wolfram alpha is one. $\endgroup$ – Ethan Bolker Oct 31 '17 at 15:05
  • $\begingroup$ Lambert W Function : Wikipedia $\endgroup$ – Jaideep Khare Oct 31 '17 at 15:06
  • $\begingroup$ MATLAB's vpa function can be used to evaluate lambertw() to get a floating point value to any desired number of digits. $\endgroup$ – Brian Borchers Oct 31 '17 at 15:07
  • $\begingroup$ I have read this article, but I do not understand it so much. $\endgroup$ – Payam Abdy Oct 31 '17 at 15:11
  • 1
    $\begingroup$ Looks like you set $N=2$ and you made an error transcribing from Matlab to LaTeX. The linked Wikipedia article provides the basic algorithm for numerical evaluation. See also my answer here for efficient code for a particular regime (depends on your parameter values) and this article for basic general code – both should be easy to translate to Java. $\endgroup$ – horchler Nov 1 '17 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.