MTH3051 Introduction to Computational Mathematics - User Web ...
MTH3051 Introduction to Computational Mathematics - User Web ...
MTH3051 Introduction to Computational Mathematics - User Web ...
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 />
Fixed point iterations x n+1 = e −xn<br />
Iteration n Old guess x n New guess x n+1 x n+1 − e −x n+1<br />
0 0.500000000000 -1.065e-01<br />
1 0.500000000000 0.606530659713 6.129e-02<br />
2 0.606530659713 0.545239211893 -3.446e-02<br />
3 0.545239211893 0.579703094878 1.964e-02<br />
4 0.579703094878 0.560064627939 -1.111e-02<br />
5 0.560064627939 0.571172148977 6.309e-03<br />
6 0.571172148977 0.564862946980 -3.575e-03<br />
7 0.564862946980 0.568438047570 2.029e-03<br />
8 0.568438047570 0.566409452747 -1.150e-03<br />
9 0.566409452747 0.567559634262 6.524e-04<br />
10 0.567559634262 0.566907212935 -3.700e-04<br />
It appears <strong>to</strong> be converging, the last column seems <strong>to</strong> be getting smaller with each<br />
iteration, but the its seems <strong>to</strong> be a slow convergence. Here are the results at every 10-th<br />
iteration.<br />
Fixed point iterations x n+1 = e −xn<br />
Iteration n Old guess x n New guess x n+1 x n+1 − e −x n+1<br />
1 0.500000000000 0.606530659713 6.129e-02<br />
11 0.566907212935 0.567277195971 2.098e-04<br />
21 0.567142477551 0.567143751417 7.225e-07<br />
31 0.567143287611 0.567143291997 2.487e-09<br />
41 0.567143290400 0.567143290415 8.564e-12<br />
51 0.567143290410 0.567143290410 2.931e-14<br />
61 0.567143290410 0.567143290410 1.110e-16<br />
Clearly the algorithm worked, we have a solution, but it <strong>to</strong>ok over 60 iterations. For<br />
functions as simple as this, 61 iterations does not take <strong>to</strong>o much time <strong>to</strong> compute. So we<br />
might feel that this is a good result. Not quite. If this happened <strong>to</strong> be part of a much<br />
larger computation, where we needed <strong>to</strong> compute the root many thousands of times (for<br />
example) then we have good reason <strong>to</strong> want <strong>to</strong> improve on 60 iterations per root. As we<br />
shall see in later lectures there are algorithms that can converge in (usually) less than<br />
about 5 iterations. This is a significant improvement.<br />
You might ask how well does this algorithm work for other choices of the initial guess<br />
x 1 ? It converges for a wide range of values! By direct trial and error you can verify<br />
(you’ll need a program!) that it converges (at least) for any initial guess in the range<br />
−5 < x 1 < +5. Again this is encouraging. Flush with confidence you might try rewriting<br />
the original equation 0 = x − e −x as x = − log(x) and thus create the sequence<br />
x n+1 = − log(x n ) n = 1, 2, 3, · · ·<br />
16-Feb-2014 40