In the following problems, use "EXAM PRECISION: chop to 4 significant digits only when you write an intermediate or final answer down and continue calculations with those numbers recorded.
t(i), Y(i), F(i);
Y(i), RK1, RK2, RK3, RK4
where needed.
(Ans.: i t(i) YEuler(i) FEuler(i) YRK4(i) RK1(i) RK2(i) RK3(i) RK4(i) 0 0.0 1.000 0.2000 1.000 0.1000 0.1039 0.1041 0.1081 1 0.5 1.100 0.2156 1.104 0.1081 0.1122 0.1124 0.1165 2 1.0 1.207 0.2318 1.216 ______ ______ ______ ______ 3 1.5 1.322 0.2484 .......
(Ans.: ???)
i, t(i) =i*h, y(t(i)), y'(t(i)).
(Ans.: i t(i) y(t(i)) y'(t(i))
0 0.00 1 0.3333
1 0.25 1.083 0.3512
2 0.50 1.170 0.3690
3 0.75 1.262 0.3868
4 1.00 1.358 0.4044
5 1.25 1.459 0.4217
6 1.50 1.564 0.4388 )
t, Y, RK1, RK2, RK3, RK4at each step except the last, reporting only items needed. Use a modification of 4 digit precision.
(Ans.: t y RK1 RK2 RK3 RK4
0.0 1.000 0.05000 0.04697 0.04700 0.04420
0.1 1.047 0.04420 0.04159 0.04162 0.03919
0.2 1.088 )
b) For the ODE plus the IC in part a), illustrate Euler's Method with
h = 0.1, tabulating
t, y, f(y,t) for t = 0 to 5*h.
(Ans.: a) optimal h =0.8165e-2 (Caution: Exponential error term not used)
b) t y f(y,t)
0.0 1.000 0.3678
0.1 1.036 0.3531
0.2 1.071 0.3360
0.3 1.104 0.3175
0.4 1.135 0.2984
0.5 1.164 )
(Ans.: ???)
t, Y, F;
n, t, Y, RK1, RK2, RK3, RK4;
(Ans.: n t YEuler FEuler YRK4 RK1 RK2 RK3 RK4 0 0.0 1.000 0.0000 1.000 0.0000 0.02236 0.02286 0.03308 1 0.1 1.000 0.3162 1.020 0.03290 0.04160 0.04195 0.05043 2 0.2 1.031 0.4753 1.061 -- -- -- -- 3 0.3 1.078 0.6354 4 0.4 1.141 0.8253 )
(Ans.: abs(f') ≤ abs(f_x)+abs(f)*abs(f_y) < 9+1*9=18; Using
abs(global error) = E_n < m*h*(exp(K*(x_n-x_0))-1)/(2*K),
then h <(4C) 1.879E-16)
(Ans.:
( -1.0 1.5 0.0 0.0 ) ( Y(1) ) ( 0.0 )
( 0.5 0.0 1.5 0.0 )*( Y(2) ) = ( 0.0 )
( 0.0 0.5 1.0 1.5 ) ( Y(3) ) ( 0.0 )
( 0.0 0.0 0.5 2.0 ) ( Y(4) ) ( -1.5 ) )
(Ans.: i method t(i) y(i) f(i)
0 I. C. 0 -1.000 -0.3678
1 EULER 0.25 -1.091 -0.3664
2 " 0.50 -1.182 -0.3624
3 " 0.75 -1.272 -0.3565
4 P 1.00 -1.360 -0.3490
" C " -1.360 -0.3490
5 P 1.25 -1.446 -0.3405
" C " -1.446 -0.3405 )