COMPARISON OF FIRST ORDER AND SECOND ORDER CENTRAL DIFFERENTIATION FORMULAE FOR SOLUTION OF LINEAR ORDINARY DIFFERENTIAL EQUATIONS
The finite difference method is applied to two second degree, a third degree and a fourth degree linear ordinary differential equations, whose analytical solutions are available, by using the first order and next the second order central differentiation formulae (FOCDF, SOCDF), with step sizes of Δx = 0.1, 0.05, 0.02, 0.01, separately. Usage of SOCDF requires much more laborious algebraic manipulations than FOCDF in converting a linear ordinary differential equation to a finite difference equation. Moreover, by using SOCDF for third or fourth degree linear ordinary differential equations, the first three and the last three equations in the set are different from the generalized equation at the intermediate grid points while the first two and the last two are different by FOCDF. Yet, usage of SOCDF has not yielded a convincing betterment in results. Here, the same set of linear equations obtained by using FOCDF is solved twice with Δx's of 0.05 and 0.025, and the final results with Δx = 0.05 computed by the simple extrapolation-to-the-limit formula are observed to be improved significantly by becoming as good as or even better than those obtained by SOCDF. A main program is coded which will solve any linear ordinary differential equation up to the fourth degree using FOCDF and applying the extrapolation-to-the-limit formula with any Δx given by the user. A subprogram comprising the coefficients of the finite difference equations of the particular problem handled will be typed by the user and it will be linked to this fixed main program. The source listings of the main program and of the subprogram of the third example are given as Appendices B and C.
boundary value problem, linear ordinary differential equations.