Use 4-step Adams-Bashforth method with h = 0:1 to approximate the solution of th
ID: 1888683 • Letter: U
Question
Use 4-step Adams-Bashforth method with h = 0:1 to approximate the solution of the followinginitial-value problem:
y' = -5y + 5t^2 + 2t with 0 < t < 1 and y(0) =1/3
Use Runge-Kutta method of order four to obtain starting values. Compare the results with the actual
solution y(t) = t^2 + 1/3 e^(-5*t)
Explanation / Answer
% save as adamb2.m %% forth order predator-corrector method Method for ODE % y'(x) = -5y + 5t^2 + 2t ; t>0, % y(0) = 1/3 >0 % %% %clear all f = @ (t , y) (-5*y + 5*t^2 + 2*t ); h=0.1 ; tmax = 1 ; n= tmax/h ; t(1)= 0 ; y(1)= 1/3 ; tout=t(1) ; yout=y(1).'; true(1)=1/3 ; ero(1)=0 ; disp(' t numerical exact error ') disp('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~') for i=1:(n+1) t(i+1) = i*h ; if i> adamb2 t numerical exact error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0.00 0.3333333 0.3333333 0.0000000 0.10 0.2122830 0.2121769 0.0001061 0.20 0.1627655 0.1626265 0.0001390 0.30 0.1645165 0.1643767 0.0001398 0.40 0.2048557 0.2051118 0.0002561 0.50 0.2769896 0.2773617 0.0003721 0.60 0.3762804 0.3765957 0.0003153 0.70 0.4998012 0.5000658 0.0002646 0.80 0.6458949 0.6461052 0.0002103 0.90 0.8135498 0.8137030 0.0001532 1.00 1.0021372 1.0022460 0.0001088Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.