← 2015 Paper 2
UPSC 2015 Maths Optional Paper 2 Q8b — Step-by-Step Solution
15 marks · Section B
Gauss-Seidel iteration · Numerical Analysis · asked 7× in 13 yrs · Read the full method →
Question
Find the solution of the system
10x1−2x2−x3−x4=3,
−2x1+10x2−x3−x4=15,
−x1−x2+10x3−2x4=27,
−x1−x2−2x3+10x4=−9,
using Gauss-Seidel method (make four iterations).
Technique
Standard Gauss-Seidel iteration using diagonal-dominant rearrangement; each new xi(k+1) uses already-updated x1(k+1),…,xi−1(k+1) and old xi+1(k),…,xn(k).
Solution
Setup. Rearrange each equation to solve for the diagonal variable:
x1=103+2x2+x3+x4,
x2=1015+2x1+x3+x4,
x3=1027+x1+x2+2x4,
x4=10−9+x1+x2+2x3.
Diagonal dominance check: Each diagonal has ∣10∣ vs. sum of off-diagonals ∣−2∣+∣−1∣+∣−1∣=4, so 10>4 ✓. Gauss-Seidel converges.
Initial guess: xi(0)=0 for all i.
Iteration 1 (use most recent values)
x1(1)=(3+0+0+0)/10=0.3.
x2(1)=(15+2(0.3)+0+0)/10=(15+0.6)/10=1.56.
x3(1)=(27+0.3+1.56+0)/10=(28.86)/10=2.886.
x4(1)=(−9+0.3+1.56+2(2.886))/10=(−9+0.3+1.56+5.772)/10=(−1.368)/10=−0.1368.
After iter 1: (0.3,1.56,2.886,−0.1368).
Iteration 2
x1(2)=(3+2(1.56)+2.886−0.1368)/10=(3+3.12+2.886−0.1368)/10=(8.8692)/10=0.88692.
x2(2)=(15+2(0.88692)+2.886−0.1368)/10=(15+1.77384+2.886−0.1368)/10=(19.52304)/10=1.952304.
x3(2)=(27+0.88692+1.952304+2(−0.1368))/10=(27+0.88692+1.952304−0.2736)/10=(29.565624)/10=2.9565624.
x4(2)=(−9+0.88692+1.952304+2(2.9565624))/10=(−9+0.88692+1.952304+5.9131248)/10=(−0.2476512)/10=−0.02476512.
After iter 2: (0.88692,1.952304,2.9565624,−0.02476512).
Iteration 3
x1(3)=(3+2(1.952304)+2.9565624−0.02476512)/10=(3+3.904608+2.9565624−0.02476512)/10=(9.83640528)/10=0.983640528.
x2(3)=(15+2(0.983640528)+2.9565624−0.02476512)/10=(15+1.967281056+2.9565624−0.02476512)/10=(19.899078)/10=1.9899078.
x3(3)=(27+0.983640528+1.9899078+2(−0.02476512))/10=(27+0.983640528+1.9899078−0.04953024)/10=(29.92401809)/10=2.992401809.
x4(3)=(−9+0.983640528+1.9899078+2(2.992401809))/10=(−9+0.983640528+1.9899078+5.984803618)/10=(−0.041648054)/10=−0.0041648054.
After iter 3: (0.9836,1.9899,2.9924,−0.00416) (rounded).
Iteration 4
x1(4)=(3+2(1.9899078)+2.992401809−0.0041648054)/10=(3+3.9798156+2.992401809−0.0041648054)/10=(9.96805260)/10=0.996805260.
x2(4)=(15+2(0.996805260)+2.992401809−0.0041648054)/10=(15+1.99361052+2.992401809−0.0041648054)/10=(19.98184752)/10=1.998184752.
x3(4)=(27+0.996805260+1.998184752+2(−0.0041648054))/10=(27+0.996805260+1.998184752−0.008329611)/10=(29.98666040)/10=2.998666040.
x4(4)=(−9+0.996805260+1.998184752+2(2.998666040))/10=(−9+0.996805260+1.998184752+5.99733208)/10=(−0.00767791)/10=−0.000767791.
After iter 4: (0.9968,1.9982,2.9987,−0.000768).
Convergence to exact solution
The iterates clearly converge to (1,2,3,0). Verify:
- 10(1)−2(2)−3−0=10−4−3=3 ✓
- −2(1)+10(2)−3−0=−2+20−3=15 ✓
- −1−2+10(3)−2(0)=27 ✓
- −1−2−2(3)+10(0)=−9 ✓
So exact solution is (x1,x2,x3,x4)=(1,2,3,0).
Summary table
| Iter | x1 | x2 | x3 | x4 |
|---|
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0.3 | 1.56 | 2.886 | -0.1368 |
| 2 | 0.88692 | 1.95230 | 2.95656 | -0.02477 |
| 3 | 0.98364 | 1.98991 | 2.99240 | -0.00416 |
| 4 | 0.99681 | 1.99818 | 2.99867 | -0.00077 |
Answer
After 4 iterations: (0.9968,1.9982,2.9987,−0.00077);exact: (1,2,3,0).