Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Why do firms single-source contracts?

Answered: 1 week ago

Question

Discuss consumer-driven health plans.

Answered: 1 week ago

Question

What is Accounting?

Answered: 1 week ago

Question

Define organisation chart

Answered: 1 week ago

Question

What are the advantages of planning ?

Answered: 1 week ago

Question

Question How is life insurance used in a DBO plan?

Answered: 1 week ago