Question: Question 2 The Euler method is an example of a first order method. This means that the error is proportional to h, so that doubling

 Question 2 The Euler method is an example of a first

Question 2 The Euler method is an example of a first order method. This means that the error is proportional to h, so that doubling the number of points roughly cuts the error roughly by a factor of two. The improved Euler method is what's known as a two-step method. It requires two evaluations of the function per time step. At each step, we define two extra quantities before computing Yn+1. k = f(tn, yn) k2 = f(tn + h, yn + hki) Yn+1 = yn +1 (ki +k). The payoff for using this more complicated method is that it is second order! This means that each time you double the number of time steps the error goes down by a factor of four. This is a big deal. Program this method to solve the same problem from Question 1 and Determine how large n needs to be get a maximum error error less than 0.01. Show the method is second order by doubling N and seeing that the error has gone down by a factor of four. Here we see the payoff of defining f(t,y) in a separate function. . The standard method most people use for general purposes is called fourth-order Rung-Kutta. It uses four evaluations at each step, and the method's total error scales like h4 For certain applications, such as computing spacecraft trajectories, scientists are likely to use methods that are of much higher order, even 12th order! function yprime=f(t,y) yprime (sin(t)+1/(1+t))*y; end =

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!