Numerical Differentiation: High-Accuracy Numerical Differentiation Formulas
High-Accuracy Numerical Differentiation Formulas
The formulas presented in the previous sections for the forward and backward finite difference have an error term of
while those for the centred finite difference scheme have an error term of
. It is possible to provide formulas with less error by utilizing more terms in the Taylor approximation. In essence, by increasing the number of terms in the Taylor series approximation, we assume a higher-order polynomial for the approximation which increases the accuracy of the derivatives. In the following presentation, the function
is assumed to be smooth and the points are equidistant with a step size of
.
Forward Finite Difference
According to Taylor theorem, we have:
![]()
Using the forward finite difference equation (Equation 3) for
yields:
![]()
Therefore:
![]()
In comparison with Equation 1, this equation provides an error term that is directly proportional to the square of the step size indicating higher accuracy.
Using the same procedure, the following equations can be obtained for the second, third, and fourth derivatives:
![Rendered by QuickLaTeX.com \[\begin{split}f''(x_{i})&=\frac{-f(x_{i+3})+4f(x_{i+2})-5f(x_{i+1})+2f(x_{i})}{h^2}+\mathcal O (h^2)\\f'''(x_{i})&=\frac{-3f(x_{i+4})+14f(x_{i+3})-24f(x_{i+2})+18f(x_{i+1})-5f(x_{i})}{2h^3}+\mathcal O (h^2)\\f''''(x_{i})&=\frac{-2f(x_{i+5})+11f(x_{i+4})-24f(x_{i+3})+26f(x_{i+2})-14f(x_{i+1})+3f(x_{i})}{h^4}+\mathcal O (h^2)\end{split}\]](https://engcourses-uofa.ca/wp-content/ql-cache/quicklatex.com-7012d82dd2d0fd3c4ec7d418c9e3cc41_l3.png)
Backward Finite Difference
According to Taylor theorem, we have:
![]()
Using the backward finite difference equation (Equation 4) for
yields:
![]()
Therefore:
![]()
In comparison with Equation 2, this equation provides an error term that is directly proportional to the square of the step size indicating higher accuracy.
Using the same procedure, the following equations can be obtained for the second, third, and fourth derivatives:
![Rendered by QuickLaTeX.com \[\begin{split}f''(x_{i})&=\frac{2f(x_{i})-5f(x_{i-1})+4f(x_{i-2})-f(x_{i-3})}{h^2}+\mathcal O (h^2)\\f'''(x_{i})&=\frac{5f(x_{i})-18f(x_{i-1})+24f(x_{i-2})-14f(x_{i-3})+3f(x_{i-4})}{2h^3}+\mathcal O (h^2)\\f''''(x_{i})&=\frac{3f(x_{i})-14f(x_{i-1})+26f(x_{i-2})-24f(x_{i-3})+11f(x_{i-4})-2f(x_{i-5})}{h^4}+\mathcal O (h^2)\end{split}\]](https://engcourses-uofa.ca/wp-content/ql-cache/quicklatex.com-a1f469f1ade718358caa44049dc3d6ea_l3.png)
Centred Finite Difference
According to Taylor theorem, we have:
![Rendered by QuickLaTeX.com \[\begin{split}f(x_{i+1})&=f(x_i)+f'(x_i) h+\frac{f''(x_i)}{2!}h^2+\frac{f'''(x_i)}{3!}h^3+\frac{f''''(x_i)}{4!}h^4+\mathcal O (h^5)\\f(x_{i-1})&=f(x_i)-f'(x_i) h+\frac{f''(x_i)}{2!}h^2-\frac{f'''(x_i)}{3!}h^3+\frac{f''''(x_i)}{4!}h^4+\mathcal O (h^5)\end{split}\]](https://engcourses-uofa.ca/wp-content/ql-cache/quicklatex.com-b220b00751816b8232873e89181bee0b_l3.png)
Subtracting the above two equations and using the centred finite difference equation (Equation 6) for
yields:
![]()
Therefore:
![]()
Using the same procedure, the following equations can be obtained for the second, third, and fourth derivatives:
![Rendered by QuickLaTeX.com \[\begin{split}f''(x_{i})&=\frac{-f(x_{i+2})+16f(x_{i+1})-30f(x_{i})+16f(x_{i-1})-f(x_{i-2})}{12h^2}+\mathcal O (h^4)\\f'''(x_{i})&=\frac{-f(x_{i+3})+8f(x_{i+2})-13f(x_{i+1})+13f(x_{i-1})-8f(x_{i-2})+f(x_{i-3})}{8h^3}+\mathcal O (h^4)\\f''''(x_{i})&=\frac{-f(x_{i+3})+12f(x_{i+2})-39f(x_{i+1})+56f(x_{i})-39f(x_{i-1})+12f(x_{i-2})-f(x_{i-3})}{6h^4}+\mathcal O (h^4)\end{split}\]](https://engcourses-uofa.ca/wp-content/ql-cache/quicklatex.com-eb51dd8d3fa7751f7d40d7cf734122e6_l3.png)
