y'(x) = f(x, y(x))
|y| < 0.5223, |f(x,y)| < 0.5649,|fx(x,y)| < 0.1432|x||y|, |f_y(x,y)| < 0.04321|x|2,
y'(x) = 0.4710 y(x)(1 - 0.05444 y(x)/(1+x2)) , y(1) = 200 ,
n | Xn | Yn | RK1 | RK2 | RK3 | RK4 | Xn+1 | Yn+DeltaYn | |||
0 | |||||||||||
1 |
for all values calculated.
n | Xn | Yn | RK1 | RK2 | RK3 | RK4 | Xn+1 | Yn+DeltaYn | |||
0 | 1.000 | 200.0 | -10.46 | -9.714 | -9.756 | -9.703 | 1.025 | 190.2 | |||
0 | 1.025 | 190.2 | -9.069 | -8.455 | -8.487 | -7.927 | 1.050 | 181.7 |
y''(x) + x y'(x) + 3 y(x) = -0.2 x2 ,y(1.25) = 2.5 & y(2.00) = 1.5 ,
n | 0 | 1 | 2 | 3 | |
Xn | |||||
Yn |
In solving, use the Thomas tridiagonal elimination algorithm. Sketch your approximation Y_n in the $xy$-plane.
n | 0 | 1 | 2 | 3 | |
Xn | 1.250 | 1.500 | 1.750 | 2.000 | |
Yn | 2.500 | 2.523 | 2.118 | 1.500 |
The sketch of the approximation using linear interpolation is left as an further exercise.
Caution: These old problems may have different answers due to different methods and chopping truncation used, so do not worry if your answers are a few least significant digits different.
t(i), Y(i), F(i);
Y(i), RK1, RK2, RK3, RK4where 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 )
|f(x,y)| < 1.387, |f_x(x,y)| < 0.6795*|x|, |f_y(x,y)| < 0.5432*|x|,on [-2.25,1.35].
{Optional Hint: It is permissible to exponentially approximate (1+h*c)^n for some bounded constant c , where n is the number of steps.}
Use 4 digit exam precision: chop recorded intermediate results only to 4 significant decimal digits and continue calculations with these results.
|E| < |(B'*h/(2*By))*[exp((x_n-x_0)*By)-1]| < tol,where tol=0.25e-1; and the bounds are given by
By=0.5432*2.25=(4ch) 1.222;and where B'=Bx+B*By=3.222. Solving the error inequality for the best step size h yields
Bx=0.6795*2.25=(4ch) 1.528;
B=1.387;
h < tol*2*By/[B'*[exp(By*(1.35-(-2.25)))-1]]=(4ch) 0.2359e-3 (answer).{Note: The less than "<" symbol used in the HTML form of this problem should really be the less than or equal "<=" symbol.}
Email Comments or Questions to hanson A T math uic edu