# How to solve exponential equation of $x + e^{-x }= 3$?

I've got the following equation:

$$\lambda + e^{-\lambda} = 3$$

$$3 - \lambda = \frac{1}{e^{\lambda}}$$

$$\frac{1}{3-\lambda} = e^{\lambda}$$

Now, I take the natural log of both sides:

$$ln(\frac{1}{3-\lambda}) = \lambda$$

$$ln(1) - ln(3-\lambda) = \lambda$$

Since $$ln(1)$$ is zero,

$$-ln(3 - \lambda) = \lambda$$

I get to this part of the equation and I feel stuck and that I cannot simplify and solve for lambda even more. Could someone help me? Obviously I can use a graphing calculator to find the solution (2.9475309 I believe being one of them), but I would like to learn how to solve this by hand as well. Thank you in advance.

• You will need a numerical method – Dr. Sonnhard Graubner Apr 10 at 16:20
• This isn't solvable with just conventional arithmetic, exponentials and logarithms. You need the Lambert $W$ function. – Arthur Apr 10 at 16:21

This is an example of equation, for which we know there is an explicit solution in terms of well-known Lambert $$\operatorname{W}$$ function.

\begin{align} x + \exp(-x)&= 3 \tag{1}\label{1} ,\\ x\exp(x) + 1&= 3\exp(x) ,\\ x\exp(x)-3\exp(x)&=-1 ,\\ (x-3)\exp(x)&=-1 ,\\ (x-3)\exp(x-3+3)&=-1 ,\\ (x-3)\exp(x-3)\exp(3)&=-1 ,\\ (x-3)\exp(x-3)&=-\exp(-3) . \end{align}

The last expression is ready to apply the Lambert $$\operatorname{W}$$ function:

\begin{align} \operatorname{W}((x-3)\exp(x-3))&=\operatorname{W}(-\exp(-3)) ,\\ x-3&=\operatorname{W}(-\exp(-3)) ,\\ x&=3+\operatorname{W}(-\exp(-3)) \tag{2}\label{2} . \end{align}

Equation \eqref{2} provides a general solution in terms of Lambert $$\operatorname{W}$$ function, and since we are interested in real solutions, we need to check the argument of $$\operatorname{W}$$.

In this case it is $$-\exp(-3)$$, which is between $$-\exp(-1)$$ and $$0$$. This condition guarantees that there are two real solutions, corresponding to so-called branches of the Lambert $$\operatorname{W}$$ function, which has special names $$\operatorname{W_{0}}$$ and $$\operatorname{W_{-1}}$$:

\begin{align} x_0&=3+\operatorname{W_{0}}(-\exp(-3)) \approx \phantom{-}2.94753090254 ,\\ x_{-1}&=3+\operatorname{W_{-1}}(-\exp(-3)) \approx -1.50524149579 . \end{align}

Newton-Raphson method may be handy here for finding numerical solutions. Define $$f(x)=x+e^{-x}-3$$. Notice that we're actually solving $$f(x)=0$$.

$$x_{n+1}=x_n-\dfrac{x_n+e^{-x_n}-3}{1-e^{-x_n}} \land x_0=3$$

$$\begin{array}{|p{3cm}||p{3cm}|p{3cm}|p{3cm}|}\hline n & x_n \\ \hline 0 & 3 \\ 1 & 2.94760430351\\ 2& 2.94753090269\\3&2.94753090254\\\hline \end{array}$$

There is also a negative solution existence of which somehow makes sense because of the $$e^{-x}$$ term. As $$x$$ decreases, $$e^{-x}$$ increases. In fact it calls for the existence of a value such that $$x$$ decreases and $$e^{-x}$$ increases in such a way that they nullify the $$+3$$ term of the equation providing a negative solution.

Let $$x'$$ denote the second solution. Again using the first iteration formula but now with $$x'_0=-3$$. We get the following iterations: $$\begin{array}{|p{3cm}||p{3cm}|p{3cm}|p{3cm}|}\hline n & x'_n \\ \hline 0 & -3 \\ 1 & −2.26197848246\\ 2& −1.75743824023\\3&−1.54063495725\\\hline \end{array}$$

Aliter:

We can do a substitution of variables to make it satisfy being of the form wherein we can use Lambert's $$W$$ function.

Let $$-t=x-3$$. Now we have $$tp^t=e^3$$ which has solution $$t=-W(-e^3)$$ and so $$x$$ is $$3-t$$ or simply $$x=3+W(-e^3)$$.

Considering that you look for the zero's of $$f(x)=x+e^{-x}-3$$ notice that the fist derivative cancels at $$x=0$$. To have an idea about the location of the roots, perform a Taylor expansion to get $$f(x)=-2+\frac{x^2}{2}+O\left(x^3\right)$$ Ignoring higher order terms, this gives as approximate solutions $$x_{\pm}=\pm 2$$ that you can use as starting guesses for Newton method $$\left( \begin{array}{cc} n & x_n \\ 0 & 2.00000 \\ 1 & 3.00000 \\ 2 & 2.94760 \\ 3 & 2.94753 \end{array} \right)$$ $$\left( \begin{array}{cc} n & x_n \\ 0 & -2.00000 \\ 1 & -1.62607 \\ 2 & -1.51397 \\ 3 & -1.50529 \\ 4 & -1.50524 \end{array} \right)$$

You have much better guesses building around $$x=0$$ the $$[2,n]$$ Padé approximant of the function. It will write $$f(x) \sim \frac{-2+a_1^{(n)}x+a_2^{(n)}x^2}{1+\sum_{k=1}^n b_k x^k}$$ and then solve the numerator (simple).

As a function of $$n$$, the following table gives the decimal representation of the guesses $$\left( \begin{array}{ccc} n & x_-^{(n)}& x_+^{(n)} \\ 2 & -1.50000& 3.00000 \\ 3 & -1.50624& 2.95069 \\ 4 & -1.50554& 2.93996 \\ 5 & -1.50524& 2.94888 \\ 6 & -1.50523& 2.94834 \end{array} \right)$$