Question: To be specific, focus on the following cyclic tridiagonal matrix: ( A | b ) = ( [ 4 , - 1 , 0 ,

To be specific, focus on the following cyclic tridiagonal matrix:
(A|b)=([4,-1,0,0,dots,0,0,0,-1,1],[-1,4,-1,0,dots,0,0,0,0,1],[0,-1,4,-1,dots,0,0,0,0,1],[vdots,vdots,vdots,vdots,ddots,vdots,vdots,vdots,vdots,vdots],[0,0,0,0,dots,-1,4,-1,0,1],[0,0,0,0,dots,0,-1,4,-1,1],[-1,0,0,0,dots,0,0,-1,4,1])
Something similar appears when you study differential equations with periodic bound-
ary conditions, as we will see in chapter 8.(Note that A is "almost" a tridiagonal ma-
trix.) For this problem, the Jacobi iterative method of Eq.(4.169) turns into:
x0(k)=(1+x1(k-1)+xn-1(k-1))14
xi(k)=(1+xi-1(k-1)+xi+1(k-1))14,i=1,dots,n-2
xn-1(k)=(1+x0(k-1)+xn-2(k-1))14
Implement the Jacobi iterative method for this set of equations. Your input parameters
should be only the total number of iterations, the tolerance, as well as n(which deter-
mines the size of the problem), i.e., there are no longer any A and b to be passed in.
Choose a tolerance of 10-5 and print out the solution vectors for n=10 and for n=20,
each time also comparing with the output of numpy.linalg.solve().(To produce
the latter, you will have to form A and b explicitly.) In python pls
 To be specific, focus on the following cyclic tridiagonal matrix: (A|b)=([4,-1,0,0,dots,0,0,0,-1,1],[-1,4,-1,0,dots,0,0,0,0,1],[0,-1,4,-1,dots,0,0,0,0,1],[vdots,vdots,vdots,vdots,ddots,vdots,vdots,vdots,vdots,vdots],[0,0,0,0,dots,-1,4,-1,0,1],[0,0,0,0,dots,0,-1,4,-1,1],[-1,0,0,0,dots,0,0,-1,4,1])

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!