# Solving equations of the form $ae^x + bx +c =0$

In a recent piece of homework I needed to solve an equation of the form $ae^x + bx +c = 0$ where $a,b$ and $c$ are constants. I could not do it; no matter how I tried I either went in circles or hit a brick wall. Can someone demonstrate a general method for solving equations of this form? Please show every step in your answers.

• This article on exponential-linear equations focuses on these type of equations. – Arpan Apr 17 '15 at 7:10
• See there : math.stackexchange.com/questions/479776/solving-aebxcxd-0?rq=1 Short answer, there are no easy solution. – Paul Picard Apr 17 '15 at 7:10
• @PaulPicard Hmm. Well the solution can't be a complex number (since that wouldn't make sense in the context of the question), so I guess I've done something wrong. Thanks anyway :) – imulsion Apr 17 '15 at 7:13
• – Lucian Apr 17 '15 at 7:33
• @imulsion: Who said that there's only one solution ? And why, pray tell, can't at least some of them be complex ? And how on earth would you even know their nature, since the values of the three parameters are not even given ? – Lucian Apr 17 '15 at 7:41

\begin{align} a \exp(x)+b x+c&=0 \end{align} Substitute $bx+c=y$: \begin{align} a \exp((-c+y)/b)+y &= 0 \\ -y &= a\exp(-c/b)\exp(y/b) \\ -y/b\exp(-y/b) &= a/b\exp(-c/b) \end{align} The last equation is in the form $u\exp(u)=w$, which has a solution in terms of Lambert $W$ function: \begin{align} u&=W(w). \end{align} Hence \begin{align} -y/b&=W(a/b\exp(-c/b)) \\ y&=-b W(a/b\exp(-c/b)) \\ x&=-W(a/b\exp(-c/b))-c/b. \end{align} In particular, equation $88\exp(x)+12x-5=0$ with $a=88,b=12,c=-5$ has one real root, since the argument of $W$ is positive: \begin{align} x&=-W_0(22/3\exp(5/12))+5/12 \approx-1.3970513. \end{align}
As said, there is an analytical solution in terms of Lambert function $$x=-W(d)-\frac{c}{b}$$ where $$d=\frac{a }{b}e^{-\frac{c}{b}}$$ If you do not want to (or cannot) use Lambert function, then numerical methods are the way to go.
Probably the simplest should be Newton method which, starting from a "reasonable" guess $x_0$, will update it according to $$x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}$$ For the example you give in comments $$f(x)=5-12x - 88e^x$$ $$f'(x)=-12-88e^x$$ A look at the graph of the function shows that the solution is close to $-1.5$. So, let start iterating at $x_0=-1.5$; the method will generates the following iterates : $-1.393646353$, $-1.397047564$, $-1.397051301$ which is the solution for ten significant figures.