The forward finite difference can be obtained from the equation shown under the "Overview - Numerical Differentiation" tab.
The first four derivatives of the function f(x) are given by the following formulas:
f'(x) = f(x + h) - f(x) h
f''(x) = f(x + 2h) - 2f(x + h) + f(x)
h2
f'''(x) = f(x + 3h) - 3f(x + 2h) + 3(f + h) - f(x)
h3
f(4)(x) = f(x + 4h) - 4f(x + 3h) + 6f(x + 2h) - 4f(x + h) + f(x)
h4 |
The above equations are usually not used to compute derivatives because they have a large truncation error (order of O(h)). The
common practice is to use expressions of O(h2). To obtain forward difference formulas of this order, it is necessary
to retain more terms in the Taylor series. Below are listed the results (without derivations):
f'(x) = -3f(x) + 4f(x + h) - f(x + 2h)
2h
f''(x) = 2f(x) - 5f(x + h) + 4f(x + 2h) - f(x +3h)
h2
f'''(x) = -5f(x) + 18f(x + h) - 24f(x + 2h) + 14f(x +3h) - 3f(x +4h)
2h3
f(4)(x) = 3f(x) - 14f(x + h) + 26f(x + 2h) - 24f(x +3h) + 11f(x +4h) - 2f(x + 5h)
h4
|
These equations will be used to implement the Forward Difference Method as shown in the next tab. It
should be noted that many methods exist to accomplish similar results with varying degrees of accuracy, such as, Backward Difference
Method, Central Difference Method, Extended Central Difference Method, Richardson Extrapolation, Derivatives by Interpolation and
others.
|