Here is another finite difference approximation to the derivative (backward difference): u′(tn)≈un−un−1tn−tn−1