Answered step by step
Verified Expert Solution
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 outputErrorResultsmethoddterr,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 Note also that in this function, 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 RungeKutta methods are given by
and Start your calculations with the time step size and halve successively nine times to gen
erate ten calculations for each RungeKutta method. For each time step in each calculation associated
with one constant time step size call the computeRungeKuttaSolution function repeatedly
to solve the given IVP up to using each of the four numerical methods. Generate three plots
associated with the time step sizes Each plot should consist of the exact solution
and piecewise linear interpolants MATLAB default of the four RungeKutta approximations.
Determine the order of approximations of the various RungeKutta methods in terms of the ratios of
the absolute values of the exact errors, as obtained from each of the four RungeKutta 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 Use a D or D array to store the necessary exact
error values for each of the four RungeKutta 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:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started