exercice set 7.pdf

3

Click here to load reader

Upload: karen-johnson

Post on 21-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Exercice Set 7.pdf

1

Name: BAGARAGAZA Romuald

Student number: M2014028

Assignment 5

Numerical Analysis

P451, EXERCISE SET 3 AND 4 (e)

Exercice Set 7.3

3: Using Jacobi method to solve the linear systems in Exercise 1, with TOL=10ˉ³

in the L∞ norm.

Solution

= 0;

= 0;

= 0;

= ( - +1)/3;

= (- - )/6;

= (- - +4)/7;

xx= [ - ];

i=1;

While norm (xx,inf)≥ 1

= ;

= ;

= ;

= ( )/3;

= ( )/6;

= ( )/7;

Page 2: Exercice Set 7.pdf

2

xx= [ - ];

i=i+1

end

i

norm(xx,inf)

i=9

ans= 7.5076e-004

= 0.0351

= -0.2366

= 0.6581

4: Repeating Exercise 3 by the Gauss-seidel Algorithm.

Solution

= 0;

= 0;

= 0;

= ( )/3;

= ( )/6;

= ( )/7;

xx= [ - ];

i=1

While norm (xx,inf)≥ 1

= ;

= ;

Page 3: Exercice Set 7.pdf

3

= ;

xx= [ - ];

i= i+1;

end

i

norm(xx,inf)

i=6

ans= 7.9814e-004

= 0.0354

= -0.2368

= 0.6578