Task one(25 pts): Complete the work of Exercise 2.11 for the values of n = 8 and 50. Provide a copy of your matlab tridiagonal code and for 1) n = 8, provide copies of: a) the coefficient matrix, A b)...

Task one(25 pts): Complete the work of Exercise 2.11 for the values of n = 8 and 50. Provide a copy of your matlab tridiagonal code and for 1) n = 8, provide copies of: a) the coefficient matrix, A b) the right hand side vector, b c) the solution vector, v d) the maximum error in the approximation, 1,..., max i i i n u z = − 2) n = 50, provide: a) the right hand side vector, b b) the solution vector, v c) the maximum error in the approximation, 1,..., max i i i n u z = − Do not provide a copy of the coefficient matrix A for the n=50 case. Detail on code: Your Task 1 code should use the function m-file format. What to “send” to your code: the size of your coefficient matrix, n; the coefficient matrix A, the right hand side vector b. What should your code “return”: the solution vector, v. Also, codes should always be properly commented, over commenting not best. Task two: Complete the work of Exercise 2.14 for the value of n = 10. You will implement your tridiagonal code for this problem but with slightly different coefficient matrices A and A 1 2 and right hand side vectors 1 2 b and b . The matrices will be almost the same but may be slightly changed due to the equations used to address the right boundary condition variations in part a, leading to a change in one or two elements of A and A 1 2 associated with the schemes 1 2 S and S . The vectors associated with the given right hand side function of part c, 1 2 b and b , may be slightly changed due to the discrete equations used to address the right boundary condition variations in part a (possibly leading to a change in one or two elements of 1 2 b and b due to the schemes 1 2 S and S .) Provide copies of the coefficient matrices A and A 1 2 and copies of the right hand side vectors 1 2 b and b from Matlab. Compute and provide the errors for each of the schemes. The numerical output of Task 2 should be 2 coefficient matrices, 2 right hand side vectors, 2 solution vectors and 2 vectors of error values. Also plot the solution vectors along with the true solution and a separate plot of the errors, there should be 2 or 4 plots. You may plot the true solution along with both approximate solutions.
Feb 24, 2023
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here