solving partial differential equations fig time steps used by the runge-kutta-fehlberg methoderror tolerance (leftand (rightcheck how many time steps are required by adaptive vs fixed-step methods if hasattr(solver't_all')print 'time steps:'len(solver t_allelseprint 'time steps:'len(tthe very nice thing is that we can now easily experiment with many different integration methods trying out some simple ones firstlike rk and rk quickly reveals that the time step limitation of the forward euler scheme also applies to these more sophisticated runge-kutta methodsbut their accuracy is better howeverthe odespy package offers also adaptive methods we can then specify much larger time step in time_pointsand the solver will figure out the appropriate step above we indicated how to use the adaptive runge-kutta-fehlberg - solver while the corresponding to the forward euler method requires over steps for simulationwe started the rkfehlberg method with times this time step and in the end it required just slightly more than stepsusing the default tolerance parameters lowering the tolerance did not save any significant amount of computational work figure shows comparison of the length of all the time steps for two values of the tolerance we see that the influence of the tolerance is minor in this computational exampleso it seems that the blow-up due to instability is what governs the time step size the nice feature of this adaptive method is that we can just specify when we want the solution to be computedand the method figures out on its own what time step that has to be used because of stability restrictions we have seen how easy it is to apply sophisticated methods for odes to this pde example we shall take the use of odespy one step further in the next section implicit methods major problem with the stability criterion ( is that the time step becomes very small if is small for examplehalving requires four times as many time steps and eight times the work nowwith which is reasonable resolution for the test problem abovethe computations are very fast what takes