I am trying to do a fixed point iteration on the function: $f(x) = x^2 -3x+2 $, analyzing different forms of $g(x)$. I solved for the actual roots and they equate to $x=1$ and $x=2$.
I am currently trying to find the interval of convergence using $g(x) = \frac{x^2+2}{3}\\$
I solved for the derivative which is $g'(x) = \frac{2x}{3}\\$. Now, from my understanding this will converge when $g'(x)<1$. I solved the inequality $-1<g'(x)<1$ and obtained the following interval: $[\frac{-3}{2},\frac{3}{2}]$
But, when I do the iterations of this $g(x)$ in Matlab, choosing values of $x$ do converge for the interval I described, but they also seem to converge for other points as well. For example, iterating $1.6$ which is greater than $\frac{3}{2}\\$ converged to the root. I found they diverge when any point goes beyond $2$ or $-2$.
It seems my Matlab results and calculations aren't matching up. If someone could please help in correcting any misunderstandings I may have, it would be much appreciated. Thank you.