Home Login  |   Contact  |   About Us       Tuesday, November 29, 2022   

j0110924 - Back to Home
   Skip Navigation LinksHOME ›  AREAS OF EXPERTISE ›   Numerical Difference ›  ~ Richardson Extrap



Skip Navigation Links.



"Numerical Differentiation"
Richardson Extrapolation

     Comparison results:

"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(" ~FIRST DERIVATIVE ");
                 ListBox1.Items.Add(" Exact1 = " + exact1.ToString() + " Forward1 = " + c1.ToString() + " Richardson1 = " + r1.ToString());
                 ListBox1.Items.Add(" ");
                 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(" ~SECOND DERIVATIVE ");
                 ListBox1.Items.Add(" Exact1 = " + exact2.ToString() + " Forward2 = " + c2.ToString() + " Richardson2 = " + r2.ToString());
                 ListBox1.Items.Add(" ");
                 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(" ~THIRD DERIVATIVE ");
                 ListBox1.Items.Add(" Exact1 = " + exact3.ToString() + " Forward3 = " + c3.ToString() + " Richardson3 = " + r3.ToString());
                 ListBox1.Items.Add(" ");
                 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(" ~FOURTH DERIVATIVE ");
                 ListBox1.Items.Add(" Exact1 = " + exact4.ToString() + " Forward4 = " + c4.ToString() + " Richardson4 = " + r4.ToString());
                 ListBox1.Items.Add(" ");
              }



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


Consulting Services - Back to Home
Home

Home Math, Analysis,
  expertise..."

EIGENVALUE
SOLUTIONS...


> Rayleigh-Quotient Method

> Cubic Spline Method

 

Applied Mathematical Algorithms

Home

ComplexFunctions

Home

NonLinear
Home

Differentiation
Home

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
Understanding
Mining


MiningMastery
MineralNews
MineralCommodities
MineralForum
Crystallography
Services


NumericalModeling
WebServices
MainframeServices
OutsourceServices

LINKED IN
KMP ARTICLES
Brand





Home

Login

Contact
Since 2006 All Rights Reserved  © KMP Software Engineering LINKS | PRIVACY POLICY | LEGAL NOTICE