Find the roots of this equation
$e^x + e^{1/x} + a = 0$
where $a \in \Bbb R$
Is there any nice formula for this type of equation?
Find the roots of this equation
$e^x + e^{1/x} + a = 0$
where $a \in \Bbb R$
Is there any nice formula for this type of equation?
An actual analytical solution will not happen here. An analytical approximation can be given as follows.
For large enough negative $a$, there are two roots, each reciprocals of each other. One is large and positive, the other is small and positive. The large and positive one can be approximated:
$$x=\ln(-a-e^{1/x})=\ln(-a)+\ln(1+e^{1/x}/a) \approx \ln(-a)+e^{1/x}/a \approx \ln(-a)+1/a+1/(ax).$$
In the first step we Taylor expanded the logarithm, committing an error on the order of $(e^{1/x}/a)^2$. In the second step we Taylor expanded the exponential, committing an error on the order of $(1/x)^2/a$.
Running with this, we get a quadratic equation, and the solution which is consistent with the approximations we just made is
$$\frac{\ln(-a)+1/a+\sqrt{(\ln(-a)+1/a)^2+4/a}}{2}.$$
The square root can be linearly approximated to give
$$\ln(-a)+1/a+\frac{1}{a\ln(-a)+1}.$$
This is a pretty good approximation, judging by numerical evidence. Heuristically it should be a pretty good approximation, because above we made errors on the order of at most $1/(a \ln(-a)^2)$ on the right side, then we multiplied both sides by $x$ which is on the order of $\ln(-a)$. So the overall error in the solution to the quadratic should be on the order of $1/(a \ln(-a))$. The error in the last step turns out to be smaller than the others, so the overall error in the final approximation should be on the order of $1/(a \ln(-a))$. (In particular, the last term is not really "significant", according to these error estimates; in terms of order of errors, we would've been just as good without including the $1/(ax)$ term. Still, that term actually does reduce the error a little bit in numerical tests.)
Higher order approximations will become quite cumbersome, if we proceed by this approach. But still, it seems that you can readily achieve convergence of numerical methods by beginning with this asymptotic as your initial guess.
This equation, with $x=e^{it}$ is equivalent to solving: $$\operatorname{Re}\big(e^{e^{i t}}\big)=e^{\cos(t)}\cos(\sin(t))=\frac a2$$ Contrary to other users, there is an analytic solution for both positive branches via Lagrange reversion solutions being $(x,a^{\pm 1})$. Finding $x=\sum\limits_{n=1}^\infty a_n$ requires finding $\frac{d^{n-1}}{dw^{n-1}}\frac1we^\frac n{\ln(w)}$, so instead: $$e^x+\sqrt[x]e=a\iff e^{\pm x}=a+\sum_{n=1}^\infty\frac{(-1)^n}{n!}\left.\frac{d^{n-1}}{dw^{n-1}}e^\frac n{\ln(w)}\right|_a$$ A Maclaurin series and Stirling S1 $\frac{d^n}{dx^n}\ln^a(x)$ formula give: $$\frac{d^{n-1}}{dw^{n-1}}e^\frac n{\ln(w)}=\sum_{m=0}^\infty\frac{n^m}{m!}\frac{d^{n-1}}{dw^{n-1}}\ln^{-m}(w)=\sum_{m=0}^\infty\sum_{k=0}^{n-1}\frac{(-1)^kn^mS_{n-1}^{(k)}\Gamma(k+m)}{\ln^{m+k}(w)w^{n-1}\Gamma(m)m!}$$ The $m$ sum is the confluent hypergeometric function. Therefore: $$\bbox[4px,border: 4.5px groove #87CEFA ]{e^x+\sqrt[x]e=a\implies x^{\pm1}=\ln\left(a-1+\sum_{n=1}^\infty\sum_{k=0}^{n-1}\frac{S_{n-1}^{(k)}(-1)^{k+n}k!}{\ln^{k+1}(a)a^{n-1}\Gamma(n)} \,_1\text F_1\left(k+1;2;\frac n{\ln(a)}\right)\right)}$$ Shown here.
To find integral representations, one can use $_1\text F_1$’s functional identity, convert it into a Laguerre polynomial, switch the series with $\operatorname L_{n-1}^1(w)$’s integral representation, and finally Stirling S1’s generating function, but the solution would be a logarithm of an integral. Instead, one can find a direct integral representation after expanding: $$e^x+e^\frac1x=a\implies x^{\pm1}=\ln(a)+\sum_{n=1}^\infty\frac{(-1)^n}{n!}\frac{d^{n-1}}{da^{n-1}}\ln’(a)e^{-\frac1{\ln(a)}}$$ Evaluating the derivatives like in the first part of the post gives a triple sum, but applying the above integral representation steps and integration by parts with limits at integrand discontinuities, like here, gives: $$\begin{align}\bbox[4px,border: 4.5px groove #87CEFA ]{ e^x+e^\frac1x=a\implies x^{\pm1}=\ln\left(a-e^\frac1{\ln(a)}\right)+\frac1{2\pi}\int_0^{2\pi}\frac{e^{it}}{ae^{-\frac{e^{it}+1}{\ln(a)}}-1}\log_a\left((e^{-i t}+1)\log_a\left(1-\frac1a e^\frac{e^{it}+1}{\ln(a)}\right)+1\right)dt\\=\ln\left(\left(a-e^\frac1{\ln(a)}\right)\left(2\log_a\left(1-\frac1ae^\frac1{\ln(a)}\right)+1\right)\right)+\int_0^{2\pi}\frac{\log_a\left(e^\frac{e^{it}+1}{\ln(a)}-a\right)\left((e^{it}+1) e^{\frac{e^{it}+1}{\ln(a)}+it}-\ln(a)\left(e^\frac{e^{it}+1}{\ln(a)}-a\right)\ln\left(1-\frac1a e^\frac{e^{it}+1}{\ln(a)}\right)\right)}{\left(e^\frac{e^{it}+1}{\ln(a)}-a\right)\left((e^{it}+1)\ln\left(1-\frac1a e^\frac{e^{it}+1}{\ln(a)}\right)+e^{it}\ln(a)\right)}dt}\end{align}$$