Number of solutions of $e^x=x^3$

Since $e^x>0$, the equation is equivalent to $x=3\log x$. Consider $f(x)=x-3\log x$ (for $x>0$. The limit at $0$ and $\infty$ are both $\infty$.

The derivative is $f'(x)=1-3/x=(x-3)/x$. So the function has an absolute minimum at $x=3$ and $f(3)=3-3\log 3=3(1-\log3)$. Thus the equation has exactly two solutions.

In order to approximate them you can use any numerical method. One is $\approx1.8571$.


Suppose you have $e^x=x^2$; then the function to study is $f(x)=x-2\log\lvert x\rvert$. The limits are $$ \lim_{x\to-\infty}f(x)=-\infty,\quad \lim_{x\to0^-}f(x)=\infty,\quad \lim_{x\to0^+}f(x)=\infty,\quad \lim_{x\to\infty}f(x)=\infty $$ and $$ f'(x)=1-\frac{2}{x}=\frac{x-2}{x} $$ The function is increasing over $(-\infty,0)$ and $[2,\infty)$; decreasing over $(0,2]$.

Since $f(2)=2-2\log2<0$, we have one solution in $(-\infty,0)$ and two solutions in $(0,\infty)$.


I understand that you are not looking for an exact solution. Nevertheless it is for interest to show the analytical solution : $$e^x=x^3$$ $$e^{x/3}=x$$ $$xe^{-x/3}=1$$ $$\frac{-x}{3}e^{-x/3}=-\frac13$$ According to the definition of the Lambert W function : $\quad \frac{-x}{3}=W\left(-\frac13 \right)$

The Lambert W function is multivalued. In the real domain the two branches are noted $W_0$ and $W_{-1}$. So they are two real solutions : $$x=-3W_0\left(-\frac13 \right)\simeq 1.857183$$ $$x=-3W_{-1}\left(-\frac13 \right)\simeq 4.536403$$

Approximates :

$$W_0(x)\simeq-\sum_{k=1}^n \frac{(-1)^k k^{k-1}}{k!}x^k$$ The series is very slowly convergent. For enough accuracy $n$ must be large.

$$W_{-1}(x)\simeq -\theta-\ln(\theta+\ln(\theta+\ln(\theta+...)))$$ with $\theta=-\ln(-x)$ .

The number of terms must be large for enough accuracy.

The above recursive formulas are not recommended (except with computer). Better use numerical calculus with iterative method such as Newton-Raphson.


Not using Lambert function, consider that you look for the zero's of $$f(x)=e^x-x^3$$But easier would be $$g(x)=x-3\log(x)$$for which $$g'(x)=1-\frac 3x \qquad \text{and} \qquad g''(x)=\frac 3{x^2} > 0 \qquad \forall x$$ The first derivative cancels when $$x_*=3 \implies g(3)=3-3\log(3) <0$$ So, two roots.

To approximate them, use a Taylor series around $x=3$ and get $$g(x)=(3-3 \log (3))+\frac{1}{6} (x-3)^2+O\left((x-3)^3\right)$$ Ignoring the higher order terms, the solutions are given by $$x_\pm=3\pm 3 \sqrt{2 (\log (3)-1)}$$ that is to say $1.6677$ and $4.3323$; not too bad for a first approximation.

If you want to polish the roots, using Newton method we should get the following iterates $$\left( \begin{array}{cc} n & x_n \\ 0 & 1.667700786 \\ 1 & 1.834637542 \\ 2 & 1.856830114 \\ 3 & 1.857183772 \\ 4 & 1.857183860 \end{array} \right)$$ $$\left( \begin{array}{cc} n & x_n \\ 0 & 4.332299214 \\ 1 & 4.546901400 \\ 2 & 4.536427193 \\ 3 & 4.536403655 \end{array} \right)$$

Edit

Sooner or later, you will learn that, better than with Taylor series, functions can be locally approximated using Padé approximants. Using the $[2,2]$ one (not too complex to build), we shoulf get $$g(x)=\frac{(3-3 \log (3))-\frac{2(\log (3)-1)}{3} t +\frac{(8+\log (3))}{54} t^2 } {1+\frac{2 }{9}t-\frac{1}{162}t^2}$$ where $t=(x-3)$.

Solving the quadratic in numerator will lead to $$t=\frac{9 \left(2 \log (3)-2\pm\sqrt{6 \left(-2+\log ^2(3)+\log (3)\right)}\right)}{8+\log (3)}$$ given then, as estimates , $x_1=1.85574$ and $x_2=4.53443$.