0
$\begingroup$

I want to solve this system of equations with Gauss-Seidel's method:

$${ \begin{cases} 2x_1&+x_2&&&&=3 \\ -x_1&+2x_2&+x_3&&&=2 \\ &-x_2&+2x_3&+x_4&&=2 \\ &&-x_3&+2x_4+x_5&&=2 \\ &&&-x_4+2x_5&&=1 \end{cases} }$$ I wrote equations as:

$$x_1=\frac12(3-x_2)$$

$$x_2=\frac12(2+x_1-x_3)$$

$$x_3=\frac12(2+x_2-x_4)$$

$$x_4=\frac12(2+x_3-x_5)$$

$$x_5=\frac12(1+x_4)$$

For this method if I want to use algorithm to solve the system is the following steps right ?

$$x_1^{(k+1)}=\frac12(3-x_2^{(k)})$$

$$x_2^{(k+1)}=\frac12(2+x_1^{(k+1)}-x_3^{(k)})$$

$$x_3^{(k+1)}=\frac12(2+x_2^{(k+1)}-x_4^{(k)})$$

$$x_4^{(k+1)}=\frac12(2+x_3^{(k+1)}-x_5^{(k)})$$

$$x_5^{(k+1)}=\frac12(1+x_4^{(k+1)})$$

$\endgroup$
2
  • $\begingroup$ Yes that looks fine. I find it much easier to think about if I stick to matrices though. $\endgroup$
    – Paul
    Jan 5 '21 at 9:15
  • $\begingroup$ Thank you. it is the way I am supposed to do to solve the system. $\endgroup$
    – Etemon
    Jan 5 '21 at 9:16
1
$\begingroup$

Since the the condition is met, you can use Gauss-Seidel's recursion. The formulae you stated are right. I checked the iterations using Mathematica and found out that the convergence is a bit slow. I think the reason for that is the coefficients of the $x_i$ in the $i$th equation are not big enough in absolute value than the other in the same equation.

I hope that answers your question.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.