Jacobi iteration method

5,525 views 15 slides Oct 12, 2020
Slide 1
Slide 1 of 15
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15

About This Presentation

Jacobi Iteration Method is Used in Numerical Analysis. This slide helps you to figure out the use of the Jacobi Iteration Method to submit your presentatio9n slide for academic use.


Slide Content

NORTH WESTERN UNIVERSITY Computer Science & Engineering Course Titel : Numerical Analysis Course Code : CSE-2321 Presentation on : Jacobi Iteration Method Submitted by: Name : MD. MONIRUL ISLAM ID: 20151116010 Submitted to: Name : SONIYA YEASMIN Lecturer Computer Science & Engineering North Western University , Khulna

* General Introduction of Jacobi Iteration Method. * Basic idea of Jacobi Iteration Method. * Numerical algorithm of Jacobi Iteration Method. * Implementation of Jacobi Iteration Method in C Programming. * Advantages of Jacobi Iteration Method. * Limitations of Jacobi Iteration Method. * References. INDEX

General Introduction of Jacobi Iteration Method Jacobi iterative method is considered as an iterative algorithm which is used for determining the solutions for the system of linear equations in numerical  linear algebra, which is diagonally dominant . In this method, an approximate value is filled in for each diagonal element. Until it converges, the process is iterated. This algorithm was first called the Jacobi transformation process of matrix diagonalization. The Jacobi iteration is the simplest of the classical iterative methods and, generally, the slowest. However, it forms a basis for the understanding of other methods, such as Gauss-Seidel and SOR.

Basic idea of Jacobi Iteration Method Two assumptions made on Jacobi Method : 1.The system given by a 11 x 1 +a 12 x 2 +… a 1n x n =b 1 a 21 x 1 +a 22 x 2 +… a 2n x n =b 2 a n1 x 1 +a n2 x 2 +… a nn x n =b n Has a unique solution. 2.The coefficient matrix A has no zeros on its main diagonal, namely a 11, a 22 , a nn are nonzeros . Main idea of Jacobi method : To begin, solve the 1st equation for x1, the 2nd equation for x2 and so on to obtain the rewritten equations :

Then make an initial guess of the solution . Substitute these values into the right hand side the of the rewritten equations to obtain the first approximation, This accomplishes one iteration . In the same way, the second approximation is computed by substituting the first approximation’s -vales into the right hand side of the rewritten equations . By repeated iterations, we form a sequence of approximations . The Jacobi Method. For each k ≤ 1, generate the components x i (k) of x (k) from x (k-1) by,

Example : Apply the Jacobi method to solve, Continue iterations until two successive approximations are identical when rounded to three significant digits. Solution : To begin, rewrite the system Choose the initial guess x 1 =0, x 2 =0 and x 3 =0 . The first approximation is ,

Continue iteration, we obtain , The Jacobi Method in Matrix Form x 1 Consider to solve an n×n size system of linear equations Ax=b with A= for x= [x 2 ] x n We split A into, Ax=b is transformed into (D-L-U)x = b . Dx=(L+U)x + b . Assume D -1 exist and D -1 =

Then, x=D -1 (L+U)x +D -1 b. The matrix form of Jacobi iterative method is , x (k) =D -1 (L+U)x (k-1) +D -1 b k=1,2,3 …. Define T= D -1 (L+U ) and c= D -1 b Jacobi iteration method can also be written as , x (k ) = T x (k-1 ) + c k=1,2,3….

Numerical algorithm of Jacobi Iteration Method Input : A=[a ij ] , b×XO= x , tolerance TOL , maximum number of iterations N. Step 1: Set K=1 Step 2: While (k ≤ N) do step 3-6. Step 3: For for i = 1,2,…n . Step 4: If │ |x-X0| │< TOT Then OUTPUT (x 1 ,x 2 ,x 3 ,..x n ) ; Step 5: Set k=k+1. Step 6: For for i = 1,2,….n Set XO i = x i Step 7: OUTPUT (x 1 ,x 2 ,x 3 ,…x n );\ STOP Another stopping criterion in Step 4:

Implementation of Jacobi Iteration Method in C Programming # include< stdio.h > #include< conio.h > #include< math.h > float fx(float y,float z) { float x1; x1=4-2*y-3*z; return x1; } float fy(float x,float z) { float y1; y1=(8-5*x-7*z)/6; return y1; } float fz(float x,float y) { float z1; z1=(3-9*x-y)/2; return z1; } void main() { int i,j,n; float a1,b1,c1; INPUT:

float a,b,c; float ar[3][4],x[3 ]; clrscr (); printf("Enter the no. of Iteration : "); scanf("%d",&n); printf("Enter The initial value : "); scanf("%f %f %f",&a,&b,&c); for( i =0;i<n ; i ++) { for(j=0;j<n ; j ++) { a1=fx(b , c ); b1=fy(a , c ); c1=fz(a , b ); a=a1; b=b1; c=c1; } } printf("a1 = %f\n a2 = %f\n a3 = %f",a1,b1,c1); getch(); } OUTPUT:

Advantages of Jacobi Iteration Method Here are some advantages of Jacobi Iteration Method It is simple and numerically robust . Each iterations quite fast. It is highly desirable for many applications. The Jacobi method first generate inexact result and subsequently refines its result at each iteration , with the residuals Converging at an exponential rate.

Limitations of Jacobi Iteration Method Here are some Limitations of Jacobi Iteration Method Inflexible The Jacobi method only works on matrices A for which p(A) < I, or ||A|| < 1holds . This makes it inapplicable to a large set of problems. 2. Large Set-Up Time The Jacobi method cannot immediately begin producing results. Before it can begin its iteration, a matrix —13-1(L+U) must be computed. For large input matrices, this may not be a trivial operation, as it takes 0(n2) time to perform this matrix multiplication. The result is a significant lag before any results can be output. 3. It might require many iterations . 4. If the linear system is ill-conditioned, it is most probably that the Jacobi method will fail to converge.

References [1] . Numerical Methods.by E Balaguruswamy. [2] . https://www3.nd.edu/~ zxu2/acms40390F12/Lec-7.3.pdf [3] . https:// en.wikipedia.org/wiki/Jacobi_method

THANK YOU