10. Implement the conjugate gradient algorithm for the matrix A in Exercise 5; that is, A = 2-1 -1 2. -1 -12 Try some different matrix sizes, say, n = 10, 20, 40, 80, and base your convergence criterion on the 2-norm of the residual divided by the 348 CHAPTER 12 - 2-norm of the right-hand side vector: ||b- Ax)||/|bl|. Comment on how the number of iterations required to reduce this quantity below a given level, say, 10-6, appears to be related to the matrix size. For a right-hand side vector, take b = (b₁,..., b), where b; = (i/(n + 1))², i = 1,...,n, and take the initial guess x(0) to be the zero vector. (We will see in chapter 13 that this corresponds to a finite difference method for the two-point boundary value problem: u"(x) = x², 0 < x < 1, u(0) = u(1) = 0, whose solution is u(x) = (x - x). The entries in the solution vector (x-x). 12 x of the linear system are approximations to u at the points i/(n + 1), i = 1,..., n.)
10. Implement the conjugate gradient algorithm for the matrix A in Exercise 5; that is, A = 2-1 -1 2. -1 -12 Try some different matrix sizes, say, n = 10, 20, 40, 80, and base your convergence criterion on the 2-norm of the residual divided by the 348 CHAPTER 12 - 2-norm of the right-hand side vector: ||b- Ax)||/|bl|. Comment on how the number of iterations required to reduce this quantity below a given level, say, 10-6, appears to be related to the matrix size. For a right-hand side vector, take b = (b₁,..., b), where b; = (i/(n + 1))², i = 1,...,n, and take the initial guess x(0) to be the zero vector. (We will see in chapter 13 that this corresponds to a finite difference method for the two-point boundary value problem: u"(x) = x², 0 < x < 1, u(0) = u(1) = 0, whose solution is u(x) = (x - x). The entries in the solution vector (x-x). 12 x of the linear system are approximations to u at the points i/(n + 1), i = 1,..., n.)
Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter2: Basic Linear Algebra
Section2.1: Matrices And Vectors
Problem 7P
Related questions
Question
Please code this in MATLAB
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Recommended textbooks for you
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole