Backward Difference Correction MethodThe backward difference correction method is an explicit third order method for approximating the solution of the second order differential equation y''(x) = f(x, y) with initial conditions y(x0) = y0, y'(x0) = y'0.
Note that the integrand f(x,y) does not depend upon y'.
Let xn = x0 + nh, yn be the approximation to y(xn), and fn = f(xn, yn), the procedure proceeds recursively via the explicit equation for yn + 1 as follows:
y(xn + 1) = 2 y(xn) - y(xn - 1) + h2 [ fn + ( fn - 2 fn - 1 + fn - 2 ) / 12 ].
In order to begin the recursion, three successive starting values of y are required, one of which is y0 and the other two starting values y1 and y2 need a different approximation method. The routine, as programmed, uses the Runge-Kutta method to approximate y1 and y2. Particular classes of problems may have more accurate estimates for both y1 and y2.
Richardson extrapolation may be used to increase both the order and accuracy.
- void Backward_Difference_Correction( double (*f)(double, double), double y[ ], double x0, double c, double h, int richardson_columns, int number_of_steps )
This function uses the backward difference correction method to estimate the solution of the initial value problem, y'' = f(x,y); y(x0) = y and y'(x0) = c, at x0 + nh where for n =1, . . ., number_of_steps and h is the step size. The argument richardson_columns is the number of step size halving + 1 used in Richardson extrapolation so that if richardson_columns = 1 then no extrapolation to the limit is performed. On input, y is the value of y(x) at x = x0. On output y[n] is the value of y(x) at x = x0 + n h for n =0, . . ., number_of_steps.
C Source Code
- The file, backdiffcorr.c, contains a version of Backward_Difference_Correction( ) written in C.