Intersection of an exponential function and a line

719 Views Asked by At

I am trying to solve an equation of the form $e^{x}=m \cdot x+b$. Ideally, I would like to have a solution as a closed form, although the exact method is escaping me as to how this can be done. How can I solve this kind of equation using a closed form, if at all?

1

There are 1 best solutions below

4
On BEST ANSWER

As qbert already commented, welcome to the wonderful world of Lambert function !

As the Wikipedia page will show you, a series of transformations would lead to $$x=-W\left(-\frac{1}{m}e^{-\frac{b}{m}}\right)-\frac{b}{m}$$ where $W(z)$ is the solution of $z=W(z)\, e^{W(z)}$.

Now, the problem is : how many solutions ?

Basically, you are looking for the zero(s) of function $$f(x)=e^x-mx-b$$ $$f'(x)=e^x-m$$ $$f''(x)=e^x >0\qquad \forall x$$ The first derivative could cancel for $x_*=\log(m)$; this could only happen if $m>0$. $$f(x_*)=-b+m(1- \log (m))$$ So, if $f(x_*) <0$, you would get two roots corresponding to different branches of Lambert function.