 Login  |   Contact  |   About Us       Tuesday, May 17, 2022  ~ Forward Difference ~ Backward Difference ~ Richardson Extrap

 "Numerical Differentiation" Richardson Extrapolation

Comparison results:

 ~FIRST DERIVATIVE Exact1 = 4.63212055882856 Forward1 = 4.6715071197874 Richardson1 = 4.63212063549293 ~SECOND DERIVATIVE Exact2 = 12.3678794411714 Forward2 = 12.3881861095795 Richardson2 = 12.3678794156187 ~THIRD DERIVATIVE Exact3 = 23.6321205588286 Forward3 = 23.6311999400094 Richardson3 = 23.632120788907 ~FOURTH DERIVATIVE Exact4 = 24.3678794411714 Forward4 = 24.3684930335775 Richardson4 = 24.3678793259742
 "First four derivatives from different methods"
 Calculate derivatives value at x = { } [ Initial derivative calculation value at: x = {1) ]

IMPLEMENTATION
Richardson Extrapolation

In numerical simulation, Richardson extrapolation is a sequence acceleration method, often used to improve the rate of convergence. This method can also be applied to finite difference approximations to boost the accuracy of numerical derivatives.

If A(h) is an estimation of order hn for A:

 A = limh→0 A(h)

or

 A = A(h) + anhn + O(hm), an ≠ 0, m > n

We can repeat the calculation with h = th, so that

 A = A(h) + an((th)n + O((th))m)

eliminating the coefficient an and solving for A, we obtain from the above two equations:

 A = tnA(h) - A(th) / tn - 1

which is the Richardson extrapolation formula.

Testing the Richardson Extrapolation

We will test if the Richardson extrapolation improves the accuracy of the derivatives. The following function will be used for the testing:

 f(x) = x4 + x + e-x

We can easily compute the first four derivatives of the above function analytically. For testing we will calculate the derivatives using the Forward Method with and without the Richardson extrapolation.

Here we set h = 0.1 and x is changeable, starting with initial value x = 1. Inside the TestRichardsonExtrapolation method, the parameters Exact1,...,Exact4 represent the exact results for the first four derivatives; Forward1,...,Forward4 represent results from Forward difference method; and Richardson1,...,Richardson4 denote the results from the Forward method with Richardson extrapolation.

The reader can see the results from the Richardson Extrapolation are much closer to the exact results than those from the Forward method.   Richardson Extrapolation setup

To test the Richardson Extrapolation, a new static method has been added to show how to calculate the first four derivatives. TestRichardsonExtrapolation() method has been written, added and executed. No additional supporting code is shown.

Running this code generates results shown above.

static void TestRichardsonExtrapolation();
{
double exact1 = 4 * t1 * t1 * t1 + 1 - Math.Exp(-t1);
double c1 = Differentiation.Forward1(f1, t1, h);
double r1 = Differentiation.Richardson1(f1, t1, h, "Forward");
ListBox1.Items.Add(" Exact1 = " + exact1.ToString() + " Forward1 = " + c1.ToString() + " Richardson1 = " + r1.ToString());
double exact2 = 4 * t1 * t1 * t1 + 1 - Math.Exp(-t1);
double c2 = Differentiation.Forward2(f1, t1, h);
double r2 = Differentiation.Richardson2(f1, t1, h, "Forward");
ListBox1.Items.Add(" Exact1 = " + exact2.ToString() + " Forward2 = " + c2.ToString() + " Richardson2 = " + r2.ToString());
double exact3 = 4 * t1 * t1 * t1 + 1 - Math.Exp(-t1);
double c3 = Differentiation.Forward3(f1, t1, h);
double r3 = Differentiation.Richardson3(f1, t1, h, "Forward");
ListBox1.Items.Add(" Exact1 = " + exact3.ToString() + " Forward3 = " + c3.ToString() + " Richardson3 = " + r3.ToString());
double exact4 = 4 * t1 * t1 * t1 + 1 - Math.Exp(-t1);
double c4 = Differentiation.Forward4(f1, t1, h);
double r4 = Differentiation.Richardson4(f1, t1, h, "Forward");
ListBox1.Items.Add(" Exact1 = " + exact4.ToString() + " Forward4 = " + c4.ToString() + " Richardson4 = " + r4.ToString());
}

 Other Implementations...

 Object-Oriented Implementation Graphics and Animation Sample Applications Ore Extraction Optimization Vectors and Matrices Complex Numbers and Functions Ordinary Differential Equations - Euler Method Ordinary Differential Equations 2nd-Order Runge-Kutta Ordinary Differential Equations 4th-Order Runge-Kutta Higher Order Differential Equations Nonlinear Systems Numerical Integration Numerical Differentiation Function Evaluation  Math, Analysis,
expertise..."

EIGENVALUE
SOLUTIONS...

> Rayleigh-Quotient Method

> Cubic Spline Method

 Applied Mathematical Algorithms ComplexFunctions NonLinear Differentiation Integration
 About Us KMP Software Engineering is an independent multidisciplinary engineering consulting company specializing in mathematical algorithms. Areas of Expertise SpecialFunctions VectorsMatrices OptimizationMethods ComplexNumbers Interpolation CurveFitting NonLinearSystems LinearEquations DistributionFunctions NumericalDifferentiation NumericalIntegration DifferentialEquations Smalltalk FiniteBoundary Eigenvalue Graphics UnderstandingMining MiningMastery MineralNews MineralCommodities MineralForum Crystallography Services NumericalModeling WebServices MainframeServices OutsourceServices LINKED IN KMP ARTICLES Brand Login Contact