MA238-003 Computer Lab Assignment 2 September 3, 2008 Due Date: September 10, 2008. Instructions: In this Lab, you need to use the euler.m and the MATLAB build-in ODE45 function. Please modify the MATLAB files discussed in the Lecture, i.e., lab2 ex2.m, lab2 ex3.m, and lab2 ex4.m, to answer the following questions. Please submit both modified codes and your graphical results in the report. 1. Consider the initial value problem (IVP) dy dt = t + y, y(0) = 1. (A) Verify that the exact solution is y = 2et ?t?1 (Do this by hand). (B) Approximate the IVP up to t = 1 by using Euler?s method with 5 steps and 50 steps. Compare two results with the exact solution graphically. (C) Use ODE45 method to approximate the solution up to t = 1. Turn in the error plot. (D) Improve the error level of the ODE45 to be 10?10, then repeat (C). 2. Consider the initial value problem (IVP) dx dt = 1 + x 2, x(0) = 0. (A) Verify that the exact solution is x = tan(t) (Do this by hand). (B) Approximate the IVP up to t = 1 by using Euler?s method with 10 steps and 100 steps. Compare two results with the exact solution graphically. (C) Use ODE45 method to approximate the solution up to t = 1. Turn in the error plot. (D) Improve the error level of the ODE45 to be 10?13, then repeat (C).