These formulas below approximate \(u^{\prime }\) at \(x=x_{j}\) where \(j\) is the grid point number.
| formula | truncation | Truncation | common name and | |
| error | error order | common notation | ||
| 1 | \(u_{j}^{\prime }\approx \frac {1}{h}\left ( u_{j+1}-u_{j}\right ) \) | \(-u_{j}^{\prime \prime }\frac {h}{2}-u_{j}^{\left ( 3\right ) }\frac {h^{2}}{3!}-\cdots \) | \(O\left ( h\right ) \) | one point forward \(D_{+}\) |
| 2 | \(u_{j}^{\prime }\approx \frac {1}{h}\left ( u_{j}-u_{j-1}\right ) \) | \(u_{j}^{\prime \prime }\frac {h}{2}-u_{j}^{\left ( 3\right ) }\frac {h^{2}}{3!}+\cdots \) | \(O\left ( h\right ) \) | one point backward \(D_{\_}\) |
| 3 | \(u_{j}^{\prime }\approx \frac {1}{2h}\left ( u_{j+1}-u_{j-1}\right ) \) | \(-u_{j}^{\left ( 3\right ) }\frac {h^{2}}{6}-u_{j}^{\left ( 6\right ) }\frac {h^{5}}{6!}-\cdots \) | \(O\left ( h^{2}\right ) \) | centered difference, \(D_{0}=\frac {D_{+}+D_{\_}}{2}\) |
| 4 | \(u_{j}^{\prime }\approx \frac {1}{h}\left ( \frac {3}{2}u_{j}-2u_{j+1}+\frac {1}{2}u_{j+2}\right ) \) | to do | \(O\left ( h^{2}\right ) \) | 3 points forward difference |
| 5 | \(u_{j}^{\prime }\approx \frac {1}{6}\left ( 2u_{j+1}+3u_{j}-6u_{j-1}+u_{j-2}\right ) \) | to do | \(O\left ( h^{3}\right ) \) | |
For example, to obtain the third formula above, we start from Taylor series and obtain
then we write it again for the previous point
Notice the sign change in the expressions. We now subtract the second formula above from the above resulting in
Or
These formulas below approximate \(u^{\prime \prime }\) at \(x=x_{j}\) where \(j\) is the grid point number. For approximation to \(u^{\prime \prime }\) the accuracy of the approximation formula must be no less than \(2\).
| formula | truncation | Truncation | common name | |
| error | error order | |||
| 1 | \(u_{j}^{\prime \prime }\approx \frac {1}{h^{2}}\left ( U_{j-1}-2U_{j}+U_{j+1}\right ) \) | \(-u^{\left ( 4\right ) }\frac {h^{2}}{12}-u^{\left ( 6\right ) }\frac {h^{4}}{360}-\cdots \) | \(O\left ( h^{2}\right ) \) | 3 points centered difference |
To obtain the third formula above, we start from Taylor series. This results in
Then we write it again for the previous point
Notice the sign change in the expressions. We now add the second formula above from the above resulting in