Question: Use python / jupyter notebook Dehghan et al . ( 2 0 1 7 ) developed two - step iterative method called the diagonal and

Use python /jupyter notebook
Dehghan et al.(2017) developed two-step iterative method called the diagonal and off-diagonal splitting iteration method for solving systems of linear equations Ax=B, where the coefficient matri:
A is split into its diagonal and off-diagonal entries, i.e.,A=D+L+U, with
D=[a110000cdots0a22000cdots00a3500cdots000a440cdots0000a55cdotsvdotsvdotsvdotsvdotsvdotsddots],L=[00000cdotsa210000cdotsa31a32000cdotsa41a42a4300cdotsa51a52a53a540cdotsvdotsvdotsvdotsvdotsvdotsddots],U=[0a12a13a14a15cdots00a23a24a25cdots000a34a55cdots0000a45cdots00000cdotsvdotsvdotsvdotsvdotsvdotsddots]
Each iteration involves solving for an intermediate iteration of the solution vector, x(k+12), from
Dx(k+42)=[1D+(1-1)L+(1-1)U]x(k)+(1-1)B
that is used to solve for the next iteration of the solution vector, x(k+1), from
(D+2L)x(k+1)=[(1-2)D-2U]x(k+12)+2B
where 011 and 021 for k=0,1,2,dots
The system of equations described by (1) involves a diagonal matrix. Thus, x(k+12) can be solved efficiently by elementwise division between the constants vector and the main diagonal elements.
The system of equations described by (2) involves a lower triangular matrix Thus, x(k+1) can be solved efficiently via forward subsitution.
You are not allowed to use matrix inversion to solve systems of equations (1) and (2).
Part B
Write a Python function , tol =1E-6) for solving a system of linear equations Ax=B, where A is the coefficients matrix, B is the constants vector, x= the
vector of initial values, w1 and w2 are parameters affecting convergence provided 0w0 and 0w2=0, and tol is the error tolerance. The output of Dos should be (x, err,
k), where x is the solution vector, err is the Euclidean norm of the error vector x(k+1)-x(k), and k corresponds to the number of iterations.
Allow 0 to accept either a single value or a vector of values. When the input is a single value, your Python function should internally convert it into a vector of initial values, e.g.,0[0,0,dots,0] or
1.23[1.23,1.23,dots,1.23].
Use your function to solve the system of linear equations defined as follows:
B=(-1)ii0im0jnm=n=200x0=0,w1=0.3,w2=0.6=0.02xxlll=1,dots,n
Use python / jupyter notebook Dehghan et al . ( 2

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 Programming Questions!