← 2021 Paper 2
UPSC 2021 Maths Optional Paper 2 Q7b — Step-by-Step Solution
15 marks · Section B
Gauss-Seidel iteration · Numerical Analysis · asked 7× in 13 yrs · Read the full method →
Question
Solve 3x1+9x2−2x3=11, 4x1+2x2+13x3=24, 4x1−2x2+x3=−8 correct to 4 sig figs by Gauss-Seidel, after verifying applicability in transformed form.
Technique
Rearrange rows to achieve diagonal dominance; standard Gauss-Seidel iteration with new ordering; iterate until convergence.
Solution
Step 1 — Check diagonal dominance
For Gauss-Seidel convergence (sufficient condition): strict diagonal dominance, ∣aii∣>∑j=i∣aij∣ for each row.
Row 1: ∣3∣ vs 9+2=11. 3<11, fails.
Row 2: ∣2∣ vs 4+13=17. Fails.
Row 3: ∣1∣ vs 4+2=6. Fails.
Not diagonally dominant in given order. Need to rearrange.
Step 2 — Rearrange rows
Look for permutations making diagonal dominant:
- Choose row with large coeff of x1 for first equation. Coefficients of x1: 3, 4, 4. Take 4 (rows 2 or 3) — both candidates.
- Choose row with large coeff of x2 for second equation: coefficients 9, 2, -2. Take 9 (row 1).
- Choose row with large coeff of x3 for third equation: 13.
Re-order: row 2 → first equation, row 1 → second, row 2 again? No, each row used once.
Try: equation 1 (uses row 2): 4x1+2x2+13x3=24 — coefficient 4 for x1, 13 for x3. Place this as the third equation (so x3 on diagonal).
Equation 1 (target x1): need large coefficient for x1. Row 3: 4x1−2x2+x3=−8. Coefficient 4 vs 2+1=3 — diagonally dominant for row 3.
Equation 2 (target x2): row 1: 3x1+9x2−2x3=11. Coefficient 9 vs 3+2=5 — dominant ✓.
Equation 3 (target x3): row 2: 4x1+2x2+13x3=24. Coefficient 13 vs 4+2=6 — dominant ✓.
Rearranged system:
4x1−2x2+x3=−8(→x1)
3x1+9x2−2x3=11(→x2)
4x1+2x2+13x3=24(→x3)
All three rows diagonally dominant ✓.
x1=(−8+2x2−x3)/4.
x2=(11−3x1+2x3)/9.
x3=(24−4x1−2x2)/13.
Step 4 — Iterate (initial guess x1=x2=x3=0)
Iter 1:
x1=(−8+0−0)/4=−2.
x2=(11−3(−2)+0)/9=(11+6)/9=17/9≈1.889.
x3=(24−4(−2)−2(1.889))/13=(24+8−3.778)/13=28.222/13≈2.171.
Iter 2:
x1=(−8+2(1.889)−2.171)/4=(−8+3.778−2.171)/4=−6.393/4≈−1.598.
x2=(11−3(−1.598)+2(2.171))/9=(11+4.795+4.343)/9=20.138/9≈2.238.
x3=(24−4(−1.598)−2(2.238))/13=(24+6.391−4.476)/13=25.915/13≈1.993.
Iter 3:
x1=(−8+2(2.238)−1.993)/4=(−8+4.476−1.993)/4=−5.517/4≈−1.379.
x2=(11−3(−1.379)+2(1.993))/9=(11+4.137+3.986)/9=19.124/9≈2.125.
x3=(24−4(−1.379)−2(2.125))/13=(24+5.517−4.25)/13=25.267/13≈1.944.
Iter 4:
x1=(−8+2(2.125)−1.944)/4=(−8+4.250−1.944)/4=−5.694/4≈−1.424.
x2=(11−3(−1.424)+2(1.944))/9=(11+4.271+3.887)/9=19.158/9≈2.129.
x3=(24−4(−1.424)−2(2.129))/13=(24+5.694−4.257)/13=25.437/13≈1.957.
Iter 5:
x1=(−8+2(2.129)−1.957)/4=(−8+4.257−1.957)/4=−5.700/4≈−1.425.
x2=(11−3(−1.425)+2(1.957))/9=(11+4.275+3.914)/9=19.189/9≈2.132.
x3=(24−4(−1.425)−2(2.132))/13=(24+5.700−4.263)/13=25.437/13≈1.957.
Iterates have stabilised.
Answer
x1≈−1.425,x2≈2.132,x3≈1.957 (to 4 sig figs).