Problems With 'Central Differences'

Numerical Methods for Derivative Estimation

In the previous section, we explained the motivation of the Central Differences method for estimating derivative values from data, concentrating on the case of evaluating derivative values for the locations where the function values are tabulated, with particular emphasis on the special case that derivative estimates are calculated at points where the function value is tabulated.

For example, we found that a third order estimator formula for the derivative, as constructed using Central Difference methods, is the following.

    y'k ≈  1/60·(yk+3 - yk-3) - 3/20·(yk+2 - yk-2) + 3/4·(yk+1 - yk-1)

We will now put this formula to the test.

 

Testing the central differences estimator

We will apply the selected derivative estimator formula to a data set generated by a known function, so we can (cheat and) analytically verify the accuracy of the calculated derivative approximations. Here is a plot of the arbitrary function values, with a another plot below it showing the derivative values estimated using the Central Differences estimator (blue), compared to the theoretical ideal values (green).

Plot showing errors in derivative estimates

 

What is going on here? Well, the "data set" is not really mathematically perfect; it contains on the order of 1% random roundoff and measurement noise. You can see that the derivative estimator values are distributed randomly around the correct values, but the noise is blown all out of proportion. The key lesson here:

Derivative estimators produced by central difference methods are grossly sensitive to small data errors such as measurement errors, truncation errors, and random noise.

What we need to do is find a formula that has accuracy comparable to the central differences formulas, but without the ugly noise sensitivity. And to do that, we need to distinguish the desirable behaviors from the noise response. The next section will explore that topic.

 


Footnotes:

 

Contents of the "Numerical Estimation of Derivatives" section of the ridgerat-tech.us website, including this page, are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License unless otherwise specifically noted. For complete information about the terms of this license, see http://creativecommons.org/licenses/by-sa/4.0/. The license allows usage and derivative works for individual or commercial purposes under certain restrictions. For permissions beyond the scope of this license, see the contact information page for this site.