code for qusetion 2.1 and half of 2
got the central tral difference code to work in the ipython notebook