Department of Mathematical Sciences
⋄
ASSIGNMENT 2
Year Module 2026
⋄
Module Code: APM2613
Module Name: Numerical Methods
Assignment No.: 2
Semester: Year Module 2026
Submitted in partial ful
lment of the requirements for APM2613
at the University of South Africa.
,UNISA | APM2613 Assignment 2 Numerical Methods
Contents
Page 1 of ??
,UNISA | APM2613 Assignment 2 Numerical Methods
Question 1: Systems of Linear Equations Gaussian Methods and LU Decom-
position [30 marks]
Question (Restatement):
Consider the linear system
4.444x1 + 12850x2 − 12.444x3 = 12842
3.333x1 + 14.520x2 + 8.715x3 = 26.568
1.2412x1 + 4.8213x2 + 2.1543x3 = 8.2168
Use 4 decimal place accuracy with rounding.
1.1(a): Gaussian Elimination Without Pivoting
The augmented matrix is:
4.4440 12850.0000 −12.4440 12842.0000
3.3330 14.5200 8.7150 26.5680
1.2412 4.8213 2.1543 8.2168
Step 1: Eliminate x1 from Row 2.
3.3330
Multiplier: m21 = = 0.7500
4.4440
R2 ← R2 − 0.7500 R1
(2)
a22 = 14.5200 − 0.7500 × 12850.0000 = 14.5200 − 9637.5000 = −9622.9800
(2)
a23 = 8.7150 − 0.7500 × (−12.4440) = 8.7150 + 9.3330 = 18.0480
(2)
b2 = 26.5680 − 0.7500 × 12842.0000 = 26.5680 − 9631.5000 = −9604.9320
Step 2: Eliminate x1 from Row 3.
1.2412
Multiplier: m31 = = 0.2793
4.4440
Page 2 of ??
,UNISA | APM2613 Assignment 2 Numerical Methods
R3 ← R3 − 0.2793 R1
(2)
a32 = 4.8213 − 0.2793 × 12850.0000 = 4.8213 − 3588.9050 = −3584.0837
(2)
a33 = 2.1543 − 0.2793 × (−12.4440) = 2.1543 + 3.4754 = 5.6297
(2)
b3 = 8.2168 − 0.2793 × 12842.0000 = 8.2168 − 3586.9806 = −3578.7638
The matrix after the
rst elimination stage:
4.4440 12850.0000 −12.4440 12842.0000
−9622.9800 −9604.9320
0 18.0480
0 −3584.0837 5.6297 −3578.7638
Step 3: Eliminate x2 from Row 3.
−3584.0837
Multiplier: m32 = = 0.3724
−9622.9800
R3 ← R3 − 0.3724 R2
(3)
a33 = 5.6297 − 0.3724 × 18.0480 = 5.6297 − 6.7235 = −1.0938
(3)
b3 = −3578.7638 − 0.3724 × (−9604.9320) = −3578.7638 + 3577.3946 = −1.3692
Upper triangular form:
4.4440 12850.0000 −12.4440 12842.0000
−9622.9800 −9604.9320
0 18.0480
0 0 −1.0938 −1.3692
Back Substitution:
−1.3692
x3 = = 1.2519
−1.0938
−9604.9320 − 18.0480 × 1.2519 −9604.9320 − 22.6013 −9627.5333
x2 = = = = 1.0005
−9622.9800 −9622.9800 −9622.9800
Page 3 of ??
, UNISA | APM2613 Assignment 2 Numerical Methods
12842.0000 − 12850.0000 × 1.0005 − (−12.4440) × 1.2519
x1 =
4.4440
12842.0000 − 12856.4250 + 15.5812 1.1562
= = = 0.2601
4.4440 4.4440
Key Distinction
Solution (without pivoting): x1 ≈ 0.2601, x2 ≈ 1.0005, x3 ≈ 1.2519
1.1(b): Gaussian Elimination with Scaled Partial Pivoting
Step 1: Compute scale factors (largest absolute value per row).
s1 = max(|4.4440|, |12850.0000|, |12.4440|) = 12850.0000
s2 = max(|3.3330|, |14.5200|, |8.7150|) = 14.5200
s3 = max(|1.2412|, |4.8213|, |2.1543|) = 4.8213
Step 2: Compute scaled ratios for column 1 pivot selection.
|4.4440| |3.3330| |1.2412|
r1 = = 0.0003, r2 = = 0.2296, r3 = = 0.2574
12850.0000 14.5200 4.8213
Largest ratio is r3 = 0.2574, so Row 3 becomes the pivot row. Swap R1 ↔ R3 :
1.2412 4.8213 2.1543 8.2168
3.3330 14.5200 8.7150 26.5680
4.4440 12850.0000 −12.4440 12842.0000
Step 3: Eliminate x1 from Rows 2 and 3.
3.3330
m21 = = 2.6854
1.2412
(2)
a22 = 14.5200 − 2.6854 × 4.8213 = 14.5200 − 12.9478 = 1.5722
(2)
a23 = 8.7150 − 2.6854 × 2.1543 = 8.7150 − 5.7869 = 2.9281
(2)
b2 = 26.5680 − 2.6854 × 8.2168 = 26.5680 − 22.0703 = 4.4977
Page 4 of ??