← 2020 Paper 2

UPSC 2020 Maths Optional Paper 2 Q6b — Step-by-Step Solution

15 marks · Section B

Gauss-Seidel iteration · Numerical Analysis · asked 7× in 13 yrs · Read the full method →

Question

For the solution of the system of equations 4x+y+2z=44x+y+2z=4, 3x+5y+z=73x+5y+z=7, x+y+3z=3x+y+3z=3, set up the Gauss–Seidel iterative scheme and iterate three times starting with the initial vector X(0)=0X^{(0)}=0. Also find the exact solutions and compare with the iterated solutions.

Technique

Gauss–Seidel — update each unknown using the most recent values; three sweeps from the zero vector; compare to the exact solution from direct elimination.

Solution

Step 1 — Diagonal dominance and the iterative scheme

The coefficient matrix

A=[412351113]A=\begin{bmatrix}4&1&2\\3&5&1\\1&1&3\end{bmatrix}

is (weakly) diagonally dominant: 41+2|4|\ge1+2, 5>3+1|5|>3+1, 31+1|3|\ge1+1, so Gauss–Seidel converges. Solving each equation for its diagonal variable and using the latest available values:

x(k+1)=4y(k)2z(k)4,y(k+1)=73x(k+1)z(k)5,z(k+1)=3x(k+1)y(k+1)3.x^{(k+1)}=\frac{4-y^{(k)}-2z^{(k)}}{4},\quad y^{(k+1)}=\frac{7-3x^{(k+1)}-z^{(k)}}{5},\quad z^{(k+1)}=\frac{3-x^{(k+1)}-y^{(k+1)}}{3}.

Step 2 — Three iterations from X(0)=(0,0,0)X^{(0)}=(0,0,0)

Iteration 1:

x(1)=4004=1.0000,y(1)=73(1)05=0.8000,z(1)=310.83=0.4000.x^{(1)}=\frac{4-0-0}{4}=1.0000,\quad y^{(1)}=\frac{7-3(1)-0}{5}=0.8000,\quad z^{(1)}=\frac{3-1-0.8}{3}=0.4000.

Iteration 2:

x(2)=40.82(0.4)4=2.44=0.6000,y(2)=73(0.6)0.45=4.85=0.9600,x^{(2)}=\frac{4-0.8-2(0.4)}{4}=\frac{2.4}{4}=0.6000,\quad y^{(2)}=\frac{7-3(0.6)-0.4}{5}=\frac{4.8}{5}=0.9600, z(2)=30.60.963=1.443=0.4800.z^{(2)}=\frac{3-0.6-0.96}{3}=\frac{1.44}{3}=0.4800.

Iteration 3:

x(3)=40.962(0.48)4=2.084=0.5200,y(3)=73(0.52)0.485=4.965=0.9920,x^{(3)}=\frac{4-0.96-2(0.48)}{4}=\frac{2.08}{4}=0.5200,\quad y^{(3)}=\frac{7-3(0.52)-0.48}{5}=\frac{4.96}{5}=0.9920, z(3)=30.520.9923=1.4883=0.4960.z^{(3)}=\frac{3-0.52-0.992}{3}=\frac{1.488}{3}=0.4960.
Iterxxyyzz
11.00001.00000.80000.80000.40000.4000
20.60000.60000.96000.96000.48000.4800
30.52000.52000.99200.99200.49600.4960
  X(3)=(0.5200, 0.9920, 0.4960)  \boxed{\;X^{(3)}=(0.5200,\ 0.9920,\ 0.4960)\;}

Step 3 — Exact solution

Solve directly. From the equations one finds

Answer

x=12,y=1,z=12.\boxed{x=\tfrac12,\quad y=1,\quad z=\tfrac12.}
We post more of this — worked solutions, CSAT trap breakdowns, guide chapters — a few times a week on Telegram. Free, no sign-in. Join

This solution is part of the Maths Coverage Map — 13 years, mapped. Get the take-away PDF free.