How can I analytically obtain the number of solutions of the equation $e^x=x^3$?

I know Lambert's $W$ function, but even using that, we need to know the value of $W(-1/3)$ which I think we cannot calculate without a calculator/graph/etc.

I do not need the exact solutions of the equation, I just need to know the number of solutions it has. Is there any good approximation?

I tried using a method of comparing slopes of the two functions on the L.H.S and R.H.S , but it was turning out to be too lengthy.

  • $\begingroup$ Are you asking for the specific solutions for this problem or a general method? $\endgroup$ Apr 28 '19 at 13:34
  • $\begingroup$ @DavidMitra A typo by me. I should have said Clearly there are no negative solutions. You should also know $0^3 \lt e^0$ and $3^3 \gt e^3$ and $16^3 = 2^{12} \lt e^{16}$, so by continuity there should be at least two solutions. Now look at derivatives to show there are exactly two $\endgroup$
    – Henry
    Apr 28 '19 at 13:44

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

  • $\begingroup$ Reading your argument I have another idea. $3\log(x)$ is a concave function. At $x=3$ the staight line $y=x-3+3\log(3)$ is a tangent. Since $3\log(3)-3>0$, the straight line $y=x$ is a secant for $y=3\log(x).$ By concavity, if cuts this curve at exactly two points. $\endgroup$
    – szw1710
    Apr 28 '19 at 13:41
  • $\begingroup$ @szw1710 That's an alternative way. On the other hand, knowing that $f(1)=1$ and $f(2)=2-3\log2=\log(e^2/9)<0$, we know that one solution is in $(1,2)$. Also $f(4)=2(2-3\log2)<0$ and $f(5)>0$, so the other solution is in $(4,5)$. $\endgroup$
    – egreg
    Apr 28 '19 at 13:45
  • $\begingroup$ If instead of x³ ,I had x², now, going by your method how can we get that 1 negative solution? $\endgroup$
    – user226375
    Apr 28 '19 at 13:53
  • $\begingroup$ @user226375 You just solve two equations: $x=2\log x$ and $x=2\log(-x)$. $\endgroup$
    – egreg
    Apr 28 '19 at 13:58
  • 1
    $\begingroup$ @user226375 I added the sketch for the case $e^x=x^2$. $\endgroup$
    – egreg
    Apr 28 '19 at 14:08

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


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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.