Derivative
A derivative is a function which returns the slope of another function with respect to its input. A good way to build an intiution for derivatives is to think of them as the slope of a function at a given point. There are two ways to compute a derivative, analytically and numerically. The analytical method is the most common and is the one that you probably learned in school. The numerical method is an approximation of the analytical method and is often used when the analytical method is too difficult to compute. In this article focus on the numerical method because it may be more intuative for the un-initiated.
Numerical derivatives can be computed using a method known as finite differencing where you calculate the value of the function \(f(x)\) at some point \(x\) and then again at a point \(x + \Delta x\). The derivative is then the ratio of the change in the function over the change in \(x\). Take a look at the example below, and play with the sliders to see how this works.
You may have noticed something when you were playing with the \(\Delta x\) slider. As you make \(\Delta x\) smaller, the slope of the tangent line (the numerical derivative) got closer and closer to matching the slope of the function at point \(x\). This is exactly the idea as something we will explore next, which is the definition of the derivative as the limit.
The right side of this expression does exactly what the interactive example is doing. It computes the value of the function we are differentiating \(f\) at two points \(x\) and \(x + \Delta x\). Lets call this difference \(\Delta f(x)\) or rather:
The difference, \(\Delta f(x)\) is then divided by the size of the step we took. The resulting value happens to be the slope of the line traced from \(f(x)\) to \(f(x + \Delta x)\), which approximates the slope of the equation \(f\) at value \(x\)! The notation takes it one step farther however, by asking you to imagine what happens as \(\Delta x\) gets smaller and smaller. As \(\Delta x\) approaches 0 the value of the limit approaches the value of the derivative. This is the idea of the limit, and it is the foundation of calculus.