Question: Problem 4: Consider the initial value problem 1t2, y = 1+ / y(1) = 2. The exact solution to this problem is y(t) =

Problem 4: Consider the initial value problem 1t2, y = 1+ / y(1) = 2. The exact solution to this problem is y(t) = t logt + 2t. (22) a) If Euler's method is used to solve this problem and an accuracy of 10-4 is desired for the final value y(2), what stepsize h should be used approximately? b) Write a code for Euler's method and use it to solve this problem using the h in part (a). Plot both the numerical and exact solutions at all intermediate mesh points. c) Repeat part (b) with midpoint method. h d) Repeat part (c) with step with stepsize. Then use the numerical results from (c) and (d) to estimate the order p of the midpoint method. Hint: O(h) is the global error for the method when a stepsize h is used.
Step by Step Solution
3.35 Rating (158 Votes )
There are 3 Steps involved in it
The detailed ... View full answer
Get step-by-step solutions from verified subject matter experts
