Question: This MATLAB assignment will be about numerical approximation, which for many differential equations is the only means of solving them. We will go through some
This MATLAB assignment will be about numerical approximation, which for many differential equations is the only means of solving them. We will go through some examples related to the methods learned about in class and then discuss a build-in function which is much more robust and accurate which can be used to find numerical solutions, ode450 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 steps n output to and yo for j from 1 ton k1-ft,y) t t+h end output t and y Write a script that applies Euler's Method to the initial value problem y'-1-1+4y, with y(0)-1 on the interval[0,2] using a step size of h 0.01. Compare your answer to the values given in the table on p. 453. 1. Improved Euler Method The improved Euler Method is derived from the regular Euler Method by using the Trapezoid Rule instead of a Left Riemann sum to approximate integrals. The alegorithm foritis exactly the same as the one above except for the for-loop portion. It gets changed to k1-ft,y) y y (h/2)"(k1+k2) t-t+h
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
