-3

Differently from $e^x = ex$ or $e^x = x^2$, which can be easily solvable with the Lambert W function, I can't see how to approach $e^x = x^2 + 2$. Thanks.

2 Answers2

0

You can rearrange it into $x=\ln(2+x^2)$ then we can infinitely nest,

$$x=\ln(2+\ln(2+\ln(2+(\cdots)^2)^2)^2)$$

In other words we're iterating $f(x)=\ln(2+x^2)$ plugging into itself over and over again until we get the desired number of digits of accuracy we like. This is justified by the Banach contraction mapping theorem, since $|\ln(2+x^2)-\ln(2+y^2)|\le |x-y|$.

Merosity
  • 2,489
  • 1
  • 8
  • 16
0

Just for the fun since @Yves Daoust already gave a good approximation.

Consider that you look for the zero's of function $$f(x)=e^x - x^2 - 2$$ Its first derivative $$f'(x)=e^x-2x$$ cancels at $$x_*=-W\left(-\frac{1}{2}\right)$$ which does not exist in the real domain. So, only one root.

By inspection, you know that the root is $\in (1,2)$. So, make the series expansion $$f(x)=(e-3)+(e-2) (x-1)+\left(\frac{e}{2}-1\right) (x-1)^2+\frac{1}{6} e (x-1)^3+\frac{1}{24} e (x-1)^4+O\left((x-1)^5\right)$$ Use series reversion $$x=1+t-\frac{1}{2}t^2+\frac{(e-3) }{3 (e-2)}t^3+\frac{(5-e) }{4 (e-2)}t^4+O\left(t^{5}\right)$$ where $t=\frac{f(x)-e+3}{e-2}$

Since you want $f(x)=0$ then the approximation $$x\sim \frac{2487-4371 e+3090 e^2-1092 e^3+191 e^4-13 e^5 }{12 (e-2)^5}=1.3262\cdots$$ while the solution given by Newton method is $1.3191$.

Too much work compared with what @Yves Daoust did at the price of a quadratic equation.