Finite Difference Equations

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Some common dierence approximations

February 15, 2011

First derivative at xi , f (xi ): Dierence approximation (fi+1 fi )/h (fi fi1 )/h (3fi + 4fi+1 fi+2 )/2h (3fi 4fi1 + fi2 )/2h (fi+1 fi1 )/2h (fi2 8fi1 + 8fi+1 fi+2 )/12h Truncation error O(h) O(h) O(h2 ) O(h2 ) O(h2 ) O(h4 ) Comments One-sided (forward), two-point One-sided (backward), two-point One-sided (forward), three-point One-sided (backward), three-point *Two-sided, two-point Two-sided, four-point

Second derivative at xi , f (xi ): Dierence approximation (fi+2 2fi+1 + fi )/h2 (fi 2fi1 + fi2 )/h2 (fi+1 2fi + fi1 )/h2 (fi+3 + 4fi+2 5fi+1 + 2fi )/h2 (fi3 + 4fi2 5fi1 + 2fi )/h2 (fi2 + 16fi1 30fi + 16fi+1 fi+2 )/12h2 Truncation error O(h) O(h) O(h2 ) O(h2 ) O(h2 ) O(h4 ) Comments One-sided (forward), three-point One-sided (backward), three-point *Two-sided, three-point One-sided (forward), four-point One-sided (backward), four-point Two-sided, ve-point

Starred equations are those that are most typically applied in MecE 390.

Adapted from K. Nandakumar (ChE 474 course notes, 1997) and http://reference.wolfram.com/mathematica/tutorial/NDSolvePDE.html

You might also like