25.08.2021 Views

082-Engineering-Mathematics-Anthony-Croft-Robert-Davison-Martin-Hargreaves-James-Flint-Edisi-5-2017

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

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

314 Chapter 8 Matrix algebra

Table8.1

Iterates produced byJacobi’smethod.

Iterationno. (n) x (n) y (n)

0 0 0

1 2.0000 1.6667

2 1.1667 2.3333

3 0.8333 2.0556

4 0.9722 1.9444

5 1.0278 1.9907

6 1.0047 2.0093

7 0.9954 2.0016

8 0.9992 1.9985

9 1.0008 1.9997

10 1.0002 2.0003

TheresultsofsuccessivelyapplyingtheseformulaeareshowninTable8.1.Thesequence

of values ofx (n) seems toconverge to1while thatofy (n) seems toconverge to2.

Clearly this sort of approach is simple to program and iterative techniques such as

Jacobi’s method are best implemented on a computer. When writing the program a test

should be incorporated so that after each iteration a check for convergence is made by

comparing successive iterates. In many cases, even when convergence does occur, it is

slow and so other techniques are used which converge more rapidly. The Gauss--Seidel

method is attractive for this reason. It uses the most recent approximation to x when

calculatingyleadingtoimprovedratesofconvergenceasthefollowingexampleshows.

Example8.50 Usethe Gauss--Seidel method tosolve the equations ofExample 8.49.

Solution As before wewrite the equations inthe form

x = − 1 2 y +2

y = 1 3 x + 5 3

Withx (0) = 0,y (0) = 0 as our initial guess,wefind

x (1) = − 1 2 (0)+2=2

To findy (1) weuse the mostrecent approximation toxavailable, thatisx (1) :

y (1) = 1 3 (2) + 5 3 = 2.3333

Generally, wefind

x (n+1) = − 1 2 y(n) +2

y (n+1) = 1 3 x(n+1) + 5 3

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

Saved successfully!

Ooh no, something went wrong!