Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The output shall be generated by the following output function. function outputErrorResults ( method , dt , err,maxIt ) % . . . Here, err

The output shall be generated by the following output function.
function outputErrorResults(method,dt,err,maxIt)
%...
Here, err is the array with the error values mentioned above, and maxIt is the maximum number of
time step size iterations (in this case 10). Note also that in this function, dt is an array that includes all
time step sizes considered in this problem whereas it is a scalar value in the computeRungeKutta-
Solution function (consequently, the computeRungeKuttaSolution function needs to be called
with only one element of the dt array).
By examining the error ratios shown above, explain how you can verify through numerical means
that the orders of approximation of the four different Runge-Kutta methods are given by O(t),
O((t)2),O((t)3), and O((t)4)Start your calculations with the time step size t=1s, and halve t successively nine times to gen-
erate ten calculations for each Runge-Kutta method. For each time step (in each calculation associated
with one (constant) time step size t), call the computeRungeKuttaSolution function repeatedly
to solve the given IVP up to tfinal=6s using each of the four numerical methods. Generate three plots
associated with the time step sizes tin{1,0.5,0.25}. Each plot should consist of the exact solution
and piecewise linear interpolants (MATLAB default) of the four Runge-Kutta approximations.
Determine the order of approximations of the various Runge-Kutta methods in terms of the ratios of
the (absolute values of the) exact errors, as obtained from each of the four Runge-Kutta approxima-
tions. More precisely, determine the ratios of the exact errors from the previous time step size to the
current time step size at the times tin{1,3,5}. Use a 1-D (or 2-D) array to store the necessary exact
error values for each of the four Runge-Kutta approximations at the given times, and output the results
to the command window in the following format (the values shown are for illustration purposes only):
image text in transcribed

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

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

Describe the five core features of counselling.

Answered: 1 week ago