I'm stuck with a problem with Newton-Raphson iteration. Below I give definition of the iteration, then I state the problem and provide my incomplete attempt.
DEFINITION : Let $f$ be a differentiable function. Then the Newton's iteration is defined by $$x_{k+1}=x_k-\frac{f\left(x_k\right)}{f'\left(x_k\right)}$$ where $x_0$ is given and $f'\left(x_k\right) \neq 0$, for every $k=0,1,2,\dots$.
THE PROBLEM : Newton’s iteration is applied to the solution of $$e^x-x-2=0$$ Show that if the starting value is positive, the iteration converges to the positive solution, and if the starting value is negative it converges to the negative solution. Obtain approximate expressions for $x_1$ if $(i)\,\,x_0 = 100$ and $(ii)\,\,x_0 = -100$, and describe the subsequent behaviour of the iteration. About how many iterations would be required to obtain the solution to six decimal digits in these two cases?
MY ATTEMPT : Note that $f$ is a continuous function, it is monotonically strictly decreasing in $\left(-\infty,0\right]$ and monotonically strictly increasing in $\left[0,\infty\right)$. Hence, there can be at most $2$ solutions. Now, \begin{align*} &f(1)=e-3<0\\ &f(2)=e^2-4>0\\ &\Rightarrow f \text{ has one root in } \left[1,2\right] \,\,\left(\text{By IVT}\right)\\ &f(-1)=\frac{1}{e}-1<0\\ &f(-2)=\frac{1}{e^2}>0\\ &\Rightarrow f \text{ has one root in } \left[-2,-1\right] \,\,\left(\text{By IVT}\right) \end{align*}
Let us denote the positive root by $\xi_1$ and the negative root by $\xi_2$. Now, $$x_0 \in \left(0,\xi_1\right) \Rightarrow f\left(x_0\right)<0,\,\,f'\left(x_0\right)>0 \Rightarrow x_k<x_{k+1}<\dots$$ $$x_0 \in \left(\xi_1,\infty\right) \Rightarrow f\left(x_0\right)>0,\,\,f'\left(x_0\right)>0 \Rightarrow x_k>x_{k+1}>\dots$$ $$x_0 \in \left(\xi_2,0\right) \Rightarrow f\left(x_0\right)<0,\,\,f'\left(x_0\right)<0 \Rightarrow x_k>x_{k+1}>\dots$$ $$x_0 \in \left(-\infty,\xi_2\right) \Rightarrow f\left(x_0\right)>0,\,\,f'\left(x_0\right)<0 \Rightarrow x_k<x_{k+1}<\dots$$
WHERE I'M STUCK : Can I show that the sequence $\left\{x_k\right\}$ is bounded in the appropriate side in all the four situations above? If I do accomplish that, is that enough to force the sequence to converge to $\xi_1$ or $\xi_2$? Also, I've no clue on how to attack the last part of the problem (how many iterations would be required to obtain the solution to six decimal digits in these two cases?). Thanks in advance.
Your function is additionally convex and has a minimum at $x=0$.
There is a theorem (Darboux) with a rather geometric proof using tangent lines that if a function is convex and monotonously increasing over an interval with a root, then Newton's method converges from every point in the interval right of the root. By reflection on the coordinate axis this generalizes to all situations where first and second derivatives have constant sign.
In your situation the first Newton step lands on the correct side of the root to apply that theorem.