Is it possible to solve this equation using the Lambert W function?

143 Views Asked by At

I came across an equation that needs to be solved while I was working on a school project. I've tried using the Lambert $W$ function to solve the following equation but I've had no success. Is it even possible to solve for $x$ without numerical methods?

$$ ax+(bx-c)e^{kx}=d $$

2

There are 2 best solutions below

0
On

It does not seem possible to solve this in general using Lambert W. It would be possible if $a$ or $b$ was $0$.

You might try a series solution if one of the parameters can be considered small. Thus a series in powers of $k$ is

$$ x = {\frac {c+d}{a+b}}+{\frac { \left( c+d \right) \left( ac-db \right) }{ \left( a+b \right) ^{3}}}k+{\frac { \left( c+d \right) \left( 3\,a c+ad-bc-3\,db \right) \left( ac-db \right) }{2\, \left( a+b \right) ^ {5}}}{k}^{2}+\ldots $$

0
On

From a formal point of view, you can do it.

Rewrite the equation as $$e^{-kx}=-\frac ba \,\,\frac{x-\frac{b}{c}} {x-\frac{d}{a} }$$ which has a solution in terms of the generalized Lambert function.

Just have a look at equation $(4)$ in the linked paper.

This is nice but not very useful from a practical point of view.

Since you will need a numerical method, you need at estimate to find the zero(s) of function

$$f(x)=ax+(bx-c)e^{kx}-d$$. The first derivative being $$f'(x)=a+e^{k x} (b k x+b-c k)$$ it cancels at $$x_*=\frac{W\left(t\right)}{k}+\frac{c}{b}-\frac{1}{k}\qquad \text{where} \qquad t=-\frac{a }{b}e^{1-\frac{c k}{b}}$$ If $x_*$ exists, perform a Taylor expansion around this point to get as an estimate $$x_0=x_* \pm \sqrt{-2 \frac {f(x_*)}{f''(x_*)}}$$

Let us try with $a=1$, $b=2$, $c=3$, $d=4$, $k=5$.

This will give $$x_*=\frac{1}{10} \left(2 W\left(-\frac{1}{2 e^{13/2}}\right)+13\right)\approx 1.29985$$

Then $x_0=1.58434$ while the exact solution is $x=1.50069$.

Since we have $x_0$, let us look at Newton method iterates; they will be $$\left( \begin{array}{cc} n & x_n \\ 0 & 1.58434 \\ 1 & 1.52533 \\ 2 & 1.50339 \\ 3 & 1.50072 \\ 4 & 1.50069 \end{array} \right)$$