---
title: "First and second order finite difference schemes"
subject: "Computational Techniques in Civil Engineering"
chapter: 5
key: "semester_8/computational_techniques_in_civil_engineering:fd-first-second-order-schemes"
source: https://www.bctengineer.com/q/semester_8/computational_techniques_in_civil_engineering/fd-first-second-order-schemes
site: BCT Engineering
---

# First and second order finite difference schemes

Computational Techniques in Civil Engineering · Chapter 5: Finite difference method

- Asked in: 2079 Jestha, 4 marks; 2073 Magh, 4 marks (asked 2 times)
- Video: [Finite difference method | IOE | Numerical Method](https://www.youtube.com/watch?v=Ba3G7OQQVJw) — Bimlendra Pandit
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/computational_techniques_in_civil_engineering/fd-first-second-order-schemes
- Whole chapter: https://www.bctengineer.com/md/semester_8/computational_techniques_in_civil_engineering/chapter-5

## Question

With appropriate expressions and graphs, explain first and second order accurate schemes of finite differences of partial differential equations.

## Short answer

First-order schemes (forward/backward differences) have truncation error O(Δx) causing numerical diffusion; the chord slope is offset from the tangent. Second-order schemes (central difference) have error O(Δx^2) causing numerical dispersion; the central chord nearly matches the tangent, giving higher accuracy.

## Answer

A finite difference scheme is of order $p$ if its truncation error (the terms dropped from the Taylor series) is proportional to $\Delta x^p$ (or $\Delta t^p$). Higher order means the error falls faster when the grid is refined.

#### First-order accurate schemes
From Taylor's series,
$$
\frac{f_{i+1}-f_i}{\Delta x}=f'_i+\frac{\Delta x}{2}f''_i+\dots\ \Rightarrow\ f'_i=\frac{f_{i+1}-f_i}{\Delta x}+O(\Delta x)
$$
The forward difference $(f_{i+1}-f_i)/\Delta x$ and the backward difference $(f_i-f_{i-1})/\Delta x$ are first-order accurate. Applied to $\partial Q/\partial t+c\,\partial Q/\partial x=0$ with forward time and backward space:
$$
\frac{Q_i^{n+1}-Q_i^n}{\Delta t}+c\frac{Q_i^n-Q_{i-1}^n}{\Delta x}=0,\qquad \text{error } O(\Delta t,\Delta x)
$$

#### Second-order accurate schemes
Subtract the two Taylor series for $f_{i+1}$ and $f_{i-1}$; the $f''$ terms cancel:
$$
\frac{f_{i+1}-f_{i-1}}{2\Delta x}=f'_i+\frac{\Delta x^2}{6}f_i^{(3)}+\dots\ \Rightarrow\ f'_i=\frac{f_{i+1}-f_{i-1}}{2\Delta x}+O(\Delta x^2)
$$
This central difference is second-order accurate. Likewise $f''_i=\dfrac{f_{i+1}-2f_i+f_{i-1}}{\Delta x^2}+O(\Delta x^2)$. A second-order scheme in both variables is the four-point (box) scheme centred at $(i+\tfrac12,\ n+\tfrac12)$:
$$
\frac{Q_i^{n+1}+Q_{i+1}^{n+1}-Q_i^n-Q_{i+1}^n}{2\Delta t}+c\,\frac{Q_{i+1}^{n+1}+Q_{i+1}^n-Q_i^{n+1}-Q_i^n}{2\Delta x}=0
$$

#### Graphical meaning
```text
 f
 |                     . f(i+1)
 |                 . '
 |            f(i)
 |         .'
 |   f(i-1)
 +----|---------|---------|----> x
     i-1        i        i+1

 forward : chord i  -> i+1
 backward: chord i-1-> i
 central : chord i-1-> i+1 (closest to tangent at i)
```

The slope of the chord approximates the slope of the tangent at $i$. The forward and backward chords are tilted either side of the tangent (error proportional to $\Delta x$); the central chord is almost parallel to it (error proportional to $\Delta x^2$).

#### Grid view of the two PDE schemes
```text
 t
 n+1 :   o--------o            o   o
         |        |              \ |
 n   :   o        x         x-----x-----x   
        (i-1)    (i)       (i-1)  (i)  (i+1)
   first order (forward t,      second order (central
   backward x): 2 known pts     in x): 3 known points
```

#### Comparison

| | First order | Second order |
|---|---|---|
| Truncation error | $O(\Delta x)$ | $O(\Delta x^2)$ |
| Effect of halving $\Delta x$ | error halves | error falls to one quarter |
| Main numerical error | numerical diffusion (smearing) | numerical dispersion (oscillations) |
| Cost per step | small | slightly larger |

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What does it mean for a finite difference scheme to be second-order accurate?
   A. Its truncation error is proportional to the second derivative of f
   B. Its truncation error is proportional to delta x^2
   C. It uses two grid points
   D. Its truncation error is proportional to delta x
   Answer: B. Order p means the truncation error is proportional to delta x^p, so second order means error ~ delta x^2. (Key point: Definition of order)

2. Why is the central difference (f_{i+1} - f_{i-1})/(2 delta x) second-order accurate?
   A. It uses a larger step
   B. It is exact for all functions
   C. It uses only the point ahead
   D. Subtracting the two Taylor series cancels the f'' terms
   Answer: D. In f_{i+1} - f_{i-1} the f'' terms cancel, leaving an error of order delta x^2. (Key point: Central difference)

3. If delta x is halved, how does the error change for first and second-order schemes?
   A. First order error halves, second order falls to one quarter
   B. Both fall to one quarter
   C. First order falls to one quarter, second order halves
   D. Both halve
   Answer: A. Error ~ delta x for first order halves, error ~ delta x^2 for second order becomes a quarter. (Key point: Halving the grid)

## Related in Computational Techniques in Civil Engineering

- [Finite difference method; explicit and implicit schemes](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Afdm-explicit-implicit) — Computational Techniques in Civil Engineering, chapter 5, asked 2×
- [Saint-Venant, second-order explicit scheme](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Asaint-venant-second-order-explicit) — Computational Techniques in Civil Engineering, chapter 5, asked 2×
- [Second-order non-linear kinematic wave; FDM principle](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Asecond-order-nonlinear-kinematic-principle) — Computational Techniques in Civil Engineering, chapter 5
- [Second-order scheme, linear kinematic wave](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Asecond-order-linear-kinematic-scheme) — Computational Techniques in Civil Engineering, chapter 5
- [First-order implicit non-linear kinematic wave](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Afirst-order-implicit-nonlinear-kinematic) — Computational Techniques in Civil Engineering, chapter 5
- [First-order kinematic wave, flood peak at community](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Akinematic-wave-peak-flood-community) — Computational Techniques in Civil Engineering, chapter 5

## Related in other subjects

- [Models of zero, first and second order systems](https://www.bctengineer.com/question.md?key=semester_4%2Finstrumentation_and_measurement%3Azero-first-second-order-models) — Instrumentation and Measurement, chapter 4
- [Classify a second order PDE](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Aclassify-a-second-order-pde) — Mathematics III, chapter 4
- [Solve a partial differential equation](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-a-partial-differential-equation) — Mathematics III, chapter 4
- [Solve a partial differential equation](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-a-partial-differential-equation-two) — Mathematics III, chapter 4
