Computational Physics, Python, Interpolation, Differentiation, Integration.
Of course, we notice that this just returns a number for a single point. However, if we wanted the derivative as a function we could just take a bunch of derivatives and make an interpolating function: def h(x): return np.sin(2*x**2) dh=np.zeros(len(xI)) for i in range(len(xI)):