Consider the initial value problem given by
y' (t) = cos(t),
defined on the interval [0, 5], with initial condition y(0) = 3.
Use ODE45 to estimate the value of y(5) and let a₁ be the estimate. Then use Euler's method to estimate the value of y(5) using the step size h 0.1 and - let a2 be the estimate.
What's the difference between these two estimates? (i.e. a1 — a2.)
Round your answer to 4 decimal places. (e.g., 3.14159 rounded to 4 decimal places is 3.1416). You don't need to worry about the rounding errors caused by the computations in MATLAB.
[Hint: you can set the right interval_length when applying Euler or ODE45 so that it's easy to estimate values of the solution.]