next up previous contents
Next: Using num3plot.m Up: Using rk4plot.m Previous: Using rk4plot.m   Contents


Use rk4plot to graphically investigate numerical solutions to the ODE $x'= 2tx$. Use the four step sizes $h = 0.5,\; 0.25,\; 0.1,\;, 0.01$. This M-file uses a 4th order Runge-Kutta scheme. Identify each plot with its respective step size.
  1. Change only the following in initn.m
    t0=-2; tf=2; x0=1;
    Save, then type initn to initialize the variables (or copy-and-paste at the Emporium).
  2. Type rk4plot

\put(1,0){\includegraphics [width=5cm,height=5cm]{}}

    (How does the plot for eulplot compare with that for rk4plot when $h = 0.1$? Which is more accurate for the same step size?)

Michael Renardy