Example 1. Create a
31 by 31 tridiagonal matrix A where the main diagonal elements
are all "2" and all elements of the subdiagonal and superdiagonal
elements are "1." Then solve the linear
system
where
. Compute
the solution using decimal arithmetic.
Solution 1 (a).
The column form for B is:
The matrix A can be constructed with the command.
We can print out the system to be solved if we wish.
Solve the system Mathematica's built in LinearSolve[A,B] procedure.
Notice that this linear system is producing some round off error near the 14th decimal place.
Verify the answer.
(c) John H. Mathews 2004