Question: Implement a fourth - order Runge - Kutta method that integrates the system y = f ( y ) from t = 0 to t

Implement a fourth-order Runge-Kutta method that integrates the system y=f(y) from t=0
to t=100 with stepsize h=0.05. Use the four initial conditions described in the table below.
You can use the pendplot function to animate the motion of the pendulum, which might be
fun and might help you debug your code. But you do not need to include these plots in your
report.
For each case, plot the function 2(t) versus time. Cases 3 and 4 demonstrate the initial value
sensitivity of the system, namely, that a small perturbation can lead to drastically different
solutions.
Your report should contain the MATLAB commands required to produce the results, and the
four plots of 2(t).
Run Case 1 in problem , with the five stepsizes h=0.052(k-1),k=1,2,3,4, and h=0.001.
Compute the value of 2(t=100) for each stepsize. Consider the last result the exact solution,
and plot the four errors as a function of h in a loglog-plot. Estimate the order of convergence
from the slope.
Your report should contain the MATLAB commands used, the five values of 2(t=100), the
loglog-plot, and the estimated slope.
Implement a fourth - order Runge - Kutta method

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 Programming Questions!