---
title: "Governing equations; forward, backward, central differencing"
subject: "Computational Techniques in Civil Engineering"
chapter: 5
key: "semester_8/computational_techniques_in_civil_engineering:governing-eq-forward-backward-central"
source: https://www.bctengineer.com/q/semester_8/computational_techniques_in_civil_engineering/governing-eq-forward-backward-central
site: BCT Engineering
---

# Governing equations; forward, backward, central differencing

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

- Asked in: 2078 Chaitra, 2+3 marks
- Video: [chapter -5! Numerical!FW,BW, central difference approximation calculations! Numerical of CT#ioe](https://www.youtube.com/watch?v=GjxrJSf78hI) — Sanjay64official
- 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/governing-eq-forward-backward-central
- Whole chapter: https://www.bctengineer.com/md/semester_8/computational_techniques_in_civil_engineering/chapter-5

## Question

Write down the governing equations used for analyzing the movement of fluid. Discuss forward, backward and central differencing with expressions.

## Short answer

Fluid movement is governed by the Saint-Venant equations: continuity ∂A/∂t+∂Q/∂x=q and momentum with local/convective acceleration, pressure, gravity and friction. Finite difference approximations: forward (f_{i+1}-f_i)/Δx, backward (f_i-f_{i-1})/Δx (both first-order accurate); central (f_{i+1}-f_{i-1})/(2Δx) (second-order).

## Answer

#### Governing equations of fluid movement
The unsteady flow of water in an open channel is governed by the Saint-Venant (1D shallow water) equations.

**Continuity (conservation of mass):**
$$
\frac{\partial A}{\partial t}+\frac{\partial Q}{\partial x}=q
$$
**Momentum (conservation of momentum):**
$$
\underbrace{\frac{\partial Q}{\partial t}}_{\text{local acc.}}+\underbrace{\frac{\partial}{\partial x}\!\left(\frac{Q^2}{A}\right)}_{\text{convective acc.}}+\underbrace{gA\frac{\partial y}{\partial x}}_{\text{pressure force}}-\underbrace{gAS_0}_{\text{gravity}}+\underbrace{gAS_f}_{\text{friction}}=0
$$
where $A$ = flow area, $Q$ = discharge, $y$ = flow depth, $q$ = lateral inflow per unit length, $S_0$ = bed slope, $S_f=\dfrac{n^2Q|Q|}{A^2R^{4/3}}$ = friction slope (Manning), $g$ = gravity. These are the Saint-Venant equations (1D unsteady open-channel flow).

In terms of velocity $V$ and depth $y$ for a wide rectangular channel:
$$
\frac{\partial y}{\partial t}+V\frac{\partial y}{\partial x}+y\frac{\partial V}{\partial x}=0,\qquad
\frac{\partial V}{\partial t}+V\frac{\partial V}{\partial x}+g\frac{\partial y}{\partial x}=g(S_0-S_f)
$$

#### Forward, backward and central differencing
The grid has points $x_i=i\Delta x$. The derivative at point $i$ is approximated using neighbouring values.

Expand $f$ about $x_i$ by Taylor's series:
$$
f_{i+1}=f_i+\Delta x f'_i+\frac{\Delta x^2}{2}f''_i+\frac{\Delta x^3}{6}f_i^{(3)}+\dots,\qquad
f_{i-1}=f_i-\Delta x f'_i+\frac{\Delta x^2}{2}f''_i-\frac{\Delta x^3}{6}f_i^{(3)}+\dots
$$

| Scheme | Expression | Error |
|---|---|---|
| Forward | $\left.\dfrac{\partial f}{\partial x}\right|_i\approx\dfrac{f_{i+1}-f_i}{\Delta x}$ | $O(\Delta x)$ |
| Backward | $\left.\dfrac{\partial f}{\partial x}\right|_i\approx\dfrac{f_i-f_{i-1}}{\Delta x}$ | $O(\Delta x)$ |
| Central | $\left.\dfrac{\partial f}{\partial x}\right|_i\approx\dfrac{f_{i+1}-f_{i-1}}{2\Delta x}$ | $O(\Delta x^2)$ |
| Second derivative | $\left.\dfrac{\partial^2 f}{\partial x^2}\right|_i\approx\dfrac{f_{i+1}-2f_i+f_{i-1}}{\Delta x^2}$ | $O(\Delta x^2)$ |

The same formulas are used for the time derivative with $\Delta t$ (e.g. forward in time: $\partial Q/\partial t\approx (Q_i^{n+1}-Q_i^n)/\Delta t$).

```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)
```

- **Forward** uses the point ahead; **backward** uses the point behind (suited to flow from upstream, "upwind"); **central** uses both neighbours and is more accurate, but is less stable for explicit time marching.

## Check yourself

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

1. Which equations govern unsteady open-channel flow?
   A. Bernoulli and Manning only
   B. Laplace and Poisson
   C. Navier-Stokes without continuity
   D. Saint-Venant continuity and momentum equations
   Answer: D. The 1D shallow water equations, continuity and momentum, are called the Saint-Venant equations. (Key point: Governing equations)

2. What is the central difference for df/dx at i and its order?
   A. (f_{i+1} - f_i)/dx, O(dx)
   B. (f_{i+1} - f_{i-1})/(2 dx), O(dx^2)
   C. (f_i - f_{i-1})/dx, O(dx)
   D. (f_{i+1} - f_{i-1})/dx, O(dx^2)
   Answer: B. Subtracting Taylor series for i+1 and i-1 cancels f'' terms, giving an O(dx^2) error. (Key point: Central difference)

3. Which statement about forward and backward differences is correct?
   A. Both are second order
   B. Forward uses the point behind
   C. Backward uses the point ahead
   D. Both are first order; backward suits upstream (upwind) information
   Answer: D. Forward and backward differences have O(dx) error; backward uses the upstream point. (Key point: Forward vs backward)

## Related in Computational Techniques in Civil Engineering

- [Complete governing equations of fluid movement](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Acomplete-governing-equations-fluid) — Computational Techniques in Civil Engineering, chapter 5
- [Governing equations, kinematic wave, Courant number](https://www.bctengineer.com/question.md?key=semester_8%2Fcomputational_techniques_in_civil_engineering%3Agoverning-eq-kinematic-courant) — Computational Techniques in Civil Engineering, chapter 5

## Related in other subjects

- [Derive forward, backward, central differences](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Ataylor-series-finite-differences) — Applied Computational Fluid Dynamics, chapter 3
- [Forward vs backward chaining](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Aforward-vs-backward-chaining) — Artificial Intelligence, chapter 4, asked 3×
- [Short note: Forward and backward recovery](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aforward-backward-note) — Distributed System, chapter 9, asked 2×
- [Forward/backward recovery; checkpointing](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aforward-backward-coordinated-ckpt) — Distributed System, chapter 9
