import numpy as np import matplotlib.pyplot as plt from scipy.misc import derivative %matplotlib inline