Exercise Chapter 3
Exercise Chapter 3
1)
Numerical Methods
x1 x2 3
4 x1 x2 2
Check your result using substitution method.
Answer: x1 1, x2 2
2)
3 x 2 7 x3 2
x1 2 x 2 x3 3
5 x1 2 x 2
Cramers rule.
(b)
Substitute your result back into the original equations to check your solutions.
Numerical Methods
By using the Nave Gauss elimination method, solve the following system of
linear equations.
pq 0
2 p 3q 3r 1
p q r 1
2
2
1
Answer: p 5 , q 5 , r 5
5)
12
Velocity,v(ms 1 )
106.8
177.2
279.2
TEST 1
BUM2313 1112I
BAM2012 10111
Table 1
The velocity data is approximated by a polynomial as
Numerical Methods
From the diagram, we obtain the following equations (these equations come from
statics theory):
Vertical forces:
F1 sin 69.3 F2 sin 71.1 F3 sin 56.6 + 926 = 0
Horizontal forces:
F1 cos 69.3 F2 cos 71.1 + F3 cos 56.6 = 0
Moments:
7.80 F1 sin 69.3 1.50 F2 sin 71.1 5.20 F3 sin 56.6 = 0
Rewrite the above equations in matrix form, AX B.
Hence, find the forces F1 , F2 and F3 using Gauss elimination as LU
factorization
u11 u12 u13
1 0 0
a.
b.
Numerical Methods
9 0 0 x1 12
0 25 0 x 15
2
0 0 4 x3 6
(i)
(ii)
Answer:(a ) U 0
(b) x1 , x2
8)
0 0
5 0
0 2
3
3
, x3
5
2
3x y 2 z 2
x 2 y 3z 1
2x 2 y z 3
(i)
(ii)
(iii)
3 1 2 x 2
Answer:(a) 1 2 3 y 1
2 2 1 z 3
0
0 1 1/ 3 2 / 3
3 1 2 3
(b) 1 2 3 1 7 / 3 0 0
1
1
2 2 1 2 4 / 3 1 0
0
1
Numerical Methods
Solve the following system of equations using Jacobi method. Compute up to the
v 1
0
1 1 .
T
4 2 1 x1 11
1 2 0 x 3
2
2 1 4 x3 16
7
63
93
Answer:
x
,
x
,
x
1
2
3
8
32
32
10)
Fine Gravel
Coarse Gravel
Pit 1 (x)
0.55
0.30
0.15
Pit 2 (y)
0.25
0.45
0.30
Pit 3 (z)
0.25
0.20
0.55
FINAL EXAM
BAM2012 1011I
BAM2012 10111
(i)
Set up the system of linear equations which modeling the problem above.
(ii)
(iii)
How many cubic meters can be hauled from each pit in order to meet the
engineers needs by using two iterations of Gauss Seidel method with
1000 m 3
initial estimation of sand, fine gravel and coarse gravel are 1000 m 3 .
1000 m 3
Numerical Methods
k
k
(b) x k 1
0.55
k 1
k
5800 0.30 x
0.20 z
y k 1
0.45
k 1
k 1
5700 0.15 x
0.30 y
k 1
0.55
11)
FINAL EXAM
BET2553 1011II
BAM2012 10111
0
2 1
A 1 2 1 .
0
1 2
Find the dominant eigenvalue of matrix A using power method. Take the initial
vector v
0
1 and perform three iterations.
0
Numerical Methods
y 5 xy x 2
Use the Newton-Raphson method and employ two iterations with initial guesses
of x y 1.2
Answer: x 1.36624, y 0.23673
V1 = V2 = 5.
TEST I
BUM2313 1213II
Figure 1
Using Kirchoffs law, we have
V1 (i2 i1 ) R2 (i4 i1 ) R4 i1 R1
V2 i2 R3 (i2 i1 ) R2 (i2 i3 ) R5
0 i3 R8 (i3 i2 ) R5 (i3 i4 ) R7
0 (i4 i3 ) R7 (i4 i1 ) R4 i4 R6
Numerical Methods
R1 R2 R4
R2
R4
R2
R2 R3 R5
R5
0
0
R5
R5 R7 R8
R7
R4
i1 V1
i V
0
2 2
i3 0
R7
R4 R6 R7 i4 0
(a)
(b)
0
1.291
3.873 1.291
0
3.2145 0.6222 0.5185
.
U
0
0
2.3691 0.9804
0
0
2.4705
0
(c)
i1 0.2768
15 5 0 5
i3 0.0565
0 2 6 2
5 0 2 9
i4 0.1412
Numerical Methods
14) Thermistors measure temperature, have a nonlinear output and are valued for a
limited range. So when a thermistor is manufactured, the manufacturer supplies a
resistance versus temperature curve. An accurate representation of the curve is generally
given by
1
T
where T is temperature in Celsius, R is resistance in ohms, and x1 , x2 , x3 are constants of
x1 x2 ln R x3 (ln R ) 2
T ( C )
911.3
30.131
636.0
40.120
451.1
50.128
TEST2
BUM2313 1213II
(a)
(b)
Set up the system of linear equations which modeling the problem above.
Rewrite in matrix form, [A][ x] [B] based on the system of linear equations in
(c)
(a).
Hence, find the dominant eigenvalue and its corresponding eigenvector of matrix
1, 0,1
0.8212
SUPPLEMENTARY EXERCISES
Universiti Malaysia Pahang
Numerical Methods
1.
2 x1 6 x2 x3 38
3x1 x2 7 x3 34
8 x1 x2 2 x3 20
(a)
(b)
Substitute your result into the original equations to check your answer.
Answer: x1 4, x2 8, x3 2
2.
Component
Metal
Plastic
Rubber
(g/component) (g/component)
(g/component)
15
0.30
1.0
17
0.40
1.2
19
0.55
1.5
If totals of 3.89, 0.095, and 0.282 kg of metal, plastic, and rubber, respectively,
are available each day, how many components can be produced per day?
Numerical Methods
TEST 1
BMM2112
1011I
Find i1 for the system of linear equations using Cramers rule. (Use 4
decimal
(ii)
Find i2 , i3 and i4, for the system of linear equations using Nave Gauss
Elimination methods. (Use 4 decimal places in your calculation)
Numerical Methods
LU FACTORI ZATION
4. Given
2
1
3
2
1
2
2
1
1
1
2
9
1
5
3
1
1
7
1
2 x1 29
1 x 2 20
5 x3 61
1 x 4 41
8 x5 63
Show that
Then, solve the above system by using Cholesky factorization. (Use 5 decimal places)
Answer: x1 1, x2 2, x3 3, x4 4, x5 5
5. Given
2
1
3
2
1
2
2
1
1
1
2
9
1
5
3
1
1
7
1
2 x1 74
1 x 2 55
5 x3 151
1 x 4 106
8 x5 148
Numerical Methods
Show that
Then, solve the above system by using Cholesky factorization. (Use 5 decimal places)
Answer: x1 6, x2 7, x3 8, x4 9, x5 10
6. (a) Use nave Gauss elimination to factor the following system
10x1 2 x 2 x 3 27
3x1 6 x 2 2 x 3 61.5
x1 x 2 5 x 3 21.5
Then, multiply the resulting [L] and [U] matrices to determine that [A] is
produced.
(b) Use LU factorization to solve the system of equations in Prob 1. Show all
the steps in the computation.
0
0 0
2
1
1
1
0 0 5.4
1.7
Answer:(a) L U 0.3
0.1 0.1481 1 0
0
5.3519
(b) x1 0.5, x2 8, x3 6
Numerical Methods
Decompose the following system into [L] and [U] using Gauss elimination as LU
factorization.
8 x1 x2 2 x3 20
2 x1 6 x2 x3 38
3x1 x2 7 x3 34
0
0 8
1
2
1
1
0 0 5.75 1.5
Answer: L U 0.25
0.375 0.2391 1 0
0
8.1087
8 20 15 x1 50
20 80 50 x 250
2
15 50 60 x 3 100
(b) Employ the result of the factorization [U] to determine the solution for the
right hand side vector.
5.4772 2.2822
Answer:(a) U
5.1640
3x1 2 x 2 x 3 10
2 x1 6 x 2 4 x 3 44
x1 2 x 2 5 x 3 26
Answer: x1 1, x2 5, x3 3
10.
Numerical Methods
2.5
Ni organic phase, g g l
8.57
10
12
TEST 1
BUM2313
1112I
g x1a2 x2a x3 .
Solve the above system using Nave gauss elimination as LU factorization.
TEST 1
BET2553
1011II
x 2 y 3 z 4
4 x 5 y 6 z 4
7 x 8 y 10z 7
(i)
(ii)
Answer:(i) A 4
(ii) A 4
2 3
4
5 6 b 4
7
8 10
0 0 1 2 3
1 0 0 3 6
2 1 0 0 1
Numerical Methods
FINAL
EXAM
BET2553
0910II
2 x1 2 x 2 x3 2
5 x1 x 2 3x3 0
3x1 4 x 2 x3 9
(i)
(ii)
(iii)
2 2
Answer: 5 1
3 4
x1 1, x2
1 x1 2
3 x2 0
1 x3 9
1, x3 2
TEST 1
BUM2313
1011II
The total of 2.12, 0.0434 and 0.1640 kg of metal, plastic and rubber, respectively
are available each day.
(i)
Transform the above problem into upper triangular matrix by using nave
Gauss elimination method.
(ii)
Hence,
find
the
solution
for
the
matrix
vector
{ x}
by
Numerical Methods
x1 2 x 2 10x3 42
10x1 3x2 x3 38
2 x1 10x 2 3x3 37
Using TWO iterations of the Jacobi iteration. Compute the estimated errors after
each iteration. If necessary, rearrange the equations to achieve convergence.
Let x 0 0,0,0 . Use THREE decimal places in your calculation.
1 x1 38
10 3
Answer: 2 10 3 x2 37
1
2 10 x3 42
2 x1 x2 5 x3 15
4 x1 x2 x3 7
4 x1 8 x2 x3 21
Using TWO iterations of the Jacobi iteration. Compute the estimated errors after
each iteration. If necessary, rearrange the equations to achieve convergence.
Let x 0 0,0,0 . Use THREE decimal places in your calculation.
4 1 1 x1 7
Answer: 4 8 1 x2 21
2 1 5 x3 15
Numerical Methods
Metal
Plastic
Rubber
(g/component)
(g/component)
(g/component)
15
0.30
1.0
17
0.40
1.2
19
0.55
1.5
The totals of 3.89, 0.095, and 0.282 kg of metal, plastic, and rubber, respectively,
are available each day. Using Gauss Seidal method with initial guesses of
Compute up to 2 iterations.
FINAL
EXAM
BAM2012
1011I
(i)
Set up the system of linear equations which modeling the problem above.
(ii)
(iii)
Find the measure of each angle by using Gauss Seidel method with initial
45
guess of acute angle A and B are and stopping criterion of 20%.
45
Answer:(i) A B 90
A 2B 6
(ii) A k 1 90 B k
6 A k 1
k 1
B
A 54.75
(iii)
B 30.375
Numerical Methods
9 4
A
4 3
Find the dominant eigenvalue of matrix A and the corresponding eigenvector
1
using power method. Take the initial vector v 0 and compute up to THREE
1
iterations.
Corresponding eigenvector =
0.5003
4 1 1
A 2 4 1
0 1 4
FINAL
EXAM
BET2553
1011II
Find the dominant eigenvalue of matrix A using power method. Take the initial
T
vector v 0 1 1 1 and stop the calculation when a 5% .
0.7742
Corresponding eigenvector = 1
0.5484
Numerical Methods
1 2 0
2 1 2
1 3 1
FINAL
EXAM
BET2553
0910II
a 20%
Answer: Dominant eigenvalue = 2.6363
0.0345
Corresponding eigenvector = 1
0.2414
21. Using three iterations, find the dominant eigenvalue, 1 of matrix A and the
corresponding eigenvector using power method for the following matrix A:
(a)
2 1 1
T
A 1 2 1 , v(0) 1 1 2
1 1 2
(b)
1 1 1
T
A 1 1 0 , v(0) 1 1 1
1 0 1
(c)
1 1 0
T
A 2 4 2 , v(0) 1 2 1
0 1 2
Answer: (a)
(b)
(c)
Dominant eigenvalue = 3
Corresponding eigenvector = 1 1 1
Dominant eigenvalue = 5
T
Corresponding eigenvector = 0.2895 1 0.2105
Dominant eigenvalue = 3.6667
Numerical Methods
NONLINE AR SYSTEMS
22. Use the multiple-equation Newton-Raphson method with ONE iteration only to
determine roots of
x12 x1 x2 10
x2 3 x1 x2 2 57
Initiate the computation with guesses of x1 1.5 and x2 3.5.
x2 5 y2
y 1 x2
using Newton-Raphson with TWO iterations and initial guesses of x y 1.5
10x3 y 0
xy 1 0
Find the solution of the following equations using Newton-Raphson method with
TWO iterations and initial guesses of x 1.8552, y 0.4718.
10x 2 y 2 10 0
x2 y2 4x 2 y 1 0
Find the solution of the following equations using Newton-Raphson method with
ONE iteration only. Initiate the computation with guesses of x y 1.
Answer: x 0.5, y 8
Universiti Malaysia Pahang
Numerical Methods
26. Given
TEST 2
BMM2112
1011I
10x 2 y 2 10 0
x2 y2 4x 2 y 1 0
y 2.4566.
REFERENCES