I have a system of ODEs and I solve them with two different algorithms:
- A normal, constant stepsize, Runge Kutta 4 implementation
- A modified Runge Kutta 4, with variable stepsize control
My professor asked me to make a plot showing convergences rate of the two algorithms to determine which one works best.
We usually do this plotting the difference between the analytical solution and the numerical one at final time vs the stepsize.
However, I don't know how to perform such analysis since for the adaptive version of the algorithm the stepsize is not fixed, hence any error vs step plot would make no sense...
Is there any other way to do it I'm not seeing?