# How to solve this equation algebraically?

I've come across this interesting equation which I do not know how to solve. The equation is:

$$e^x+\log x =1$$

I used WolframAlpha to solve it and it got but, it didn't provide any solutions. The answer it showed was $x= 0.512222433033230$. How would one solve the equation algebraically?

• Basically, you can't solve the equation exactly using algebra. Equations involving transcendental functions often have no exact solution. – Deepak Dec 18 '15 at 4:16
• What I think you MEAN to say is correct but I have to take exception to your wording. That equation obviously DOES have an "exact solution" (a little larger than 0.5 as the numerical solution gave) but there is no way to find it without using "special functions" such as the Lambert W function. – user247327 Dec 18 '15 at 4:27
• With a bit of manipulation we can get $$xe^{e^x}=e$$ which puts the problem very near Lambert-W function form... – abiessu Dec 18 '15 at 4:36
• It's clear that $x$ must be less than $1$. Starting with a guess $x_0=\frac12$, one iteration of Newton's method gives $x_1=\frac12-\frac{e^{1/2}+\log(1/2)-1}{e^{1/2}+2}\approx0.51217\ldots$ already quite close to the decimal approximation from WA. – alex.jordan Dec 18 '15 at 4:42
• @abiessu I get the feeling that if it could be solved with Lambert W, then WA would give the answer. Of course, WA has its faults, but given its power I would expect there to be no Lambert W solution. – ASKASK Dec 18 '15 at 5:15

alex.jordan already commented about one iteration of Newton method starting at $x_0=\frac 12$.

Higher order methods (such as Halley or Householderr) would give better and better results after a single iteration. For illustration purpose, I give you below the value of the first iterate as a function of $n$, the convergence order of the method $$\left( \begin{array}{cc} n & x_1 \\ 2 & 0.512175747765817 \\ 3 & 0.512223514408342 \\ 4 & 0.512222434043136 \\ \end{array} \right)$$

For sure, repeating the process would very quickly converge to the solution $0.512222433033230$.

Just for your curiosity : another solution could be to approximate the function locally using the so called Padé approximants which are ratios of polynomials of different degrees (do not worry : you will learn about them sooner or later). For example, building the simplest at $x=\frac 12$ would give $$e^x+\log(x) \simeq \frac{\sqrt{e}-\log (2)+\frac{8+12 \sqrt{e}+e-4 \log (2)+\sqrt{e} \log (2)}{2 \left(2+\sqrt{e}\right)} \left(x-\frac{1}{2}\right)} {1+ \frac{\left(4-\sqrt{e}\right) }{2 \left(2+\sqrt{e}\right)}\left(x-\frac{1}{2}\right)}$$ So, for $e^x+\log(x)=1$, the above expression would lead to $$x=\frac{12+9 \sqrt{e}-3 e+4 \log (2)+5 \sqrt{e} \log (2)}{2 \left(4+13 \sqrt{e}+e-4 \log (2)+\sqrt{e} \log (2)\right)}\approx 0.512223702539583$$

• Man thats too much !!! – Archis Welankar Dec 18 '15 at 7:22
• @ArchisWelankar. This was just for an illustration of the kind of things which can be done when no closed form solution. – Claude Leibovici Dec 18 '15 at 7:39
• I think it is a beautiful thing that this is the "simplest" Padé approximant. – Simply Beautiful Art Dec 21 '15 at 1:14
• @SimpleArt. It looks complicated because developed at $x=\frac 12$. Developed at $x=1$ would give $$e^x+\log(x) \simeq \frac{\frac{\left(2+5 e+e^2\right) (x-1)}{2 (1+e)}+e}{\frac{(1-e) (x-1)}{2 (1+e)}+1}$$ and the solution of the equation would be $$x=\frac{3+6 e-e^2}{1+6 e+e^2}\approx 0.482641$$ – Claude Leibovici Dec 21 '15 at 9:42

You can use this one which will give you an approximate value.$e^{x}=1+\frac{x}{1!}+\frac{x^2}{2!}...\infty$,$log(1+x-1)=log(1+x)=x-\frac{x^2}{2}+\frac{x^3}{3}-..$ you can get the value the if $|x|<=1$ . Hope its clear

• I'm confused, how do we have $\log(1+x-1)=\log(1+x)$? – abiessu Dec 18 '15 at 14:49
• log properties. – Archis Welankar Dec 18 '15 at 15:08
• That's not how log properties work. You can't factor out addition in a logarithm! – Simply Beautiful Art Dec 19 '15 at 2:42