zeros(n_t+ zeros(n_t+ initial condition [ [ step equations forward in time for in range(n_t) [ + [ndt*omega** * [nu[ + [ndt* [ + the nd-order runge-kutta method (or heun' methoda very popular method for solving scalar and vector odes of first order is the nd-order runge-kutta method (rk )also known as heun' method the ideafirst thinking of scalar odeis to form centered difference approximation to the derivative between two time points unc un tn the centered difference formula is visualized in fig the error in the centered difference is proportional to one order higher than the forward and backward differenceswhich means that if we halve tthe error is more effectively reduced in the centered difference since it is reduced by factor of four rather than two the problem with such centered scheme for the general ode utis that we get unc un unc tnc / which leads to difficulties since we do not know what unc is howeverwe can approximate the value of between two time levels by the arithmetic average of fig illustration of centered difference approximation to the derivative