2. INTRODUCTION:
Consider the ODE:
𝑎
𝑑 𝑦
𝑑𝑥
+ 𝑏
𝑑𝑦
𝑑𝑥
+ 𝑐𝑦 = 𝑓(𝑥)
With boundary condition:
y(L0) = B0
y(L1) = B1
Since we are going to use the Galerkin’s method, splitting the whole domain into n elements evenly
before the computation is necessary.
In this report, I am going to find out the relations of (a, 𝜀 ), (b, 𝜀 ), (n, 𝜀 ), where 𝜀 is the
maximum difference of the approximation 𝑦(𝑥) and the exact solution 𝑦(𝑥) along all 𝑥 ∈ [𝐿0, 𝐿1].
Hence, define 𝜀 as:
𝜀 ≡ 𝑚𝑎𝑥 ∈[ , ]{|𝑦(𝑥) − 𝑦(𝑥)|}
In order to make more efforts in the variables a, b, n, which we are interested about, fix c=1 and f(x)=x,
L0=0, L1=1, B0=B1=0. So the ODE’s problem becomes:
𝑎
𝑑 𝑦
𝑑𝑥
+ 𝑏
𝑑𝑦
𝑑𝑥
+ 𝑦 = 𝑥
y(0) = 0
y(1) = 0
A demonstration of Galerkin’s method.
3. the following contains data of:
1. a= (0.01,0.1,1,10,100), b=1, c=1, and changing n.
2. a=(1,2 , 2 ,2 , 2 , 2 ), b=1, c=1, and changing n.
3. a=1, b= (0.01,0.1,1,10,100), c=1, and changing n.
4. a=1, b= (1,2 , 2 ,2 , 2 , 2 ), c=1, and changing n.
DATAS:
for a=1, b=1, c=1
compute for n=2 , 2 .. 2 , 3 , 3 . . 3 ,4 , 4 . . 4
n 𝜀 ratio
2 2.2091e-02 -
2 5.5664e-03 2.5197e-01
2 1.4101e-03 2.5332e-01
2 3.5376e-04 2.5087e-01
2 8.8517e-05 2.5022e-01
2 2.2134e-05 2.5005e-01
2 5.5338e-06 2.5001e-01
2 1.3835e-06 2.5000e-01
2 3.4587e-07 2.5000e-01
2 8.6468e-08 2.5000e-01
3 9.9214e-03 -
3 1.1170e-03 1.1259e-01
3 1.2435e-04 1.1132e-01
3 1.3819e-05 1.1113e-01
3 1.5355e-06 1.1111e-01
3 1.7061e-07 1.1111e-01
4 5.5664e-03 -
4 3.5376e-04 6.3553e-02
4 2.2134e-05 6.2567e-02
4 1.3835e-06 6.2506e-02
4 8.6468e-08 6.2499e-02
Observation:
2.5000e-01=0.25=
1.1111e-01=0.1111=
6.2499e-02=0.062499≅ 0.0625=
Claim1: 𝜀 (n*r)/ 𝜀 (n)~ for n is sufficient large.
7. Changing ‘a’
for a=0.01, b=1, c=1
compute for n=2 , 2 .. 2 ,3 , 3 . . 3 ,4 , 4 . . 4
n 𝜀 ratio
2 1.3523e+00 -
2 2.4501e+00 1.8119e+00
2 1.4093e+00 5.7521e-01
2 5.2583e-01 3.7311e-01
2 2.6395e-01 5.0197e-01
2 1.1207e-01 4.2456e-01
2 4.2906e-02 3.8287e-01
2 1.3765e-02 3.2081e-01
2 3.9932e-03 2.9010e-01
2 1.0787e-03 2.7012e-01
2 2.8054e-04 2.6007e-01
3 8.8810e-01 -
3 5.8544e-01 6.5920e-01
3 3.2494e-01 5.5503e-01
3 8.2991e-02 2.5541e-01
3 1.5043e-02 1.8126e-01
3 2.0621e-03 1.3708e-01
4 2.4501e+00 -
4 5.2583e-01 2.1461e-01
4 1.1207e-01 2.1313e-01
4 1.3765e-02 1.2283e-01
4 1.0787e-03 7.8365e-02
Claim1 is satisfied.
Note that in this case the ratios marked in yellow are not very close to the numbers in the claim compare to
previous cases. It is because of the shrinking of ‘a’ makes the stiffness matrix less symmetric. To continue the
process, these ratios would converge to .
8. for a= (0.01,0.1,1,10,100), b=1, c=1
compute for n=2 , 2 .. 2 ,3 , 3 . . 3
n 𝜀
(a=0.01)
𝜀
(a=0.1)
𝜀
(a=1)
𝜀
(a=10)
𝜀
(a=100)
2 1.3523e+00 3.2616e+00 2.2091e-02 2.3407e-03 2.3435e-04
2 2.4501e+00 1.9072e-01 5.5664e-03 6.7283e-04 6.8254e-05
2 1.4093e+00 7.0270e-02 1.4101e-03 1.7869e-04 1.8267e-05
2 5.2583e-01 2.4792e-02 3.5376e-04 4.5952e-05 4.7167e-06
2 2.6395e-01 7.6057e-03 8.8517e-05 1.1646e-05 1.1979e-06
2 1.1207e-01 2.1329e-03 2.2134e-05 2.9311e-06 3.0182e-07
2 4.2906e-02 5.6570e-04 5.5338e-06 7.3522e-07 7.5747e-08
2 1.3765e-02 1.4574e-04 1.3835e-06 1.8411e-07 1.8973e-08
2 3.9932e-03 3.6990e-05 3.4587e-07 4.6066e-08 4.7479e-09
2 1.0787e-03 9.3181e-06 8.6468e-08 1.1521e-08 1.1876e-09
n 𝜀 (a=0.1)/
𝜀 (a=0.01)
𝜀 (a=1)/
𝜀 (a=0.1)
𝜀 (a=10)/
𝜀 (a=1)
𝜀 (a=100)/
𝜀 (a=10)
2 2.41189 0.00677 0.10596 0.10012
2 0.07784 0.02919 0.12087 0.10144
2 0.04986 0.02007 0.12672 0.10223
2 0.04715 0.01427 0.12990 0.10264
2 0.02881 0.01164 0.13157 0.10286
2 0.01903 0.01038 0.13243 0.10297
2 0.01318 0.00978 0.13286 0.10303
2 0.01059 0.00949 0.13308 0.10305
2 0.00926 0.00935 0.13319 0.10307
2 0.00864 0.00928 0.13324 0.10308
10*ratio 0.08638 0.09280 1.33240 1.03081
Observation:
For each fixed n, compare 𝜀 .
The second table shows the ratio of 𝜀 (10*a) and 𝜀 (a), it seems that when ‘a’ becomes larger,
ratio*10 would become nearer to 1.
Claim2: ℎ ∗ 𝜀 (a*h)/ 𝜀 (a)~1 when n and a is sufficient large, where h is a real number.
16. Conclusion:
1. Suppose r is a natural number, then
𝑟 ∗ 𝜀 (n*r)/ 𝜀 (n)~ 1 for n is sufficient large.
2. Assume n is sufficient large. Fixed n. Suppose h is a real number, then
ℎ ∗ 𝜀 (a*h)/ 𝜀 (a)~1
For a is sufficient large.
3. Assume n is sufficient large. Fixed n. Suppose k is a real number, then
𝜀 (b*k)/ 𝜀 (b)~1
For b is sufficient small