5

Canadian economist Mike Moffat asks on Twitter:

Math nerd Q: Is there a way to solve $e^x + x = 5$ for $x$, without using a numerical method?

Arturo Magidin
  • 398,050
Borror0
  • 151
  • So, based on the answers given, "NO". – The Chaz 2.0 Aug 03 '11 at 20:24
  • 7
    I guess it depends on what you mean by 'numerical method'. Sure, you need to use a numerical method to compute the W function (Newton's method works well). But you need to use a numerical method to compute values of the exponential function, sine function or even the square root function, and this isn't really so different. – Chris Taylor Aug 03 '11 at 20:28
  • If you want a closed form expression for the solution in terms of elementary functions, then the answer is no. – lhf Aug 03 '11 at 20:51
  • 3
    @Chris Taylor: Hurrah for the comment about needing a numerical method for exponential, sine, square root. There are a number of questions on this site for which this should be part of the answer. – André Nicolas Aug 03 '11 at 21:04
  • 3
    @lhf: technically, you are incorrect. Every constant function is elementary, and some constant function has this value... However, the function $x = g(y)$ solving $e^x+x=y$ is, indeed, non-elementary. – GEdgar Aug 03 '11 at 21:10
  • @GEdgar, you're right, that's what I meant. It may happen that the solution for $y=5$ has an elementary form, though I doubt it, 5 not looking special in any way. – lhf Aug 03 '11 at 21:16
  • @Chris: Yes! YES! That's precisely what annoys me about people who say "I don't want to use a numerical method"; even using the humble square root function of your computing environment is a bleeding numerical method! You said it, dude! – J. M. ain't a mathematician Aug 04 '11 at 05:46

6 Answers6

6

Write $y=5-x$. Then $ye^y=e^5$. Using the Lambert W function, this gives $x=5-W(e^5)$.

anon
  • 151,657
5

Yes, write it as $e^x =(5-x)$, then $e^5 e^{x-5} = (5-x)$ then $e^5 =(5-x)e^{5-x}$. Denote $y=5-x$. Equation becomes $e^5 = y*e^y$ which is an implicit equation defining Lambert W function. The $ y = W(e^5)$ and $x = 5- W(e^5)$.

$W(e^5)$ is approximately $3.69$ hence $x = 1.31$, see Wolfram-Alpha

Sasha
  • 70,631
1

Write $y = 5-x$, giving

$$e^{5-y} = y$$

and hence

$$y e^y = e^5$$

This can be inverted using the Lambert W function to give

$$y = W(e^5)$$

and hence

$$x = 5 - W(e^5)$$

Chris Taylor
  • 28,955
0

Rewrite the equation and take the natural log:

$ e^x=5-x $. Then $ x=ln(5-x) $. Or $ x=ln(5)+ln(1-\frac{x}{5}) $. Linearizing the second RHS term gives: $ ln(1-\frac{x}{5})\approx-\frac{x}{5}+O(x^2) $. Hence an approximate answer for x is obtained by: $ x\approx ln(5)-\frac{x}{5} $, yielding: $ x\approx\frac{5}{6}\cdot ln(5)=1.34 $. Compared to the answer obtained by the Lambert W-function this answer is about 2% off.

KGo
  • 1
0

If you do not want to use Lambert function or any numerical method, you can have explicit approximations using Newton-like methods of high order $n$ starting at $x=1$.

For example $$x_{(2)}=\frac{5}{1+e}$$ $$x_{(3)}=\frac{10+14 e-e^2}{2+8 e+e^2}$$ $$x_{(4)}=\frac{60+296 e+32 e^2-4 e^3}{12+116 e+56 e^2+2 e^3}$$ $$x_{(5)}=\frac{720+8016 e+4344 e^2-120 e^3-18 e^4}{144+2592 e+3048 e^2+456 e^3+6 e^4}$$ $$x_{(6)}=\frac{14400+286464 e+381696 e^2+45504 e^3-4224 e^4-96 e^5}{2880+81984 e+189696 e^2+69984 e^3+4416 e^4+24 e^5}$$ I stop here because the formulae start to be too large for the page.

Converted to decimals, the above approximations are $$\{1.3447071,1.3061341,1.3064721,1.3065586,1.3065589\}$$

-2

Step 1. Transform the equation $e^x+x=5$ into $e^x=5-x$

Step 2. Write each side of the new equation as function : $y_1=e^x$ and $y_2=5-x$

Step 3. Graph these two functions in Desmos Graphing Calculator (you find its application in internet)

Step 4. Find the intersection of the two graphs. It has an $x$ and $y$ value.

Step.5 The $x$-value is the solution of our equation : $x=1.307$ (approximately)