# How to solve exponential equations like $2^x+x=5$?

I tried the following:

Let $$y=5-x$$. Then, $$2^{5-y}=y \implies y \cdot 2^y=32$$

Taking the log of both sides yields $$\log_2 y + y = \log_2 2 + 4$$

And that's where I'm stuck.

Since $$\frac{\mathrm{d}}{\mathrm{d}x}\left(2^x+x\right)=\log(2)\,2^x+1\gt0$$, or if it is assumed that $$2^x$$ is monotonically increasing, we have that $$2^x+x$$ is monotonically increasing for all $$x\in\mathbb{R}$$. Since $$2^1+1=3$$ and $$2^2+2=6$$, we see that the $$x$$ which satisfies $$2^x+x=5$$ is between $$1$$ and $$2$$. However, there is no solution in terms of elementary functions.

However, if you are willing to use special functions like Lambert W: $$\newcommand{\W}{\operatorname{W}} 2^x+x=5\\ e^{x\log(2)}=5-x\\ 32\log(2)\,e^{-(5-x)\log(2)}=(5-x)\log(2)\\ 32\log(2)=(5-x)\log(2)e^{(5-x)\log(2)}\\ \W(32\log(2))=(5-x)\log(2)\\ x=5-\frac{\W(32\log(2))}{\log(2)}$$ Approximately, $$x\doteq1.7156207332755861694$$.

• You don't really need calculus to know that function is increasing. – Ethan Bolker May 21 at 17:35
• @EthanBolker: good point, I have amended the introduction – robjohn May 21 at 17:39
• @EthanBolker I don't know exactly what your definition of calculus includes or excludes, but if you're not willing to prove or assume the continuity of $2^x,$ or expand in series a la Euler, I wonder how else to prove that $2^x$ increases as $x$ increases. – Allawonder May 21 at 17:46
• @EthanBolker I grant that the tag excludes calculus. But I do not grant that the content of the post can be satisfactorily answered without calculus (well, supposing you include continuity and approximation as part of calculus). In any case I was just curious about the statement you made that we don't really need calculus to know that the function is increasing. That implies you have a way to know other than calculus; I was asking for such an explanation. – Allawonder May 21 at 18:08
• @EthanBolker In my last statement above, I pointed out that the main thing I was curious about is the non-calculus way you have, which can make us see that $2^x$ increases with $x.$ Either you have forgotten to supply this, or you have deliberately ducked the question. I won't guess which, but I have never seen a way to show that $a^x$ (with $a>1$) increases with $x$ without at least assuming or proving continuity. – Allawonder May 21 at 18:33

You are stuck for good reason. That equation does not have an algebraic solution. SInce $$2^x + x$$ is an increasing function of $$x$$ there will be a unique value of $$x$$ that makes it $$5$$. You can calculate it numerically as accurately as you like.

Without using Lambert function (which I am in love with !), you can approximate the function building around $$x=2$$ (which would be the solution of $$2^x+x=6$$) the simplest $$[1,1]$$ Padé approximant of $$f(x)=2^x+x-5$$ This would give $$2^x+x-5 \approx \frac{1+\frac{ 1+8 \log (2)+14 \log ^2(2)}{1+4 \log (2)}(x-2)}{1-\frac{2 \log ^2(2)}{1+4 \log (2)}(x-2)}$$ Then $$x\approx \frac{1+28 \log ^2(2)+12 \log (2)}{1+14 \log ^2(2)+8 \log (2)}\approx 1.71574$$ Better would be the result using instead the $$[1,n]$$ approximant and get an approximation still at the price of a linear equation. For example, the next one would give $$x\approx \frac{3+292 \log ^3(2)+222 \log ^2(2)+48 \log (2)}{3+146 \log ^3(2)+132 \log ^2(2)+36 \log (2)}\approx 1.71560$$

NOTE: The inverse of $$f\left(x\right)=xe^x,f:\mathbb{R}\cap\left[-1,\infty\right)\rightarrow\mathbb{R}\cap\left[-\frac{1}{e},\infty\right)$$ is $$W\left(x\right)$$, which is what is called the product logarithm function

Do not expect $$x$$ to have any kind of closed-form solution in terms of elementary functions, as $$W\left(x\right)$$ is not an elementary function itself. In fact, the inverse of $$g\left(x\right)=x+2^x,g:\mathbb{R}\rightarrow\mathbb{R}$$ is $$g^{-1}\left(x\right)=x-\frac{W\left(2^x\log 2\right)}{\log 2}$$.

So in your case, $$x+2^x=5$$, we have infinitely many solutions, $$x\in\left\{5-\frac{W_{n}\left(32\log 2\right)}{2}:n\in\mathbb{Z}\right\}$$, where $$W_{n}\left(x\right)$$ is the analytic continuation of the product logarithm function.

• It might be useful to point out that there is only one real branch of W for positive arguments. – robjohn May 21 at 17:07