Solving equations by iteration (Calculator ANS key)

1.2k Views Asked by At

As I understand the iterations method, if we have an equation in the form of $x = f(x)$, and an initial guess $x_0$, in each step we plug in the x from the prev. iteration into $f(x)$.

Now lets consider this equation: $$5-x = 2(8x-x^2)$$

if I re-write it in the form of: $$x = 5-2(8x-x^2), $$ the solution diverges to infinity.

But, if I re-write it in the form of: $$x = (5+2x^2)/17, $$ I get the solution after few iterations: $0.305066$

How come the solution is different even though it is still the same equation? Thank you!

1

There are 1 best solutions below

5
On BEST ANSWER

Here's a quick answer that will skip some nuance.

For a map $x\mapsto f(x)$ with a fixed point $f(x^*)=x^*$, there are conditions that will cause the forward trajectory (i.e., keep hitting ANS) to converge to $x^*$. The main one is that you need $|f'(x^*)| < 1$. You also need your initial guess $x_0$ to be in the basin of attraction of $x^*$, which can introduce some interesting subtlety. So let's check out your two equations:

Let $f_1(x)=5-2(8x-x^2)$. Solving $f(x^*)=x^*$ gives $x^* = \frac{17}{4}\pm \frac{\sqrt{249}}{4}$, or $x^*\approx 0.305$ and $x^*\approx 8.195$.. Evaluating $f_1'(x^*)$, we get $f_1'(x^*)\approx -14.8$ and $f_1'(x^*)\approx 16.8$ for each of the two fixed points. By the criterion I gave above, this means the process will not converge.

On the other hand, for $f_2(x)=\frac{5+2x^2}{17}$, even thought we have the same fixed point $x^*\approx 0.305$, we have $f'(x^*)\approx 0.07$. This means the process will converge by the same criterion.