I need help solving this homework ( a), b), c), d), and e) ). I
have zero notes on this section.
All I know for now is that a) is in the fom of dy/dt = a(t)y(t) +
b(t)
Show transcribed image text Math 3341 Differential Equations Homework 6 Due in class Tuesday 10/10/17 1. Consider the initial value problem i-r ) y(t) + (t-r)cos(t) dt (a) Solve the initial value problem. (b) Let N = 50 and h = 2π/N be the spacing of N + 1 points, to, t1, ,ty, that evenly divide the interval [2π, 4π] Apply the Euler method and the Improved Euler method, using this time step size h, to the initial value problern above on the interval [2, 4 Plot your two approximations alongside the actual solution (c) Plot the error (4. Iy(4)-Vil) and (4. Iy(4)- 1) for k = 0.1, . . . , N. where are the iterates produced by the Euler method and y are the iterates produced by the improved Euler Method. In your plot, use a log scaling for the y-axis (this is done in Matlab by using the semilogy command) (d) The Improved Euler method improves upon the Euler Method by using a line to approximate f(t, y). One can get a more accurate approximation by using a quadratic within each time step to approximate f(t, y). An example of this is the multistep Runge-Kutta method described here: a f(tk,yk) = d f(tk + h, yk + he) = Implement the Runge-Kutta method with the same h value used in part b. Add the Runge-Kutta approximation to the plot frorn part b. Add (4. Iy(tk)-狐kl) for k = 0, 1, . . . , N to the error plot of part c. (e) Apply the Euler Method, the Improved Euler Method, and the Runge Kutta Method to the initial value problem using h = 2π/N for values of N = 10, 20, 40. 80, 160, 320, 640. For each method, plot the maximal error for each value of N as a function of N. Use a log scaling for the r and y axis (this is done in Matlab by using the loglog command). Can you conjecture from this plot how the global error of the Runge Kutta Method scales with the time step h=2n/N?
Math 3341 Differential Equations Homework 6 Due in class Tuesday 10/10/17 1. Consider the initial value problem i-r ) y(t) + (t-r)cos(t) dt (a) Solve the initial value problem. (b) Let N = 50 and h = 2π/N be the spacing of N + 1 points, to, t1, ,ty, that evenly divide the interval [2π, 4π] Apply the Euler method and the Improved Euler method, using this time step size h, to the initial value problern above on the interval [2, 4 Plot your two approximations alongside the actual solution (c) Plot the error (4. Iy(4)-Vil) and (4. Iy(4)- 1) for k = 0.1, . . . , N. where are the iterates produced by the Euler method and y are the iterates produced by the improved Euler Method. In your plot, use a log scaling for the y-axis (this is done in Matlab by using the semilogy command) (d) The Improved Euler method improves upon the Euler Method by using a line to approximate f(t, y). One can get a more accurate approximation by using a quadratic within each time step to approximate f(t, y). An example of this is the multistep Runge-Kutta method described here: a f(tk,yk) = d f(tk + h, yk + he) = Implement the Runge-Kutta method with the same h value used in part b. Add the Runge-Kutta approximation to the plot frorn part b. Add (4. Iy(tk)-狐kl) for k = 0, 1, . . . , N to the error plot of part c. (e) Apply the Euler Method, the Improved Euler Method, and the Runge Kutta Method to the initial value problem using h = 2π/N for values of N = 10, 20, 40. 80, 160, 320, 640. For each method, plot the maximal error for each value of N as a function of N. Use a log scaling for the r and y axis (this is done in Matlab by using the loglog command). Can you conjecture from this plot how the global error of the Runge Kutta Method scales with the time step h=2n/N?





