Finding root of function, possible Lambert function?

99 Views Asked by At

So this is my function, and I'm trying to find the root where f(x)=0:

$c_1-\frac{2}{c_2}(x+2)e^{-x/2}=0$

where $0< c_1\le1$ and $c_2\ge2$

This is what I got thus far:

$c_1c_2-2(x+2)e^{-x/2}=0$

$c_1c_2=2(x+2)e^{-x/2}$

$\ln(c_1c_2)=\ln(2(x+2)e^{-x/2})$

$\ln(c_1c_2)=\ln(2(x+2))+\ln(e^{-x/2})$

$\ln(c_1c_2)=\ln(2x+4)-x/2$

So I do not know where to go from here... I've read that you can use the lambert function but it requires the form $xe^x=c$, but I do not know how to transform the equation. I've thought about using Newton's method but it requires a 'close' enough initial guess; Usually I will use the bisection method as an initial guess but it requires a change of signs onto the interval, which you can see from the graph below, when $c_1=0.05$ and $c_2$ increases it becomes negative over its entire domain, so the definition of root, f(x)=0, becomes impossible to find

enter image description here

1

There are 1 best solutions below

1
On BEST ANSWER

Making $y = x+2$ we have

$$ c_1-\frac{4}{c_2}\frac{y}{2}e^{-\frac{(y-2)}{2}}=c_1-\frac{4}{c_2}\frac{y}{2}e^{-\frac{y}{2}}e = 0 $$

and then

$$ c_1 + \frac{4e}{c_2}\left(-\frac y2\right)e^{-\frac y2}=0\Rightarrow x = -2\left(1+W\left(-\frac{c_1c_2}{4e}\right)\right) $$

Note the pair $\left(-\frac y2\right)e^{-\frac y2}$