How can I find all solutions using an iteration formula?

112 Views Asked by At

Take the equation $x^2+7x+10=0$, which has roots $-2$ and $-5$.

When I use the iteration formula $x_{n+1}=\dfrac{-10}{x_n+7}$, I always converge on $-2$ but not on $-5$.

I have tried starting values of $-6, -4, -1, 1, 2$ and many others, but I only converge on $-2$.

Is there something wrong with my iteration formula or starting values?

3

There are 3 best solutions below

0
On

An iterative formula is not a 100% sure method of finding a solution. This is a method based on approximation.

The kind of iteration you are using is a fixed point iteration. It will only work with attractive points, not repulsive points.

0
On

There is nothing wrong, when considering sequences defined by $x_{n+1}=f(x_n)$ to study if $l$ such that $f(l)=l$ is attractive or repulsive you have to consider $|f'(l)|$:

  • If $|f'(l)|<1$ this is an attractive point.
  • If $|f'(l)|>1$ this is a repulsive point (and there is no hope to converge to $l$ if $x_0 \neq l$).
  • If $|f'(l)| =1$ you have to study with more precision the function.

Here $f'(x)=\frac{10}{(x+7)^2}$ so:

  • $f'(-2)=\frac{10}{25}\in (-1,1)$
  • $f'(-5)=\frac{10}{4} >1$

so $-2$ is attractive but $-5$ is repulsive.

0
On

One way of looking at this is to compare the curves $y=x$ (the orange line below) and $y=\dfrac{-10}{x+7}$ (the blue line). The solutions are where the two lines intersect, at $x=-2$ and $x=-5$

In effect, an iteration can be considered as moving vertically from a point on the orange line to a point on the blue line and then horizontally to a point on the orange line.

Two such sequences of iterations are illustrated to demonstrate moving towards the solution at $-2$ and away from the solution at $-5$. As Delta-u says, this is because the slope of the blue curve at $-5$ is steeper than that of the orange curve, with the position reversed at $-2$. (If the slopes were of opposite signs then the iterations would spiral around the solution, and whether they were attracted or repelled would depend on the relative magnitudes of the slopes)

enter image description here