Asgn
docx
keyboard_arrow_up
School
Southeast Missouri State University *
*We aren’t endorsed by this school
Course
210
Subject
Mathematics
Date
Apr 3, 2024
Type
docx
Pages
5
Uploaded by ElderGalaxy6475
10.6 Use LU decomposition to determine the matrix inverse for the same system as in Prob. 10.2. Do not use a pivoting strategy, and check your results by verifying that [A][A] ' = 1.
7x1+2x2-3x3=-12, 2x1 +5x2-3x3 =-20 , x1 -x2-6x3=-26.
Writing the given system in matrix form yields:
[A] = 7
2
−
3
2
5
−
3
1
−
1
−
6
Transforming the given matrix into an upper triangular one using
Gauss eliminations. First, multiplying the first row by f
21
= 2/7 and
subtract it from the second one. Also, multiplying the first row by f
31
=3/7 subtract it from the third one.
7
2
−
3
0
4.43
−
2.143
0
−
1.28
−
6.43
Now multiplying the second row by f
32
= -1.28/4.43= -0.148148 and
subtracting it from the third one to obtain
7
2
−
3
0
4.43
−
2.143
0
0
−
6.193
similarly, [L]= 1
0
0
−
0.286
1
0
0.143
−
0.29
1
Hence, [A] = [L] [U]
The solutions of systems [A] {X
i
} = {e
i
} are the columns of the
matrix inverse of [A]. They can be determined by forward and back
substitution using the LU decomposition above. The forward
substitution will be used to find {Y
i
} from [L] {Y
i
} = {e
i
}, while back
substitution will be employed to solve [U] { Xi} = {Yi}
i = 1
y1=1
- 0.286y1 + y2 = 0 → y2 = 0.286
0.143y1 - 0.29y2 + У3 = 0 → y3 = -0.06
-6.193x3 = - 0.06 → x3 = 0.00795
4.43x2 -2.143X3 = 0.286 → x2 = 0.0713
7x1 + 2x2 - 3X3 = 1 → x1 = -0.8335
i = 2
y1=0
- 0.286y1 + y2 = 1 → y2 = 1
0.143y1 - 0.29y2 + У3 = 0 → y3 = 0.29
-6.193x3 =0.29 → x3 = -0.0468
4.43x2 -2.143X3 = 1 → x2 = 0.2032 7x1 + 2x2 - 3X3 = 0 → x1 = 0.11987
i= 3
y1=0
- 0.286y1 + y2 = 0 → y2 = 0
0.143y1 - 0.29y2 + У3 = 1 → y3 = 1
-6.193x3 =1 → x3 = -0.1615
4.43x2 -2.143X3 = 0 → x2 = -0.078
7x1 + 2x2 - 3X3 = 0 → x1 = -0.0915
[A]
−1
= −
0.8335
0.11987
−
0.0915
0.0713
0.2032
−
0.078
0.00795
−
0.0468
−
0.1615
Performing multiplication [A] [A]
−1
yields
0.6998691425 -0.085795545 0.071644485
-0.085795545 0.0578492969 -0.012919665 0.071644485
-0.012919665
0.03664474
Now that the system can now be solved as: {x} = [A]
−1
{B}
x
1
x
2
x
2
= −
0.8335
0.11987
−
0.0915
0.0713
0.2032
−
0.078
0.00795
−
0.0468
−
0.1615
x −
12
20
−
26
x
1
x
2
x
2
= 14.78
5.24
3.167
[A]
−1
≈
−
0.8335
0.11987
−
0.0915
0.0713
0.2032
−
0.078
0.00795
−
0.0468
−
0.1615
11.13 Use the Gauss-Seidel method (a) without relaxation
and (b) with relaxation (λ = 1.2) to solve the following
system to a tolerance of εs = 5%. If necessary, rearrange the
equations to achieve convergence. 2x1 −6x2 −x3 =−38 , −3x1 −x2 +7x3 =−34, −8x1 +x2 −2x3
=−20 (a)
In order to meet the condition sufficient for convergence, lets
rearrange the equations as follows.
-8x1+ x2 -2x3 =
-20
2x1 - 6x2 - X3 = -38
-3X1 - x2 + 7x3 = -34
(a)
Let’s perform iterations given by the equations using an initial guess
(x1, x2, x3) = (0,0, 0).
x1= (-20 - x2 + 2х3) / -8 = -20/-8 = 2.5
x2= (-38 -2x1 + x3) / -6 =(-38 - 2.25) /-6 = 7.16667
x3=(-34 + 3x1 + x2)/ 7 = (-34 + 3 .25 + 7.16667)/7 = -2.7619
As the initial guesses were all zero,
|E
a,i
|= |
xi−
0
xi
|1, i = 1,2,3
Continuing the computations until the required precision is
obtained.
iteration | x1 X2 X3 | |E
a,1
| |E
a,2
|
|E
a,3
|
-----------------------------------------------------------------------------------------------
--------
1 | 2.5 7.16667 2.7619 | 1 1
1
2 | 4.08631 8.15575 1.94076 | 0.3882 0.1213
0.4231
3 | 4.00466 7.99168 1.99919 | 0.0204 0.0205
0.0292
→(X1, X2, X3) = (4.00466,7.99168,1.99919) After Rounding off, (X1, X2, X3) ≈
(4,8, -2)
(
b
)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Following the same procedure which was used in part (a) using the
formulas above to obtain an approximation for Хі, i = 1, 2, 3 in each
step, but then altering the approximations using for the given value
of A.
First iteration
x1= (-20 - x2 + 2х3) / -8 = -20/-8 = 2.5
x1 = 1.2 • 2.5 + (1 - 1.2) • 0 = 1.2 • 2.5 - 0.2 • 0 = 3
x2= (-38 -2x1 + x3) / -6 =(-38 - 2.3) /-6 = 7.3333
x2=2=1.2
・
7.33333- 0.2
・
0 = 8.8
x3=(-34 + 3x1 + x2)/ 7 = (-34 + 3 .25 + 7.16667)/7 = -2.31429
x 3 =1.2
・
(-2.31429) - 0.2
・
0=
-
2.77715
→ |E
a,1
| = 1, i = 1,2, 3
Second iteration
x1=(-20-8.8+2
・
(-2.77715))/ -8 = 4.29428
x1= 1.2
・
4.29428-0.2
・
3
=
4.553145
→ |E
a,1
|= |(4.553145 - 3)/ 4.553145| = 0.3407
x2= (-38-2
・
4.553145- 2.77715)/6 = 8.3139
x2 = 1.2 • 8.3139 - 0.2 • 8.8 = 8.21668
8.21668 - 8.8
→ |E
a,1
|= |(8.21668-8.8)/8.21668| = 0.071
x3 =(-34+3
・
4.553145+ 8.21668)/ 7 = -1.73198
x3 = 1.2
・
(-1,73198)
-
0.2
・
(-2.77715) = -1.52295
→ |E
a,1
|= |(-1.52295+2.77715) /-1.52295 = 0.8235
iteration | x1 X2 X3 | |E
a,1
| |E
a,2
|
|E
a,3
|
-----------------------------------------------------------------------------------------------
--------
1 | 3 8.8 -2.77715 | 1 1
1
2 | 4.553145 8.21668 1.52295 | 0.3407 0.071
0.8235
3 | 3.77875 7.77275 -2.24815 | 0.204 9 0.0571
0.3226
4 | 4.0846 8.12892 -1.88476 | 0.0749 0.0430
0.1928
5 | 3.96785 7.93831 -2.05016 | 0.0294 0.024
0.0807
6 | 4.01222 8.02726 -1.97901 | 0.0111 0.0111
0.036
→(X1, X2, X3) = (4.01222,8.02726,-1.97901)
The value of 1 seems to have been chosen improperly, as this
method demonstrates a slower convergence that the version
without relaxation in part (a). However, the solution is
approximately the same after rounding off:
Therefore, (X1, X2, X3) ≈
(4,8, -2)