← 2019 Paper 2

UPSC 2019 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

Apply Gauss-Seidel iteration method to solve the following system of equations:

2x+y2z=17,3x+20yz=18,2x3y+20z=25,\begin{aligned}2x+y-2z&=17,\\ 3x+20y-z&=-18,\\ 2x-3y+20z&=25,\end{aligned}

correct to three decimal places.

Technique

Gauss–Seidel: solve each row for its diagonal variable and substitute the most recent values immediately; iterate to 3-dp stability.

Solution

Setup. Solve each equation for its “diagonal” unknown. Equation 2 (20y20y) and equation 3 (20z20z) are strongly diagonally dominant; equation 1 supplies xx:

x=17y+2z2,y=183x+z20,z=252x+3y20.x=\frac{17-y+2z}{2},\qquad y=\frac{-18-3x+z}{20},\qquad z=\frac{25-2x+3y}{20}.

Gauss–Seidel uses each freshly updated value immediately. Start x=y=z=0x=y=z=0.

Step 1 — Iterations

nnxxyyzz
18.5000−2.17500.0738
29.6613−2.3455−0.0680
39.6048−2.3441−0.0621
49.6100−2.3446−0.0627
59.6096−2.3446−0.0626
69.6096−2.3446−0.0627

Sample of iteration 1: x=170+02=8.5x=\frac{17-0+0}{2}=8.5; y=183(8.5)+020=43.520=2.175y=\frac{-18-3(8.5)+0}{20}=\frac{-43.5}{20}=-2.175; z=252(8.5)+3(2.175)20=25176.52520=0.07375z=\frac{25-2(8.5)+3(-2.175)}{20}=\frac{25-17-6.525}{20}=0.07375.

Successive values agree to three decimals from iteration 5 onward.

Answer

  x9.610,y2.345,z0.063.  \boxed{\;x\approx 9.610,\qquad y\approx -2.345,\qquad z\approx -0.063.\;}
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.