Question: Write a Matlab Script file answering such questions below using the methods explained. Euler's Method The Euler Method is the simplest of the numerical methods

Write a Matlab Script file answering such questions below using the methods explained.

Write a Matlab Script file answering such questions below using the methods

explained. Euler's Method The Euler Method is the simplest of the numerical

methods we cover, and as we saw in class is closely related

to a Left Riemann Sum. The algorithm (in pseudo code) for Euler's

Euler's Method The Euler Method is the simplest of the numerical methods we cover, and as we saw in class is closely related to a Left Riemann Sum. The algorithm (in pseudo code) for Euler's Method is as follows: define f(ty) input initial values to and yo input step size h and number of stepsn output to and yo for, from 1 ton k1=f(t,y) y = y + h*k1 t = tuh end output t and y. 1. Write a script that applies Euler's Method to the initial value problem y'=1-t + 4y, with y(O)=1 on the interval[0, 2] using a step size of h=0.01. Compare your answer to the values 2. Write a script that applies the Improved Euler Method to the same function as in problem 1. Finally, we have another method that uses a weighted average of slopes at four different points to estimate the integrals, which is precisely equal to Simpson's rule iff does not depend on y. Again, only the for-loop gets changed in the algorithm. K1 = f(t, y) K2 = f(t +0.5*h, y +0.5*h*k1) K3 = f(t +0.5*h, y +0.5*h*k2) K4 = f(t + h, y + h*k3) Y = y + (h/6)*(k1 + 2*k2 + 2*k3+k4) T=t+h 3. Finally apply this method to the same problem in 1 and 2. This time use a step size of h = 0.1 and compare your results to those given in the table on p. 470. 4. Solve the initial value problem (1.5)=0.5 dty tell a. Use ode45() to find the approximate values of the solution at t = 0.1.1.8.2.1 and also plot the solution. b. Now plot the numerical solution of several large intervals and make a guess about the nature of the solution as t 00. 5. Consider the initial value problem e" + (te sin y) y = D. H(2)=1.5 a. Use ode45() to find approximate values of the solution at x =1.1.5. and 3. Then plot the solution on the interval [0.5.4]. b. Plot the solution for several large intervals and guess at the behavior of the solution as C. Plot the solution for several intervals of the form [e. 2], where is a small number. What do you think is happening as t 0*

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!