Note
Go to the end to download the full example code
Convergence analysis of scipy’s Runge-Kutta methods for ODE IVP#
Evaluation of relative quadrature error with the following parameters:
eq_names = [
"y'' = -y" ,
"y'' = - exp(y)" ,
"y'' = xy" ,
"y' = Az; z' = By" ,
]
method_names = [
"RK45" ,
"RK23" ,
"DOP853",
"Radau" ,
"BDF" ,
"LSODA" ,
]
The following plots give the measured relative error as a function of the number of quadrature subintervals
plt.show()
Error as a function of running time
plt.show()
Total running time of the script: (0 minutes 2.407 seconds)