Numerical differentiation - Wikipedia
https://en.wikipedia.org/wiki/Numerical_differentiationThe simplest method is to use finite difference approximations. A simple two-point estimation is to compute the slope of a nearby secant line through the points (x, f(x)) and (x + h, f(x + h)). Choosing a small number h, h represents a small change in x, and it can be either positive or negative. The slope of this line is This expression is Newton's difference quotient (also known as a first-order divided difference).