# Numerical approximation of derivatives

Suppose we are numerically approximating the second-order derivative A common way is to use finite difference scheme which uses Taylor expansion.
1. Perform Taylor expansion for , , .etc
2. Assemble the Taylor series and cancel the high-order terms to construct the desired-order scheme, i.e. finding a set of coefficients which makes the summation of high-order terms to be zero.

For example, the second-order central difference scheme: An alternative way to approximate the derivative.
1. Express as We can see , so the objective is to find the coefficient .

2. Use the current data to fit this second-order polynomial (a parabola, actually a curve fitting problem)     3. Solve this fitting problem
Since we have three unknown coefficients , , and , we only need three data points. However, we can choose more data points to fit this curve, which is actually least square fitting. Now, let us write the above equations in a general vector form: where This is an over-determined system if , which we can approximate it with least square fitting.
See https://en.wikipedia.org/wiki/Overdetermined_system

4. Solution
The approximated/fitted solution is: , where the second-order derivative 