Numerical Analysis Solution
Numerical Analysis Solution
ANALYSIS
(SOLVED EXERCISES)
Olayinka G. Okeola
Question:
Determine the values of such that the b.v.p u"u 0 ; u (0) 0 ; u (1) 0 has non-trivial
solution for n 5 using canomical form of solution.
Solution
Recall Chebyshev polynomial
Tn ( x) cos(arc cos x) ; 1 x 1
n 0 To ( x) cos 0 1
n 1 T1 ( x) cos(arc cos x ) x
The recursive relation generated as follows:
T2 ( x) 2 x 2 1
T3 ( x ) 4 x 3 3 x
T4 ( x) 8 x 4 8 x 2 1
T5 ( x ) 16 x 5 20 x 3 5 x
x , are constants
0
(1)
(2)
1
2
Hence
1
1
x
2
2
Page
x 2 1
2 x 1
To ( x) 1
T1 ( x) 2 x 1
T2 ( x) 2(2 x 1) 2 1 8 x 2 8 x 1
T3 ( x ) 4( 2 x 1) 3 3( 2 x 1) 32 x 3 48 x 2 1
U " U 0
2
)U 0
x 2
LU 0
x 2
LQi ( x) x i
L
LQi ( x) i (i 1) x i 2 x i
LQi ( x) i (i 1) LQi 2 ( x) LQi
L{LQi ( x)} i (i 1) LQi 2 ( x) LQi
LQi ( x) i (i 1)Qi 2 ( x) Qi
Page
1
Qi ( x) x i i (i 1)Qi 2 ( x)
x
i 1 Q1 ( x)
x2 2
i 2 Q2 ( x )
2
x 3 6x
i 3 Q3 ( x)
2
x 4 12 24
i 4 Q4 ( x )
2 3
x 5 20 x 3 120 x
2 3
i 5 Q5 ( x)
i 0 Qo ( x)
LU 0
LU n ( x) 1 ( x)Tn ( x) 2 ( x)Tn1 ( x)
n
1 ( x)Tn ( x) 1 ( x)ci ( n ) x i
i 0
n 1
2 ( x)Tn 1 ( x) 2 ( x)ci ( n 1) x i
i 0
n 1
LU n ( x) 1 ( x)ci x i 2 ( x)ci
(n)
i 0
( n 1)
xi
i 0
(n)
( n 1)
LU n ( x) 1 ( x)ci 2 ( x)ci
Qi ( x)
i0
i 0
n 1
For U(0) = 0
n 1
n
( n)
( n 1)
0 1 ( x )c i 2 ( x )c i
Qi (0)
i 0
i 0
(1)
For U(1) =0
n 1
n
(n)
( n 1)
0 1 ( x )c i 2 ( x ) c i
Qi (1)
i 0
i 0
Qi (0)
i 0
1 0
n 1
0
( n 1)
ci
Qi (1) 2
i 0
n 1
( n 1)
Page
n (n)
c i Qi (0)
i n0
(n)
c i Qi (1)
i 0
(2)
For n=5
5
i 0
1) (1)
1
(2)
24
(50)(0) (400)
(1120)(0) (1280)
(512)(0)
2
3
1 800 30720
2
3
4
i
4
0
4
1
4
2
4
3
4
4
1
(2)
24
(32)(0) (160) 2 (256)(0) (128) 3
1 320 3072
2 3
2) (1)
i 0
3) (1)
1 2
1 6
1 12 24
1 20 120
1
(1120)
(1280)
(512)
(50)( 1 ) (400)
2
2
2
3
2 3
1 800 92160
2
3
4
i
4
0
4
1
4
2
4
3
4
4
1
1
1 2
1 6
1 12 24
(32) (160) 2 (256) 2 (128) 2 3
1 320 3072
2 3
4) (1)
1 320 3072
3 0
2
1
1 320 3072 2 0
3
2
Page
1 800 30720
2
3
1 800 92160
3
2
A 0
1 800 30720 1 320 3072 1 800 92160 1 320 3072
3 2
3 0
2
3 2
3 2
2 2240 456754 14745600 18874360
2 3
4
5
6
24 22403 4567042 14745600 188743680 0
f ( ) 24 22403 4567042 14745600 188743680
f ' ( ) 83 67202 913408 14745600
By Newton-Raphson method
n 1 n
n
2
3
4
5
6
7
8
9
10
f ( )
f ' ( )
11.51573
11.06039
10.70213
10.42561
10.21848
10.07066
9.97386
9.92118
9.85577
Page
9.9
Problem Statement
1) Use the explicit method to solve for the temperature distribution of a long, thin rod with a
length lf 10cm and the following value: k ' 0 .49 Cal /( s .cm o C ) , x 2cm . At t = 0, the
temperature of the rod is zero and the boundary conditions are fixed for all times at
T(0)=1000C and T(10) =500C. Note that the rod is aluminum with c 0.2174Cal /( g .o C )
and 2.7 g / cm 3 . Compute results to t =0.2 and compare those in example 24.1
2) Use the Crank-Nocolson method to solve problem 1 above for x 2.5cm .
Solutions
1)
Page
x 2cm
t 0.05s
t 0.2
k (0.49)
0.835cm 2 / s
(2.7 0.2174)
kt
2 0.010437
x
Ti j 1 Ti j (Ti j 1 2Ti j Ti j 1 )
At t= 0.05s
i 1, j 0
i 2, j 0
i 3, j 0
i 4, j 0
At t = 0.1s
i 1, j 1
i 2, j 1
i 3, j 1
i 4, j 1
At t = 0.15s
i 1, j 2
T13 T12 (T21 2T12 T02 ) 2.04382 (0.01089 2( 2.04382) 100) 3.04497
i 2, j 2
T23 T22 (T32 2T22 T12 ) 0.01089 (0.00544 2(0.01089) 2.04382) 0.03205
i 3, j 2
T33 T32 (T42 2T32 T22 ) 0.00544 (1.02191 2(0.00544) 0.01089) 0.0161
Page
T43 T42 (T52 2T42 T32 ) 1.02191 (50 2(1.02191) 0.00544 ) 1.52248
i 4, j 2
At t = 0.2s
i 1, j 3
T14 T13 (T23 2T13 T03 ) 3.04497 (0.03205 2(3.04497) 100) 4.02544
i 2, j 3
T24 T23 (T33 2T23 T13 ) 0.03205 (0.0161 2(0.03205) 3.04497) 0.06333
i 3, j 3
T34 T33 (T43 2T33 T23 ) 0.0161 (1.52248 2(0.00161) 0.03205) 0.03198
i 4, j 3
T44 T43 (T53 2T43 T33 ) 1.52248 (50 2(1.52248 ) 0.0161) 2.01272
(2)
Using Crank-Nicolson to solve the problem 1 with x 2.5cm
x 2.5cm
t 0.1s
t 0.2s
k 0.835cm 2 / s
kt
2 0.01336
x
First interior node
2(1 )T1l 1 T2l 1 f 0 (t l ) 2(1 )T1l T2l f 0 (t l 1 )
Inner nodes
Page
At t = 0.1s
2(1 )T11 T21 f 0 (t 0 ) 2(1 )T10 T20 f 0 (t 1 )
i 1, l 0 2.02672T11 0.01336T21 (100) 0 0 (100)
(1)
i 4, l 0
(2)
(3)
(4)
10
i 3, l 0
Page
i 2, l 0
2.02672 0.01336
T11 2.672
0.01336 2.02672 0.01336
1 0
T2
[1]
See Appendix
T11 1.3183
T21 0.0087
T31 0.00428
T41 0.65917
At t = 0.2s
2(1 )T12 T22 f 0 (t 1 ) 2(1 )T11 T21 f 0 (t 2 )
i 1, l 1 2.02672T12 T22 (100) 1.97328(1.3183) (0.0087) (100)
(1)
(2)
(3)
(4)
Page
i 4, l 1
11
0
0
2.02672 0.01336
T12 5.2733
0.01336 2.02672 0.01336
2 0.0005
0
T2
[2]
See Appendix
T11 2.60214
T21 0.02074
T31 0.50645
T41 0.67526
Appendix [1]
0
0
2.02672 0.01336
T11 2.672
0.01336 2.02672 0.01336
1 0
0
T2
m21 0.01336
2.02672
which gives
0
0
2.02672 0.01336
T11 2.672
0
1 0.01761
2.02672 0.01336
0
T2
0
0.01336 2.02672 T4 1.336
0
6.59222 10 3 which gives
0
0
2.02672 0.01336
T11 2.672
0
1 0.01761
2
.
02663
0
.
01336
0
T2
0
0
2.02672 0.01336 T31 0.000116
0
0.01336 2.02672 T41 1.336
0
12
2.0266
Page
m32 0.01336
0
0
2.02672 0.01336
T11 2.672
0
1 0.01761
2.02663 0.01336
0
T2
0
0
2.02663 0.01336 T31 0.000116
0
0
2.02663 T41 1.3359
0
0.05917
2.02663
2.02663T31 0.01336(0.65917) 0.000116 T31 0.004288
Appendix [2]
0
0
2.02672 0.01336
T12 5.2733
0.01336 2.02672 0.01336
2 0.0005
0
T2
0
0.01336 2.02672 0.01336 T32 0.01713
0
0
0.01336 2.02672 T42 1.36182
m21 0.01336
2.02672
which gives
2.0266
Page
m32 0.01336
13
0
0
2.02672 0.01336
T12 5.2733
0
2 0.03526
2
.
02663
0
.
01336
0
T2
0
0.01336 2.02672 0.01336 T32 0.01713
0
0.01336 2.02672 T42 1.36182
0
0
0
2.02672 0.01336
T12 5.2733
0
2 0.03526
2.02663 0.01336
0
T2
0
0
2.02672 0.01336 T32 1.01736
0
.
01336
0
T2
0
0
2.02672 0.01336 T32 1.01736
0
0
2.02663 T42 1.36852
0
Solving by back substitution give
T42 1.36852
0.67526
2.02663
2.02663T32 0.01336(0.67526) 1.01736 T32 0.50645
2.02663T22 0.01336T32 0.03526 T22 0.02074
Page
14