7.5. Indirect methods exercises#

Answer the following exercises based on the content from this chapter. The solutions can be found in the appendices.

Exercise 7.1

Using a pen and calculator, calculate the first 2 iterations of the Jacobi method for solving the system of linear equations below. Use starting values of \(x_i^{(0)} = 0 \) and work to 4 decimal places.

\[\begin{split} \begin{align*} 4x_1 +x_2 -x_3 +x_4 &=14,\\ x_1 +4x_2 -x_3 -x_4 &=10,\\ -x_1 -x_2 +5x_3 +x_4 &=-15,\\ x_1 -x_2 +x_3 +3x_4 &=3. \end{align*} \end{split}\]

Exercise 7.2

Repeat Exercise 7.1 using the Gauss-Seidel method.

Exercise 7.3

Repeat Exercise 7.1 using the SOR method using the optimum value for the relaxation parameter.

Exercise 7.4

Which of the three methods here would you expect to converge to the solution to the system from Exercise 7.1 with the fewest iterations? What quantitative evidence do you have to support your conclusion?

Exercise 7.5

Write a program to calculate the solution to the system of linear equations from Exercise 7.1 using the Jacobi, Gauss-Seidel and SOR methods using a convergence tolerance of \(tol=10^{-6}\). How many iterations did each of the three methods take to converge to the solution?

Exercise 7.6

A linear system has the following coefficient matrix. What is the largest value that \(\alpha\) can be in order for the Jacobi method to be convergent?

\[\begin{split} \begin{align*} A = \begin{pmatrix} 2 & 1 \\ \alpha & 2 \end{pmatrix} \end{align*} \end{split}\]