数值微分 利用微小的差分求导数的过程称为数值微分 (numerical differentiation)。 用上述的数值微分对简单函数进行求导。先来看一个由下式表示的 2 次函数。 实现方法: import numpy as np import matplotlib.pyplot as plt def numerical_diff(f, x): h = 1e-4 return (f(x + h) - f(x - h)) / (2 * h) def</