Transcript
Page 1: system of algebraic equation by Iteration method

Name: (1) Kamal Akhtar F.(120450119156)Branch: Mechanical-4C(1)Collage: S.V.M.I.T.

Page 2: system of algebraic equation by Iteration method

Introduction…

O Iteration method:-

O Why iteration method is need?O When the system of algebraic equation consist of large

number of equation then the direct method becomes cumbersome and time consuming.

O In this case Iteration method provide easy tosolve the system.

O In Iteration method we start from initial approximation to the actual solution and obtain better and better approximation after repeating iteration.

O Iteration method gives the value to the desired accuracy.

Page 3: system of algebraic equation by Iteration method

Iteration method:-

O(1) Jacobi's methodO(2) Gauss-Seidel method

Page 4: system of algebraic equation by Iteration method

Jacobi's methodO A set of n equations and n unknowns:

O note: assume all the diagonal elements

are not zero.

11313212111 ... bxaxaxaxa nn

2n2n323222121 bxa...xaxaxa . .

. .

. .

nnnnnnn bxaxaxaxa ...332211

Page 5: system of algebraic equation by Iteration method

Jacobi's methodO If diagonal elements are zero then we

Rewrite the question as…

O π‘₯1 =[𝑏1βˆ’ π‘Ž11π‘₯2+π‘Ž13π‘₯3+β‹―+π‘Ž1𝑛π‘₯𝑛 ]

π‘Ž11

O π‘₯2 =[𝑏2βˆ’ π‘Ž21π‘₯2+π‘Ž23π‘₯3+β‹―+π‘Ž2𝑛π‘₯𝑛 ]

π‘Ž22

O π‘₯𝑛 =[π‘π‘›βˆ’ π‘Žπ‘›1π‘₯2+π‘Žπ‘›2π‘₯2+β‹―+π‘Žπ‘›(π‘›βˆ’1)π‘₯π‘›βˆ’1 ]

π‘Žπ‘›π‘›

Page 6: system of algebraic equation by Iteration method

Jacobi's methodO Suppose that the initial solution is…

O π‘₯1(0), π‘₯2

(0), … , π‘₯𝑛(0) put this all value in the

above equation then we obtain the 1𝑠𝑑

approximation to solution as π‘₯1(1), π‘₯2

(1), … , π‘₯𝑛

(1).

O Against the put this value in above equation then we obtain the 2𝑛𝑑 approximation to solution as π‘₯1

(2), π‘₯2(2), … , π‘₯𝑛

(2).

O Continues the process of finding the approximation till get the solution is the desired level of accuracy.

Page 7: system of algebraic equation by Iteration method

Use the Jacobi method to approximate the solution of the following system of linear equations.

πŸ“π’™πŸ βˆ’ πŸπ’™πŸ+πŸ‘π’™πŸ‘ = βˆ’πŸβˆ’πŸ‘π’™πŸ + πŸ—π’™πŸ+π’™πŸ‘ = πŸπŸπ’™πŸ βˆ’ π’™πŸ βˆ’ πŸ•π’™πŸ‘ = πŸ‘

Continue the iterations until two successive approximations are identical when rounded to three significant digits.

O Solution:--O π’™πŸ = βˆ’

𝟏

πŸ“+

𝟐

πŸ“π’™πŸ βˆ’

πŸ‘

πŸ“π’™πŸ‘

O π’™πŸ =𝟐

πŸ—+

πŸ‘

πŸ—π’™πŸ βˆ’

𝟏

πŸ—π’™πŸ‘

O π’™πŸ‘ = βˆ’πŸ‘

πŸ•+

𝟐

πŸ•π’™πŸ βˆ’

𝟏

πŸ•π’™πŸ

O Because we do not know the actual solution, chooseO π’™πŸ = 𝟎, π’™πŸ = 𝟎, π’™πŸ‘ = πŸŽβ€¦Initial approximationO as a convenient initial approximation. So, the first approximation is

O π’™πŸ = βˆ’πŸ

πŸ“+

𝟐

πŸ“πŸŽ βˆ’

πŸ‘

πŸ“πŸŽ β‰ˆ βˆ’0.200

O π’™πŸ =𝟐

πŸ—+

πŸ‘

πŸ—(𝟎) βˆ’

𝟏

πŸ—(𝟎) β‰ˆ 𝟎. 𝟐𝟐𝟐

O π’™πŸ‘ = βˆ’πŸ‘

πŸ•+

𝟐

πŸ•πŸŽ βˆ’

𝟏

πŸ•πŸŽ β‰ˆ βˆ’πŸŽ. πŸ’πŸπŸ—

Page 8: system of algebraic equation by Iteration method

Continuing this procedure, you obtain the sequence of approximations shown in Table

𝑛 π‘₯1 π‘₯2 π‘₯3

0 0.000 0.000 0.000

1 -0.200 0.200 -0.429

2 0.146 0.203 -0.517

3 0.192 0.328 -0.416

4 0.181 0.332 -0.421

5 0.185 0.329 -0.424

6 0.186 0.331 -0.423

7 0.186 0.331 -0.423

Because the last two rows in Table are identical, you can conclude that

to three significant digits the solution is…

π‘₯1=0.186π‘₯2=0.331π‘₯3= βˆ’ 0.423

Page 9: system of algebraic equation by Iteration method

The Gauss-Seidel MethodO A modification of the Jacobi method called the Gauss-Seidel method.O This modification is no more difficult to use than the Jacobi method,

and it often requires fewer iterations to produce the same degree of accuracy.

O With the Jacobi method, the values of π’™π’Š obtained in the nth approximation remain unchanged until the entire(𝒏 + 𝟏)th approximation has been calculated.

OWith the Gauss- Seidel method…O On the other hand, you use the new values of each π’™π’Š as soon as they

are known. That is, once you have determined π’™πŸ from the first equation, its value is then used in the second equation to obtain the new π’™πŸ Similarly, the new π’™πŸ& π’™πŸare used in the third equation to obtain the newπ’™πŸ‘ and so on. This procedure is demonstrated in 𝒙𝒏.

Page 10: system of algebraic equation by Iteration method

(1)Using the gauss-seidel method to solve the systemβ€¦πŸ–πŸ‘π’™ + πŸπŸπ’š βˆ’ πŸ’π’› = πŸ—πŸ“,πŸ•π’™ + πŸ“πŸπ’š + πŸπŸ‘π’› = πŸπŸŽπŸ’,πŸ‘π’™ + πŸ–π’š βˆ’ πŸπŸ—π’› = πŸ•πŸ,

O Solution…- rewriting the equation as...

O π‘₯ =95βˆ’11𝑦+4𝑧

83= 1.145 βˆ’ 0.133𝑦 + 0.048𝑧

O y=104βˆ’7π‘₯βˆ’13𝑧

52= 2 βˆ’ 0.135 βˆ’ 0.25𝑧

O z=71βˆ’3π‘₯+8𝑦

29= 2.448 βˆ’ 0.103π‘₯ + 0.276𝑦

O Assume the initial solution:…

O π‘₯ = 𝑦 = 𝑧 = 0

Page 11: system of algebraic equation by Iteration method

Continuing this procedure, you obtain the sequence of approximations shown in Table

n X Y Z

0 0 0 0

1 1.145 1.845 1.821

2 0.987 1.412 1.957

3 1.051 1.369 1.962

4 1.057 1.367 1.962

5 1.057 1.367 1.962

Because the last two rows in Table are identical, you can

conclude that to three significant digits the solution is…

π‘₯=1.057𝑦=1.367𝑧=1.962

Continuing this procedure, you obtain the sequence of approximations shown in Table

n X Y Z

0 0 0 0

1 1.145 1.845 1.821

2 0.987 1.412 1.957

3 1.051 1.369 1.962

4 1.057 1.367 1.962

5 1.057 1.367 1.962

Because the last two rows in Table are identical, you can

conclude that to three significant digits the solution is…

π‘₯=1.057𝑦=1.367𝑧=1.962

Page 12: system of algebraic equation by Iteration method

(2)Using the gauss-seidel method to solve the system…6𝒙 + π’š + 𝒛 = πŸπŸŽπŸ“,4𝒙 + πŸ–π’š + πŸ‘π’› = πŸπŸ“πŸ“,5𝒙 + πŸ’π’š βˆ’ πŸπŸŽπ’› = πŸ”πŸ“,

O Solution…- rewriting the equation as...

O π‘₯ =105βˆ’π‘¦βˆ’π‘§

6= 17.5 βˆ’ 0.167𝑦 βˆ’ 0.167𝑧

O y=155βˆ’4π‘₯βˆ’3𝑧

8= 19.375 βˆ’ 0.5π‘₯ βˆ’ 0.375𝑧

O z=βˆ’65+5π‘₯+4𝑦

10= βˆ’6.5 βˆ’ 0.5π‘₯ + 0.4𝑦

O Assume the initial solution:…

O π‘₯ = 𝑦 = 𝑧 = 0

Page 13: system of algebraic equation by Iteration method

Continuing this procedure, you obtain the sequence of approximations shown in Table

n X y z

0 0 0 0

1 17.5 10.625 6.5

2 14.64 9.618 4.667

3 15.114 10.068 5.084

4 14.970 9.984 4.979

5 15.001 10.007 5.003

Because the last two rows in Table are identical, you can

conclude that to three significant digits the solution is…

π‘₯=15.001𝑦=10.007𝑧=5.003

Page 14: system of algebraic equation by Iteration method

(3)Using the Gauss-Seidel method to solve the system…2𝒙 βˆ’ π’š + πŸπ’› = πŸ‘,𝒙 + πŸ‘π’š + πŸ‘π’› = βˆ’πŸ,𝒙 + πŸπ’š + πŸ“π’› = 𝟏,

start with the initial approximations 𝒙 = 𝟎. πŸ‘, π’š = βˆ’πŸŽ. πŸ–, 𝒛 = 𝟎. πŸ‘

O Solution…- rewriting the equation as...

O π‘₯ =3+π‘¦βˆ’2𝑧

2= 1.5 + 0.5𝑦 βˆ’ 𝑧

O y=βˆ’1βˆ’π‘₯βˆ’3𝑧

3= βˆ’0.333 βˆ’ 0.333π‘₯ βˆ’ 𝑧

O z=1βˆ’π‘₯βˆ’2𝑦

5= 0.2 βˆ’ 0.2π‘₯ βˆ’ 0.4𝑦

O Assume the initial solution:…

O π‘₯ = 𝑦 = 𝑧 = 0

Page 15: system of algebraic equation by Iteration method

Continuing this procedure, you obtain the sequence of approximations shown in Table

n X y z

0 0.3 -0.8 0.3

1 0.8 -0.899 0.4

2 0.651 -0.950 0.450

3 0.575 -0.974 0.475

4 0.538 -0.987 0.487

5 0.520 -0.993 0.493

6 0.511 -0.996 0.496

7 0.506 -0.997 0.498

Because the last two rows in Table are identical, you can conclude that to three

significant digits the solution is…

π‘₯=0.506𝑦= βˆ’ 0.997

𝑧=0.498

Page 16: system of algebraic equation by Iteration method

(4)Using the Gauss-Seidel method to solve the system…3𝒙 βˆ’ 𝟎. πŸπ’š βˆ’ 𝟎. πŸπ’› = πŸ•. πŸ–πŸ“,0.1𝒙 + πŸ•π’š βˆ’ 𝟎. πŸ‘π’› = βˆ’πŸπŸ—. πŸ‘,0.1𝒙 βˆ’ 𝟎. πŸπ’š + πŸπŸŽπ’› = πŸ•πŸ. πŸ’,

start with the initial approximations 𝒙 = 𝟎. πŸ‘, π’š = βˆ’πŸŽ. πŸ–, 𝒛 = 𝟎. πŸ‘

O Solution…- rewriting the equation as...

O π‘₯ =7.85+0.1𝑦+0.2𝑧

3= 2.616 + 0.033𝑦 + 0.66z

O 𝑦 =1βˆ’19.3βˆ’0.1π‘₯+0.3𝑧

7= βˆ’2.757 βˆ’ 0.014π‘₯ + 0.042𝑧

O 𝑧 =71.4βˆ’0.3π‘₯+0.2𝑦

10= 7.14 βˆ’ 0.3π‘₯ βˆ’ 0.02𝑦

O Assume the initial solution:…

O π‘₯ = 𝑦 = 𝑧 = 0

Page 17: system of algebraic equation by Iteration method

Continuing this procedure, you obtain the sequence of approximations shown in Table

Because the last two rows in Table are identical, you can conclude that

to three significant digits the solution is…

π‘₯=3.000𝑦= βˆ’ 2.50000

𝑧=7.0000

Page 18: system of algebraic equation by Iteration method

Recommended