I have the following function: $$f(x)=\exp(-x)-0.5x$$. I have to use fixed-point iteration to find the fixed point ($0.85$). I found $g(x)=\exp(-x)/0.5$ and wrote a small script to compute it. It works but now I have to show by hand the number of iterations required for convergence.
I did the following: $$ |g'(x)| \le k \le 1 \rightarrow 2\exp(-x), $$ which is bounded by $2$. How is this possible? It should be less than $1$ on $[0,1]$ but the script works even if I change the initial value. Thank you.
I guess that you want to solve $f(x)=0$ and for this you rewrite the equation as $$ g(x)=2\,e^{-x}=x. $$ It is clear that $g\colon[0,2]\to[0,2]$. Graphical analysis shows that there is a unique fixed point. Moreover, the iteration converges for any initial $x_0\ge0$.
To obtain an estimate of the number of iterations needed you want $|g'|<1$, but $$\sup_{0\le x\le2}|g'(x)|=2.$$ You should work on a smaller interval. Clearly $g'(\log2)=-1$. Since $g(\log2)=1$, an interval of the form $[\log2+\epsilon,1]$ should work.
Finally, let mi note that $k<1$ is a sufficient condition for convergence, but not necessary, as this example shows.