Saturday, August 16, 2014

Second order Finite Difference Schemes for Non-Uniform Grid Spacing

A lot of credit goes to

In the attached pdf I lay out the derivation for second order finite differences for non-uniform grid spacing for first and second derivatives.  Higher derivatives can be approximated in a comparable fashion...albeit with a lot more algebra involved in finding the derivatives.

I use Lagrange interpolating polynomials as the base functions and it results in the same derivatives that they provide at for the first derivatives.  Second derivatives are the same for the inner points, but they only supply the first order accurate second derivatives at the endpoints.  I wanted a better solution at the ends so I derived it myself.  This derivation contains second order accurate approximations for the endpoints as well.


No comments: