ITERATIVE METHODS FOR THE SOLUTION OF SYSTEM OF LINEAR EQUATIONS OSCAR EDUARDO MENDIVELSO OROZCO I studyPetroleumEngineering Numerical Methods
JACOBI METHOD The Jacobi method is the iterative method for solving systems of linear equations more simple and applies only square systems, ie systems with as many unknowns as equations. First, we determine the equation of recurrence. For this order the equations and unknowns. Of the equation i cleared the unknown i. In matrix notation is written as: 𝒙=𝒄+𝑩𝒙 where x is the vector of unknowns.
2.It takes an approach to the solutions and this is designated by 𝒙𝒐 3. Is iterated in the cycle that changes the approach 𝒙𝒊+𝟏=𝒄+𝑩𝒙𝒊
Example: From (x = 1, y = 2) apply two iterations of the Jacobi method to solve the system: 𝟓𝒙 +𝟐𝒚 =𝟏𝒙 −𝟒𝒚 =𝟎 Solution: We must first solve the equation for the unknown x= 0.20+0.00x-0.40y y= 0.00+0.25x+0.00y Written in vector notation would be: 𝑥𝑦=0.200.00+0.00−0.400.250.00𝑥𝑦
We apply the first iteration starting from𝑥0=1.00 y 𝑦0=2.00: 𝑥1=0.20 + 0.00 (1.00) - 0.40 (2.00) = -0.60 𝑦1=0.00 + 0.25 (1.00) + 0.00 (2.00) = 0.25 We apply the second iteration starting from 𝑥1= -0.60 y 𝑦1=0.25 𝑥2= 0.20 + 0.00 (-0.60) - 0.40 (0.25) = 0.10 𝑦2=0.00 + 0.25 (−0.60) +0.00 (0.25) = −0.15 We apply the next iteration from 𝑥2= 0.10 y 𝑦1=0.25: 𝑥3= 0.20 + 0.00 (0.10) - 0.40 (-0.15) = 0.26 𝑦3= 0.00 +0.25 (0.10) +0.00 (−0.15) = 0.025 We apply the next iteration from 𝑥3=0.26 y 𝑦3=0.025: 𝑥4=0.20 + 0.00 (0.26) − 0.40 (0.025) = 0.190 𝑦4=0.00 + 0.25 (0.26) + 0.00 (0.025) = 0.065
We apply the next iteration from 𝑥4=0.190 y 𝑦4=0.065: 𝑥5=0.20 + 0.00 (0.19) − 0.40 (0.065) = 0.174 𝑦5=0.00 + 0.25 (0.19) + 0.00 (0.065) = 0.0475 We apply the next iteration from 𝑥5=0.174 y 𝑦4=0.0475: 𝑥6=0.20 + 0.00 (0.174) − 0.40 (0.0475) = 0.181 𝑦6=0.00 + 0.25 (0.174) + 0.00 (0.0475) = 0.0435 Where
THE GAUSS-SEIDEL METHOD The Gauss-Seidel method is very similar to the method of Jacobi. While using the Jacobi the value of the unknowns to determine a new approach in the Gauss-Seidel is using values of the unknowns recently calculated in the same iteration, and not the next. For example, Jacobi method is obtained in the first calculation 𝑋𝐼+1, But the value of x is not used until the next iteration. In the Gauss-Seidel method instead of 𝑥𝑖+1is used i +1 instead of 𝑥𝑖 immediatelyto calculate the value of 𝑦𝑖+1 equally applicable to the following variables are used whenever newly calculated variables.
Example: From (x = 1, y = 2, z = 0) apply two iterations of Gauss-Seidel method to solve the system: 10𝑥+0𝑦 +𝑧 =−14𝑥 +12𝑦 +4𝑧 = 84𝑥 +4𝑦 +10𝑧 = 4 Solution: We must first solve the equation for the unknown. x = −0.10 + 0.00 x + 0.00 y + 0.10 z y = 0.66 − 0.33 x + 0.00 y + 0.33 z z = 0.40 −0.40 x − 0.40 y + 0.00 z
Computationalcost It is difficult to estimate the computational cost of an iterative method, it is not known beforehand how many iterations required to obtain an answer that satisfies the user. Usually proceed to calculate computational cost per iteration. In the case of the Jacobi method used the recurrence relation is: 𝒙𝒊+𝟏=𝐜+𝑩𝒙𝒊 It is difficult to estimate the computational cost involved: the product of the matrix B, n × n by the vector 𝑥𝑖 takes n × (2n-1) FLOPs, and the sum of two vectors in ℜ𝑛 with n FLOPs making which gives a total of 2𝑛2 FLOPs at each iteration of the Jacobi method.
Using this information we can conclude that if the algorithm takes m iterations then the total FLOPs shall be: 2𝑚𝑛2 That is why the Jacobi method is preferred in problems where n is large, when you can ensure convergence and when the expected number of iterations is low. REFERENCES http://www.mty.itesm.mx/etie/deptos/m/ma95-843/lecturas/l843-13.pdf