(15 points)Consider the two-step method for solving the initial value problem y'(t) = fit, Y(0), Y(0) = yo:
,, , 1 ,., , 3 ,., Yn+1 = + Yn-1) + h n+ 1 Yni -1 4-1ktn)Yn) + Triktn-1, Yn-1)) • (3)
[a] (7 points) Show that (3) is a second-order method and find the leading term in the local truncation error. Decide whether the method is convergent. [b] (8 points) Use Matlab to solve numerically the initial value problem
y'(t) = -y(t) + sin(10 t), y(0) = 1 , t E [0,1]
using the method (3). You may use the Matlab codes provided in class as model. Use for Y1 the value obtained by applying one step of the forward Euler method. Verify that the predicted convergence order of your method is correct by solving the equation numerically using h = 1/10,1/20,1/40,1/80, recording the maximal error (you need to find the analytic solution of the initial value problem), and verifying that the max-errors decay at the predicted rate. Check the predicted convergence rate using the exact errors computed by Matlab (not hand recorded 2-digit approximations). Report max-errors and rates in a table. Include in your submission the Matlab code, and a graph with all approximations plotted together with the exact solution. Also include a graph of the absolute values of the errors on a separate figure.
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"