Derivatives using a spreadsheet

Download and open the linked spreadsheet.  It contains three columns, (C - E), labeled x, f(x) = a*x2, and f(x) = cos(bx).  The constants a and b can be changed in cells B1 and B2 respectively.
Let us find the derivative of f(x) = a*x2, by approximating df(x)/dx ~ Δf(x)/Δx.

Now let us evaluate Δf(x)/Δx analytically.  Δf(x) = a(x22 - x12) = a(x2 + x1)(x2 - x1).
Δx = x2 - x1.  Therefore Δf(x)/Δx = a(x2 + x1).
As the distance x2 + x1 becomes smaller and smaller the difference between between x2 + x1 becomes smaller and smaller, and when the points are infinitesimally close, x2 becomes equal to x1.  Then x2 + x1 = 2x1 and Δf(x)/Δx = 2ax1 when evaluated at x1.