2
$\begingroup$

How to approximate

$y=\frac{W(e^{cx+d})}{W(e^{ax+b})}$

with (a) simple function(s)?

given $a=-1/\lambda_0$, $b=(\mu_0+\lambda_0)/\lambda_0$, $c=1/\lambda_1$, $d=(\mu_1+\lambda_1-1)/\lambda_1$ for positive $\mu_0,\lambda_0,\mu_1,\lambda_1$

where $W$ is a Lambert $W$ function, i.e., if $y=xe^x$ then $x=W(y)$

My problem is that I can not invert the function and get $x=f(y)$ alone and decided to go for some nice approximations.

Thanks alot for any help.

2 Answers 2

1

You could try to estimate $W(x)$ by using Newton-Raphson iteration, because $W(c)$ is the root of $x\exp(x)-c$:

$x_{n+1}= x_n-\frac{f(x_n)}{f'(x_n)} = x_n-\frac{x_n \exp (x_n)-c}{\exp(x_n)(x_n+1)} = \frac{c\exp(-x_n)+x_n^2}{x_n+1}$

and as $n$ is sufficiently large, we can get approximations for $W$ using only elementary functions.

Using this method, we can find $W(1)=\Omega = 0.567143\cdots$, starting with $x_0=1$ and keeping 6 places precision:

Iteration       Value         Error 1               0.683939      0.116795 2               0.577454      0.010310 3               0.56723       0.000086 4               0.567143      0.000000 
  • 0
    As a result finally I will have $4$ *strange* looking nonlinear equations with $4$ unknowns. Then I will think if I can solve them efficiently. At the moment, since I can not get $x$ as a function of $y$, I cannot get the densities as well. As a result I cannot get 4 nonlinear equations too. I can still run a brute search without having $x=f(y)$ but it is academically a bit weird to say, I am trying))2012-09-30
1

You need to specify better the sense of the approximation, and the range of values. For example:

>>> a= -5; b= 2 ; c= 8; d=3; >>> x=[1:20-0.5]/20; >>> plot(x,lambertw(e.^[c*x+d])./lambertw(e.^[a*x+b])) 

does not look almost linear to me.

enter image description here

Perhaps you want $b \gg |a|$, $d \gg c$ or something like that

  • 0
    I figured out that logarithm of $y$ seems almost linear. Perhaps I need to model the log of the function in a linear way?2012-09-30