4

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.

imulsion
  • 869
  • 1
    This article on exponential-linear equations focuses on these type of equations. – Arpan Apr 17 '15 at 07:10
  • See there : http://math.stackexchange.com/questions/479776/solving-aebxcxd-0?rq=1 Short answer, there are no easy solution. – Sake Apr 17 '15 at 07: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 07:13
  • 1
  • @Lucian Like I say the solution can't be a complex number. I've done something wrong – imulsion Apr 17 '15 at 07:34
  • 1
    @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 07:41
  • @Lucian See my previous comment. Complex numbers do not make sense in the context of my homework question. – imulsion Apr 17 '15 at 07:42
  • @imulsion: The function has more than just one branch. The complex numbers in question may not be the only solutions. What are the values of a, b, and c ? – Lucian Apr 17 '15 at 07:50
  • Known a,b and c, can't we just easily plot and solve? – Jesse P Francis Apr 17 '15 at 07:55
  • @Lucian I have $5-12x = 88e^x$. I can solve it easily using the equations function on my calculator (the answer is about $0.303$), but I know that I need to use an algebraic method. As I've said, I've done something wrong. I'm only at A Level and that function is beyond my level of study. – imulsion Apr 17 '15 at 08:05
  • Solution in terms of Lambert W function (for approximate solutions use a Taylor expansion of the exponential), see: math.stackexchange.com/a/3658405/532409 – Quillo May 05 '20 at 10:14

2 Answers2

4

\begin{align} a e^{x}+b x+c&=0 \end{align} Substitute $bx+c=y$: \begin{align} a e^{((-c+y)/b)}+y &= 0 \\ -y &= ae^{-c/b}e^{y/b} \\ \frac{-y}{b}e^{-y/b} &= \frac ab e^{-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} \frac{-y}{b}&=W(\frac ab e^{(-c/b)}) \\ y&=-b W(a/b e^{\frac{-c}{b})} \\ x&=-W(\frac ab e^{-c/b})- \frac cb. \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(\frac{22}{3} e^\frac{5}{12}))+\frac{5}{12} \approx-1.3970513. \end{align}

Edit:

Lambert's W function is included in the Gnu Scientific Library (GSL) and is freely available by means of many computer systems and packages (wolframalpha, R, Asymptote, python scipy.special to name a few).

nickalh
  • 1,263
g.kov
  • 13,581
2

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.