Example 2. Consider
the linear system
.
2 (c). Solve the
linear system AX = B by using the
Cholesky method.
Solution 2 (c).
(i). Enter the matrix and vector.
(ii). Construct the Cholesky factorization of matrix A.
(iii). Solve the linear system using our ForeSub[n] and [BackSub[n] subroutines.
First, solve the lower-triangular system LY = B for Y.
Verify that LY = B.
Second, solve the upper-triangular system UX = Y for X.
Verify that UX = Y.
Therefore X is the solution to LUX =
B. and hence AX = B
And we can verify that it is the solution.
We can compare this solution with the solution obtained in parts (a) and (b).
(c) John H. Mathews 2004