solving ordinary differential equations have unc on the right-hand side in this casethe difference approximation on the left-hand side is backward differencev tnc nc or tn figure illustrates the backward difference the error in the backward difference is proportional to tthe same as for the forward difference (but the proportionality constant in the error term has different signthe resulting discretization method for ( is often referred to as backward euler scheme to summarizeusing forward difference for the first equation and backward difference for the second equation results in much better method than just using forward differences in both equations the standard way of expressing this scheme in physics is to change the order of the equationsv uu ( ( and apply forward difference to ( and backward difference to ( ) nc un ( ( nc nc that isfirst the velocity is updated and then the position uusing the most recently computed velocity there is no difference between ( )-( and ( )( with respect to accuracyso the order of the original differential equations does not matter the scheme ( )-( goes under the names semi-implicit euler or euler-cromer the implementation of ( )-( is found in the file osc_ec py the core of the code goes like fig illustration of backward difference approximation to the derivative