Skip to main content

Subsection C.1 Numerical Methods

Numerical methods hurt my head. 🀯

Comparison of Finite Difference Scheme Properties.

The following tables summarize common finite difference schemes for first and second derivatives.
Table C.1.3. First-Derivative Finite Difference Schemes
Scheme and Formulation Error Grid Points
Forward Difference
\begin{equation*} \frac{df}{dx} \approx \frac{f(x+\Delta x) - f(x)}{\Delta x} \end{equation*}
\(\mathcal{O}(\Delta x)\) \(1\)
Backward Difference
\begin{equation*} \frac{df}{dx} \approx \frac{f(x) - f(x-\Delta x)}{\Delta x} \end{equation*}
\(\mathcal{O}(\Delta x)\) \(1\)
Central Difference
Second-order accurate central difference scheme:
\begin{equation*} \frac{df}{dx} \approx \frac{f(x+\Delta x) - f(x-\Delta x)}{2\Delta x} \end{equation*}
\(\mathcal{O}(\Delta x^2)\) \(2\)
Table C.1.4. Second-Derivative Finite Difference Schemes
Scheme and Formulation Error Grid Points
Central Difference
\begin{equation*} \frac{d^2f}{dx^2} \approx \frac{f(x+\Delta x) - 2f(x) + f(x-\Delta x)}{\Delta x^2} \end{equation*}
\(\mathcal{O}(\Delta x^2)\) \(2\)