28.11.2014 Views

MTH3051 Introduction to Computational Mathematics - User Web ...

MTH3051 Introduction to Computational Mathematics - User Web ...

MTH3051 Introduction to Computational Mathematics - User Web ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

School of Mathematical Sciences<br />

Monash University<br />

which we re-write as<br />

x n+1 − x = g ′ (x)(x n − x) + O ( (x n − x) 2)<br />

Now notice that x n − x is the error in our approximation at iteration n. So let’s define<br />

the error at each iteration by<br />

ɛ n = |x n − x|<br />

then we have<br />

ɛ n+1 = |g ′ (x)|ɛ n + O ( )<br />

ɛ 2 n<br />

Notice that if |g ′ (x)| < 1 then successive errors will be smaller than the previous errors,<br />

that is the iterations will converge. On the other hand, if |g ′ (x)| > 1 the errors will grow<br />

and the sequence diverges. The only other case is when |g ′ (x)| = 1 and in this case the<br />

errors neither grow nor decay.<br />

Note also that the above arguments all hinge on the assumption that we are near the<br />

fixed point. All bets are off if we have a bad initial guess (i.e. x 1 is far from the fixed<br />

point). However once the sequence gets close <strong>to</strong> the fixed point (if we should be so lucky)<br />

then the above arguments do apply.<br />

Fixed Point Iteration Convergence<br />

Given an x 1 close <strong>to</strong> the fixed point x = g(x), then the sequence<br />

x n+1 = g(x n ) n = 1, 2, 3, · · ·<br />

Converges when |g ′ (x)| < 1<br />

Diverges when |g ′ (x)| > 1<br />

Useless when |g ′ (x)| = 1<br />

Example 4.1<br />

Verify, using the above conditions, that the scheme x n+1 = e −xn<br />

scheme x n+1 = − log(x n ) should diverge.<br />

will converge, while the<br />

4.2.5 Programming notes<br />

Since we know that the fixed point iterations might fail we must take care when we write<br />

our computer programs. We need <strong>to</strong> ask ourselves what can go wrong in the calculations<br />

(<strong>to</strong>o many iterations? not converging? stalled? etc.) and put appropriate tests in our<br />

programs. Here is a very rough sketch of a program that could be used for any algorithm<br />

<strong>to</strong> solve 0 = f(x) for x.<br />

16-Feb-2014 44

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!