Professional Documents
Culture Documents
+ =
=
otherwise , 0
1 0 , 1
) (
1
1
1
x x N
x N
=
=
otherwise , 0
1 0 , 1
1
1
1
x
dx
dN
dx
dN
M1
A1
0
1
2
5
3
+ =
=
=
otherwise , 0
2 1 , 2
1 0 ,
) ( 2
2
1
2
2
x x N
x x N
x N
=
=
=
otherwise , 0
2 1 , 1
1 0 , 1
2
2
1
2
2
x
dx
dN
x
dx
dN
dx
dN
+ =
=
=
otherwise , 0
5 2 ,
3
5
3
2 1 , 1
) (
3
3
2
3
3
x
x
N
x x N
x N
=
=
=
otherwise , 0
5 2 ,
3
1
2 1 , 1
3
3
2
3
3
x
dx
dN
x
dx
dN
dx
dN
=
=
otherwise , 0
5 2 ,
3
2
3
) (
3
4
4
x
x
N
x N
=
=
otherwise , 0
5 2 ,
3
1
3
4
4 x
dx
dN
dx
dN
Find the components of the stiffness matrix,
q
j
i
ij
p
dN
dN
K Ak dx
dx dx
=
For first element,
) 1 (
K
= =
1
0
11
300 ) 1 )( 1 ( 300 dx K ,
= = = =
1
0
1
0
21 12
300 ) 1 )( 1 ( 300 ) 1 )( 1 ( 300 dx dx K K
= =
1
0
22
300 ) 1 )( 1 ( 300 dx K
|
|
\
|
=
300 300
300 300
) 1 (
K
For second element,
) 1 ( ) 2 (
K K = because of the same length.
= =
5
2
33
100 )
3
1
)(
3
1
( 300 dx K
M1
A1
M1
A1
M1
A1
M1
(1
st
element)
4
= = = =
5
2
5
2
43 34
100 )
3
1
)(
3
1
( 300 )
3
1
)(
3
1
( 300 dx dx K K
= =
5
2
4
100 )
3
1
)(
3
1
( 300 dx K
|
|
\
|
=
100 100
100 100
) 3 (
K
Hence assemble K for the whole domain will be
|
|
|
|
|
\
|
+
+
=
100 100 0 0
100 100 300 300 0
0 300 300 300 300
0 0 300 300
K
|
|
|
|
|
\
|
=
100 100 0 0
100 400 300 0
0 300 600 300
0 0 300 300
Find the components of boundary vector, ( )
q
b i
p
dT
F N Ak
dx
(
=
(
For first element
|
|
|
|
|
\
|
=
=
=
1
0
) 1 (
30
30
x
x
b
dx
dT
k
dx
dT
k
F
For second element,
) 1 ( ) 2 (
b b
F F = .
For third element,
|
|
|
|
|
\
|
=
=
=
5
2
) 3 (
30
30
x
x
b
dx
dT
k
dx
dT
k
F
Hence, assemble
|
|
|
|
|
|
|
\
|
=
=
300
0
0
30
0 x
b
dx
dT
k
F
Find the components of load vector,
=
q
p
i l
dx x Q N F ) (
First Element
M1
(2
nd
element)
A2
M1
M1
A2
5
( )
( )
|
|
\
|
=
|
|
|
|
|
|
|
|
\
|
+
=
5
5
1
10
1
0
1
0
) 1 (
dx x
dx x
F
l
Second Element,
) 1 ( ) 2 (
l l
F F =
Third Element,
|
|
\
|
=
|
|
|
|
|
\
|
|
\
|
|
\
|
+
=
15
15
3
2
3
3
5
3
10
5
2
5
2
) 2 (
dx
x
dx
x
F
l
Hence assemble
l
F
|
|
|
|
|
\
|
=
|
|
|
|
|
\
|
=
15
20
10
5
15
15 5
5 5
5
l
F
Therefore,
b l
KT F F =
|
|
|
|
|
\
|
+
|
|
|
|
|
|
|
\
|
=
|
|
|
|
|
\
|
|
|
|
|
|
\
|
=
15
20
10
5
300
0
0
30
100 100 0 0
100 400 300 0
0 300 600 300
0 0 300 300
0
4
3
2
1
x
dx
dT
k
T
T
T
T
1
0 T = , partition the matrix, the system of linear equations is
|
|
|
\
|
=
|
|
|
\
|
|
|
|
\
|
285
20
10
100 100 0
100 400 300
0 300 600
4
3
2
T
T
T
|
|
|
\
|
=
|
|
|
\
|
583 . 4
733 . 1
850 . 0
4
3
2
T
T
T
M1
M1
A2
M1
M1
A3
25
6
A1
Q3
(a)
(a) (i) Let ( ) ( ) ( ) ( ) cosh 3sin 3
2
h x f x g x x x
| |
= =
|
\
( )
( )
0.9 0.049
1.0 0.744
h
h
=
=
( ) ( ) 0.9 1.0 0
Satisfy IVT
h h <
( )
( )
2.3 0.457
2.4 1.017
h
h
=
=
( ) ( ) 2.3 2.4 0
Not satisfy IVT
h h >
( )
( )
2.8 0.708
2.9 0.032
h
h
=
=
( ) ( ) 2.8 2.9 0
Satisfy IVT
h h <
Thus, it is shown that two roots exist in interval | | 0.9 , 1.0 and | | 2.8 , 2.9 .
(ii) Bisection method:
i
i
a
i
c
i
b ) (
i
a f ( )
i
f c ( )
i
f b
0 2.8 2.85 2.9 0.708 0.366 0.032
1 2.85 2.875 2.9 0.366 0.174 0.032
2 2.875 2.888 2.9 0.174 0.068 0.032
3 2.888 2.894 2.9 0.068 0.018 0.032
4 2.894 2.897 2.9 0.018 0.007 0.032
5 2.894 2.896 2.897 0.018 0.001 0.007
Since ( )
5
0.001 0.005 f c = < = , thus the root for ( ) ( ) f x g x = is
5
2.896 c = .
Newton-Raphson method: (you may also start from point 2.8)
i
i
x ( )
i
h x ( ) '
i
h x
0 2.9 0.032 8.494
1 2.896 0.001
Since ( )
1
0.001 0.005 h x = < = , thus the root for ( ) ( ) f x g x = is
1
2.896 x = .
(ii) For Bisection method:
Percentage relative error
2.896 2.896
100% 0%
2.896
= =
For Newton-Raphson method:
Percentage relative error
2.896 2.896
100% 0%
2.896
= =
A1
M1 apply
IVT
A1
A1
M1 table
A1
A1
A1
M1
A1
M1 -table
A1
M1
A1
A1/2
A1/2
15
7
Q3
(b)
(i) Let
1
x as numbers of bacteria of Strain I,
2
x as numbers of bacteria of
Strain II and
3
x as numbers of bacteria of Strain III.
Thus, the system of linear equation is
2 3
1 2
1 2 3
2 700
5 400
3 500
x x
x x
x x x
+ =
+ =
+ + =
Thomas Algorithm method (in matrix form):
Rearrange so that matrix A is tridiagonal
1
2
3
0 1 2 700
5 1 0 400
1 3 1 500
x
x
x
| || | | |
| | |
=
| | |
| | |
\ \ \
1
2
3
5 1 0 400
1 3 1 500
0 1 2 700
x
x
x
| || | | |
| | |
=
| | |
| | |
\ \ \
i
Calculator
Symbol
Calculator
Formula
1 2 3
d
i
D 5 3 2
e
i
E 1 1 -
c
i
C - 1 1
b
i
B 400 500 700
1 1
d =
1
=
i i i i
c d
A CF D 5 2.8 1.643
i
i
i
e
=
F A E 0.2 0.357 -
1
1
1
b
y =
i
i i i
i
y c b
y
=
Y
A CY B ) (
80 150 334.753
3 3
y x =
1 +
=
i i i i
x y x
X FX Y 73.901 30.493 334.753
From the above table, ( ) 73.901 30.493 334.753
T
x .
Therefore, the number of bacteria that can coexist in the test tube is 74 bacteria of Strain
I, 30 bacteria of Strain II and 335 bacteria of Strain III.
A1
M1
M1 table
A1
values
from
matrix
A1
A1
A1
A1
A1
A1
(conclusion)
10
8
Q4
(a)
i x f h d b
0 -2 1.4 1 1.5 -13.2
1 -1 2.9 1 -0.7
2 0 2.2
0
2 0
= = m m
( )
1 1 1 2
2
k k k k k k k k
h m h h m h m b
+ + + +
+ + + =
When 0 = k , ( )
0 0 0 1 1 1 2 0
2 h m h h m h m b + + + =
2 . 13 ) 0 )( 1 ( ) 1 1 ( 2 ) 0 )( 1 (
1
= + + + m
3 . 3 4 / 2 . 13
1
= = m
( )
3 3 1 1 1
1 1
( ) ( ) ( ) ( ),
6 6 6 6
k k k k k k
k k k k k k k
k k k k
m m f m f m
S x x x x x h x x h x x
h h h h
+ + +
+ +
| | | |
= + + +
| |
\ \
1 2 , 0 = x k
1 . 1 55 . 4 3 . 3 55 . 0
9 . 6 45 . 3 4 . 1 4 . 1 4 . 4 6 . 6 3 . 3 55 . 0
) 2 ( 45 . 3 ) 1 ( 4 . 1 ) 2 ( 55 . 0
)) 2 ( ( ) 1 (
6
) 3 . 3 (
1
9 . 2
) 1 ( 0
1
4 . 1
)) 2 ( (
) 1 ( 6
3 . 3
0
) (
6
) (
6
) (
6
) (
6
2 3
2 3
3
3
0 0
1
0
1
1 0
0
0
0 3
0
0
1 3
1
0
0
0
+ =
+ + =
+ + + + =
|
\
|
+ |
\
|
+ =
|
|
\
|
+
|
|
\
|
+ + =
x x x
x x x x x
x x x
x x x
x x h
m
h
f
x x h
m
h
f
x x
h
m
x x
h
m
S
0 1 , 1 = x k
2 . 2 25 . 1 55 . 0
) 1 ( 2 . 2 ) ( 45 . 3 ) ( 55 . 0
)) 1 ( ( 0
1
2 . 2
) 0 ( ) 1 (
6
) 3 . 3 (
1
9 . 2
0 ) 0 (
) 1 ( 6
3 . 3
) (
6
) (
6
) (
6
) (
6
3
3
3
1 1
2
1
2
2 1
1
1
1 3
1
1
2 3
2
1
1
1
+ =
+ + + =
|
\
|
+ |
\
|
+ + +
|
|
\
|
+
|
|
\
|
+ + =
x x
x x x
x x x
x x h
m
h
f
x x h
m
h
f
x x
h
m
x x
h
m
S
+
+
=
. 0 1 , 2 . 2 25 . 1 55 . 0
, 1 2 , 1 . 1 55 . 4 3 . 3 55 . 0
) (
3
2 3
x x x
x x x x
x S
M3
M1
A1
M1
M1
A1
M1
M1
A1
A1
12
9
Q4
(b)
3-point central;
unit/s 280 . 2
1 . 0
276 . 7 504 . 7
) 05 . 0 ( 2
) 30 . 3 ( ) 40 . 3 (
) 35 . 3 ( =
=
y y
y
5-point difference;
unit/s 280 . 2
6 . 0
164 . 7 ) 276 . 7 ( 8 ) 504 . 7 ( 8 620 . 7
) 05 . 0 ( 12
) 25 . 3 ( ) 30 . 3 ( 8 ) 40 . 3 ( 8 ) 45 . 3 (
) 35 . 3 (
=
+ +
=
+ +
=
y y y y
y
M2
A1
M2
A1
6
Q4
(c)
x y
x x y
82 . 0 09 . 2
41 . 0 09 . 2 15 . 2
2
=
+ =
i x y 2
) ( 1 y +
0
1
2
3
4
5
6
7
8
9
0
0.4
0.8
1.2
1.6
2.0
2.4
2.8
3.2
3.6
2.090
1.762
1.434
1.106
0.778
0.450
0.122
0.206
0.534
0.862
2.317
2.026
1.748
1.491
1.267
1.097
1.577
1.021
1.134
1.320
3.637 8.293 3.068
| | 198 . 5 ) 068 . 3 ( 2 ) 293 . 8 ( 3 637 . 3 ) 4 . 0 (
8
3
) ( 1
6 . 3
0
2
= + + +
dx y m.
M1
M1
(table)
A1
(column y )
A2
(column
( )
2
1 y + )
M1
A1
7
Q5 (a)
k
( )
( )
T
k
v
( )
( )
T
k
Av
1 k
m
+
0 1 1 0 7 7 -1 7
1 1 1 -0.143 7 7.143 -1.572 7.143
2 0.98 1 -0.22 6.92 7.16 -1.88 7.16
3 0.966 1 -0.263 6.864 7.161 -2.052 7.161
4 0.959 1 -0.287
Since
4 3
| | 0.001 m m = < , then the largest eigenvalue, is 7.161 with corresponding
eigenvector, ( )
(4)
0.959 1 0.287
T
v = .
M1
(table)
A1
A1
A1
A1
(by row)
A1
A1
7
10
(b)
i x y k1 k2 k3 k4
0 1.000 5.000 -3.000 -1.422 -2.487 -0.678
1 1.200 3.084 -1.255 -0.813 -1.040 -0.586
2 1.400 2.159 -0.689 -0.504 -0.583 -0.401
Using RK4 159 . 2 ) 4 . 1 ( y
absolute error 006 . 0 159 . 2 153 . 2 = =
M1
(table)
A5
(by row)
A1
A1
8
Q5
(c)
5 4 6
1 1
0
6 . 0
) 2 (
6 . 2
) 1 (
y y y
x at condition boundary y Find
y y
x at condition boundary y Find
n
=
=
=
=
]
4
) [( ) 2 . 0 ( 2
,
4
3 2
1 1
3
i i
i
i i i i
y x
x
x y y y
is equation al differenti given the technique difference finite of terms In
x
x xy y
= +
= +
+
) 1 ( 12 . 0 36 . 0 2
0
0 1
=
=
y y
i When
) 2 ( 064 . 0 952 . 1
1
0 1 2
= +
=
y y y
i When
) 3 ( 005 . 0 944 . 1
2
1 2 3
= +
=
y y y
i When
) 4 ( 064 . 0 936 . 1
3
2 3 4
= +
=
y y y
i When
) 5 ( 144 . 0 928 . 1
4
3 4 5
= +
=
y y y
i When
) 6 ( 240 . 0 52 . 2 2
5
5 4
=
=
y y
i When
System of equations (1) (6)
0.360 2.000 0.000 0.000 0.000 0.000
1.000 1.952 1.000 0.000 0.000 0.000
0.000 1.000 1.944 1.000 0.000 0.000
0.000 0.000 1.000 1.936 1.000 0.000
0.000 0.000 0.000 1.000 1.928 1.000
0.000 0.000 0.000 0.000 2.000 2.520
(
(
0
1
2
3
4
5
0.120
0.064
0.005
=
0.064
0.144
0.240
y
y
y
y
y
y
( (
( (
( (
( ( (
( ( (
( ( (
( ( (
( ( (
( ( (
M1
M1
M1
A1
A1
A1
A1
A1
A1
A1
10