Example 3. Solve
the linear system AX = B by
finding the A = LU factorization
with the Doolittle method, where:
, and
.
Then solve the lower-triangular system LY =
B for Y, then solve
the upper-triangular system UX =
Y for X.
Use the forward substitution and back substitution
subroutines.
Solution 3.
Enter the matrix and vector and invoke the subroutine
Doolittle.
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.
(c) John H. Mathews 2003