← 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+9x22x3=113x_1+9x_2-2x_3=11, 4x1+2x2+13x3=244x_1+2x_2+13x_3=24, 4x12x2+x3=84x_1-2x_2+x_3=-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>jiaij|a_{ii}|>\sum_{j\ne i}|a_{ij}| for each row.

Row 1: 3|3| vs 9+2=119+2=11. 3<113<11, fails. Row 2: 2|2| vs 4+13=174+13=17. Fails. Row 3: 1|1| vs 4+2=64+2=6. Fails.

Not diagonally dominant in given order. Need to rearrange.

Step 2 — Rearrange rows

Look for permutations making diagonal dominant:

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=244x_1+2x_2+13x_3=24 — coefficient 4 for x1x_1, 13 for x3x_3. Place this as the third equation (so x3x_3 on diagonal).

Equation 1 (target x1x_1): need large coefficient for x1x_1. Row 3: 4x12x2+x3=84x_1-2x_2+x_3=-8. Coefficient 4 vs 2+1=32+1=3 — diagonally dominant for row 3.

Equation 2 (target x2x_2): row 1: 3x1+9x22x3=113x_1+9x_2-2x_3=11. Coefficient 9 vs 3+2=53+2=5 — dominant ✓.

Equation 3 (target x3x_3): row 2: 4x1+2x2+13x3=244x_1+2x_2+13x_3=24. Coefficient 13 vs 4+2=64+2=6 — dominant ✓.

Rearranged system:

4x12x2+x3=8(x1)4x_1-2x_2+x_3=-8\qquad(\to x_1) 3x1+9x22x3=11(x2)3x_1+9x_2-2x_3=11\qquad(\to x_2) 4x1+2x2+13x3=24(x3)4x_1+2x_2+13x_3=24\qquad(\to x_3)

All three rows diagonally dominant ✓.

Step 3 — Iterative formulas

x1=(8+2x2x3)/4x_1=(-8+2x_2-x_3)/4. x2=(113x1+2x3)/9x_2=(11-3x_1+2x_3)/9. x3=(244x12x2)/13x_3=(24-4x_1-2x_2)/13.

Step 4 — Iterate (initial guess x1=x2=x3=0x_1=x_2=x_3=0)

Iter 1: x1=(8+00)/4=2x_1=(-8+0-0)/4=-2. x2=(113(2)+0)/9=(11+6)/9=17/91.889x_2=(11-3(-2)+0)/9=(11+6)/9=17/9\approx 1.889. x3=(244(2)2(1.889))/13=(24+83.778)/13=28.222/132.171x_3=(24-4(-2)-2(1.889))/13=(24+8-3.778)/13=28.222/13\approx 2.171.

Iter 2: x1=(8+2(1.889)2.171)/4=(8+3.7782.171)/4=6.393/41.598x_1=(-8+2(1.889)-2.171)/4=(-8+3.778-2.171)/4=-6.393/4\approx -1.598. x2=(113(1.598)+2(2.171))/9=(11+4.795+4.343)/9=20.138/92.238x_2=(11-3(-1.598)+2(2.171))/9=(11+4.795+4.343)/9=20.138/9\approx 2.238. x3=(244(1.598)2(2.238))/13=(24+6.3914.476)/13=25.915/131.993x_3=(24-4(-1.598)-2(2.238))/13=(24+6.391-4.476)/13=25.915/13\approx 1.993.

Iter 3: x1=(8+2(2.238)1.993)/4=(8+4.4761.993)/4=5.517/41.379x_1=(-8+2(2.238)-1.993)/4=(-8+4.476-1.993)/4=-5.517/4\approx -1.379. x2=(113(1.379)+2(1.993))/9=(11+4.137+3.986)/9=19.124/92.125x_2=(11-3(-1.379)+2(1.993))/9=(11+4.137+3.986)/9=19.124/9\approx 2.125. x3=(244(1.379)2(2.125))/13=(24+5.5174.25)/13=25.267/131.944x_3=(24-4(-1.379)-2(2.125))/13=(24+5.517-4.25)/13=25.267/13\approx 1.944.

Iter 4: x1=(8+2(2.125)1.944)/4=(8+4.2501.944)/4=5.694/41.424x_1=(-8+2(2.125)-1.944)/4=(-8+4.250-1.944)/4=-5.694/4\approx -1.424. x2=(113(1.424)+2(1.944))/9=(11+4.271+3.887)/9=19.158/92.129x_2=(11-3(-1.424)+2(1.944))/9=(11+4.271+3.887)/9=19.158/9\approx 2.129. x3=(244(1.424)2(2.129))/13=(24+5.6944.257)/13=25.437/131.957x_3=(24-4(-1.424)-2(2.129))/13=(24+5.694-4.257)/13=25.437/13\approx 1.957.

Iter 5: x1=(8+2(2.129)1.957)/4=(8+4.2571.957)/4=5.700/41.425x_1=(-8+2(2.129)-1.957)/4=(-8+4.257-1.957)/4=-5.700/4\approx -1.425. x2=(113(1.425)+2(1.957))/9=(11+4.275+3.914)/9=19.189/92.132x_2=(11-3(-1.425)+2(1.957))/9=(11+4.275+3.914)/9=19.189/9\approx 2.132. x3=(244(1.425)2(2.132))/13=(24+5.7004.263)/13=25.437/131.957x_3=(24-4(-1.425)-2(2.132))/13=(24+5.700-4.263)/13=25.437/13\approx 1.957.

Iterates have stabilised.

Answer

  x11.425,  x22.132,  x31.957 (to 4 sig figs).  \boxed{\;x_1\approx -1.425,\;x_2\approx 2.132,\;x_3\approx 1.957\text{ (to 4 sig figs)}.\;}
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.