I need to solve this equation and I have no idea how to do it? $$u = e ^ {-u}$$
How do I solve $u = e ^ {-u}$? Is there a single solution?
122 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 6 best solutions below
On
There is no exact solution to this problem in terms that we know, so we simply defined a function for solutions of problems of this kind (the Lambert $W$ function), and the solution to this instance is simply $W(1)$.
It's value is approximately $W(1) \approx 0.5671432904...$, there are numerous techniques for approximating this value (the simplest of which is to just graph the two functions).
However the iterative formula $u \rightarrow e^{-u}$ has $W(1)$ as attractive fixed point, so you can start with a reasonable initial guess (say $0.5$) and repeatedly apply the formula to approach $W(1)$:
0.5
0.6065306597126334
0.545239211892605
0.5797030948780683
0.5600646279389019
0.5711721489772151
0.5648629469803235
0.5684380475700662
0.5664094527469209
0.5675596342622424
0.5669072129354714
0.5672771959707785
0.5670673518537281
0.5671863600876382
0.5671188642569858
0.5671571437076446
0.5671354336592732
0.5671477463306249
0.5671407632698067
0.5671447236620769
On
The given equation $u=e^{-u}$ is not algebraically solvable. But you can solve it numerically with the Newton-method:
$f(u)=e^{-u}-u$
$f'(u)=-e^{-u}-1$
Now with the formula:
$x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}$ and some iterations, we get close to a solution. First we have to find a $x_0$ to start the iteration. We can find one by searching for a change in the sign by calculation a few.
f(0)=1, f(1)<0
Therefore we root has to be between 1 and 0 and we can choose $x_0=0.5$ Then
$x_1=0.5-\frac{f(0.5)}{f'(0.5)}\approx 0.56631$ $x_2=0.56714$ ...
Which is already pretty close to exact value given by orlp.
On
$u=e^{-u}\Leftrightarrow u-e^{-u}=0$
Let $f(x)=x-e^{-x}$. Then $f'(x)=1+e^{-x}>0$, so the function is monotonically increasing. As a sum of two continuous functions it is also continuous. Now note $f(0)=-1$ and $f(1)=1-\frac{1}{e}>0$. So by the Intermediate Value Theorem there must be a $u$ for which $f(u)=0$ and that number would satisfy $u=e^{-u}$. Since the function is monotonically increasing, we can also see that there is only one such $u$ and furthermore that $0<u<1$.
This shows that your equation has a unique, real solution. However we don't know a "nice" expression for that number, but we can express it in terms of the Lambert W function (refer to orlp's answer).
On
Let $f(u)=u-e^{-u}$. The derivative is $1+e^{-u}$, which is always positive. Hence $f$ is monotonic.
As it is continuous and $f(0)<0,f(1)>0$, it has a single root, which is in range $(0,1)$.
The value of this root cannot be expressed by elementary functions (you need Lambert's $W$), so you can resort to numerical methods. Newton's iterations will work well.
$$u_{n+1}=u_n-\frac{u_n-e^{-u_n}}{1+e^{-u_n}}=\frac{u_n+1}{e^{u_n}+1}.$$
A good starting approximation can be obtained from the second order Taylor development of the exponential, leading to
$$x-\left(1-x+\frac{x^2}2\right)=0$$ and $$u_0\approx 2-\sqrt2=0.58$$
On
There is only one solution.
Because , if you look at the function $f(u)=u-e^{-u}$ then $f(1)>0$ and $f(-1)<0$, so it must hit zero somewhere in $[-1,1]$ because it is continuous, so there is one.
Because function increases strictly that shows that it has at most one solution.
So it has only one.
You wrote in a comment that you need to solve for $u$ the equation $$0.02=0.09\, u\, e^{-u/3}$$ As said in answers, the solution is given in terms of Lambert function $$u=-3 W\left(-\frac{2}{27}\right)$$ what you can evaluate using the expansion (built around $u=0$) $$W(u)=u-u^2+\frac{3 u^3}{2}-\frac{8 u^4}{3}+O\left(u^5\right)$$ which would give here $$u\approx\frac{127946}{531441}\approx 0.240753$$ while the exact solution would be $\approx 0.240794$.
If you cannot use Lambert function, consider Newton method for the zero of $$f(u)=0.02-0.09\, u\, e^{-u/3}$$ Starting using $u_0=0$, the iterates would be $$\left( \begin{array}{cc} n & u_n \\ 0 & 0 \\ 1 & 0.22222222222222222222 \\ 2 & 0.24067499948243880952 \\ 3 & 0.24079419211830631153 \\ 4 & 0.24079419706077123754 \\ 5 & 0.24079419706077124604 \end{array} \right)$$ which is the solution for twenty significant figures.
Sooner or later, you will learn that, better than with Taylor series, functions can be approximated using Padé approximants. Building the $[2,2]$ one around $u=0$, we should get $$f(u)=\frac{\frac{1}{50}-\frac{77 }{900}u+\frac{7}{675} u^2 } {1+\frac{2 }{9}u+\frac{1}{54} u^2 }$$ Solving the numerator, we obtain, as an approximation $$u=\frac{3}{56} \left(77-\sqrt{5257}\right)\approx 0.240794$$
Edit
As I wrote in a comment, for your specific equation, there is a second root. The numerator of the built $[2,2]$ Padé approximants also cancels if $$u=\frac{3}{56} \left(77+\sqrt{5257}\right)\approx 8.00921$$ So, let us consider the general case of function $$f(u)=a-b\,u \,e^{-c u}$$ which can simplify to $$g(x)=k - x \, e^{-x} \qquad \text{with}\qquad x=c u \qquad \text{and} \qquad k=\frac {ac}b$$ Computing derivatives $$g'(x)=(x-1)\, e^{-x} \qquad \text{and}\qquad g''(x)=(2-x)\, e^{-x}$$ So, the first derivative cancels at $x_*=1$ for which $g(x_*)=k-\frac{1}{e}$ and $g''(x_*)=\frac{1}{e} >0$. So $x_*=1$ corresponds to a minimum of the function.
Then, if $g(x_*)=k-\frac{1}{e} $ that is to say $k <\frac{1}{e}$ there will be two roots to equation $g(x)=0$ (otherwise, no root at all).
Building, around $x=1$ the $[2,2]$ Padé approximant, we should get $$g(x)=\frac{(k+e)+\left(\frac{7 k}{11}-\frac{15 e}{11}\right) (x+1)+\left(\frac{19 k}{132}+\frac{49 e}{132}\right) (x+1)^2} {1+\frac{7 }{11}(x+1)+\frac{19}{132} (x+1)^2 }$$ and estimates of the roots are $$x_{1,2}=-1+\frac{2 \left(\pm\sqrt{6} \sqrt{-31 k^2-689 e k+68 e^2}-21 k+45 e\right)}{19 k+49 e}$$ For you specific case where $a=0.02$, $b=0.09$, $c=\frac 13$, $k=\frac 2{27}$ giving $x_1\approx 0.100458$ and $x_2\approx 1.48838$ that is to say $u_1\approx 0.301373$ and $u_2=4.46513$.
For the second root, Newton iterates would be $$\left( \begin{array}{cc} n & u_n \\ 0 & 5 \\ 1 & 10.735169983176656878 \\ 2 & 11.811848258039167534 \\ 3 & 11.953645469496448730 \\ 4 & 11.955908552057240037 \\ 5 & 11.955909119858430307 \\ 6 & 11.955909119858466040 \end{array} \right)$$ which is the solution for twenty significant figures.