# Solving $e^x + x = 5$ for $x$ without using a numerical method?

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?

-
So, based on the answers given, "NO". – The Chaz 2.0 Aug 3 '11 at 20:24
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 3 '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 3 '11 at 20:51
@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 3 '11 at 21:04
@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 3 '11 at 21:10

## 4 Answers

Write $y=5-x$. Then $ye^y=e^5$. Using the Lambert W function, this gives $x=5-W(e^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

-

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)$$

-

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)

-