I encountered this problem in numerical analysis but I think my questiion is more of a calculus one.
It's Newton - Raphson method for finding the root of an equation, which is the method below:
Let $f$ be a function and $x_n$ a sequence such that $x_{n+1}=x_n-\frac{f(x_n)}{f'(x_n)}$ and we start of at a given $x_0$. In most cases the sequence converges to the root of the function that is closer to $x_0$ Let me be more specific now:
$f(x)=x^3-5x$ and the root we are intrested in is $x=0$. When we start of from $x_0=-1$ the sequence $x_n$ diverges and in fact it oscillates between the local maximum and the local minimum of the function and it has two subsequences $x_2n \rightarrow -1$ and $x_{2n-1} \rightarrow 1$. When we start of at any $-1 < x_0 <1 $ the sequence converges at $x_n \rightarrow 0$ (and for values that don't belong in $[-1,1]$ it converges to the other to roots of the equation).
My question is: What makes the value $x=1$ so special, that it creates that effect and how can we predict such behavior from a value and avoid it??
Take a look at the plot and make use of the fact that the iteration draws the tangent at $(x_n, f(x_n))$ and the next iteration is where the tangent hits the x axis.