Finite Difference Approximations of the First Derivative of a Function
Finite Difference Approximations of the First Derivative of a Function
Derivatives of functions can be approximated by finite difference formulas. In this Demonstration, we compare the various difference approximations with the exact value.
Details
Details
The first derivative of a function is defined as
f(x)
f'(x)=
lim
h0
f(x+h)-f(x)
h
The simplest finite difference formulas for the first derivative of a function are:
f'(x)≈
f(x+h)-f(x)
h
f'(x)≈
f(x+h)-f(x-h)
2h
f'(x)≈
f(x)-f(x-h)
h
Both forward and backward difference formulas have error , while the central difference formula has error .
O(h)
O()
2
h
In this Demonstration, we show the difference in values calculated from the three difference formulas and the exact value.
Questions:
1. Does the true error increase proportionally with the step size,, for the forward and backward difference formulas?
2. Does the true error increase proportionally with the square of the step size,, for the central difference formula?
1. Does the true error increase proportionally with the step size,
h
2. Does the true error increase proportionally with the square of the step size,
h
References
References
[1] A. A. Kaw, D. Nguyen, and E. E. Kalu, Numerical Methods with Applications. http://numericalmethods.eng.usf.edu/publications_book.html.
External Links
External Links
Permanent Citation
Permanent Citation
Vincent Shatlock, Autar Kaw
"Finite Difference Approximations of the First Derivative of a Function"
http://demonstrations.wolfram.com/FiniteDifferenceApproximationsOfTheFirstDerivativeOfAFunctio/
Wolfram Demonstrations Project
Published: April 27, 2011

