









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










A topic-by-topic guide covering PDE classification, finite difference methods, stability theory,
elliptic and parabolic problems, iterative linear solvers, and hyperbolic PDEs — with full
derivations and worked examples throughout.
Original study notes — independently written summary and explanation
Given F(t): ℝ→ ℝ and G(t): ℝ→ ℝ, F(t) = O(G(t)) as t→t₀ if there exist C and ε ∈(0,∞) such
that |t−t₀| < ε implies |F(t)| ≤ C|G(t)|. Big O notation describes how fast a function grows or
shrinks relative to another function, near a given point — this is essential for describing the
convergence and errors of numerical methods.
Consider du/dt = α(t)u + β(t) for t ∈ (0,T), u(t=0) = c. Seeking approximate values U ₙ≈
u(t=nΔt) for n = 0,...,N with Δt = T/N, a forward Euler discretisation replaces the derivative
with a forward difference:
(U ₙ₊₁ − U )/Δt = α(nΔt)U ₙ ₙ+ β(nΔt), for n = 0,...,N−1, U₀ = c
This general three-step recipe — (1) define what to approximate, (2) replace derivatives with
a difference and approximate other terms, (3) apply boundary/initial conditions — is used
throughout. The resulting system can always be written as a linear system AU = b, where
the discretisation matrix A is typically sparse (mostly zero entries), reflecting that each
discrete equation only involves a small number of neighbouring unknowns.
Backward Euler discretises instead using a backward difference: (U ₙ − U ₙ₋₁)/Δt = α(nΔt)U ₙ+
β(nΔt) for n = 1,...,N.
The global error is the difference between the numerical and exact solutions: e ₙ = U ₙ−
u(t=nΔt), collected into a global error vector e(Δt). A numerical method is convergent in a
given norm if lim as Δt→0 of ‖e(Δt)‖ = 0. If there is a non-zero real constant C such that lim
as Δt→0 of ‖e(Δt)‖/(Δt)ᵖ = C, the method is said to be p-th order accurate.
Assuming a derivative of order k is discretised to yield a term with division by exactly k
factors of the grid spacing, the local truncation error is the error in the discrete equation
when the exact solution is substituted in.
For forward Euler, substituting the exact solution and using a Taylor expansion U ₙ₊₁ = U ₙ+
Δt(du/dt) ₙ + (1/2)(Δt)²(d²u/dt²) ₙ+ O((Δt)³) gives, after using the original DE to cancel terms:
τ ₙ₊₁ = (1/2)Δt(d²u/dt²) ₙ+ O((Δt)²)
— a first-order local truncation error. An entirely analogous calculation (expanding U ₙin
terms of U ₙ₊₁ instead) shows backward Euler also has a first-order local truncation error.
For d²u/dx² = β(x), x ∈(0,D), with u(0)=a and u(D)=c, the standard centred-difference
approximation (U ₙ₋₁ − 2U ₙ + U ₙ₊₁)/(Δx)² = β(nΔx) has local truncation error τ ₙ= O((Δx)²) —
obtained by Taylor-expanding U ₙ₋₁ and U ₙ₊₁ around U ₙand observing that the odd-order
terms cancel, leaving only even powers of Δx starting at (Δx)².
Relating the global error to the local truncation error: writing the exact solution's discrete-
equation residual as Auₑₓₐc − b = τ, and the numerical solution as AU = b, gives Ae = −τₜ
where e = U − uₑₓₐc .ₜ
A numerical method is consistent in a given norm if lim as Δx→0 of ‖τ(Δx)‖ = 0. Choosing
the right norm matters: for a d-dimensional discrete vector, the weighted 2-norm is defined
as ‖u‖(2,Δx) = √((Δx)ᵈ)·‖u‖₂ — this weighting is needed because ‖τ‖₂ = O((Δx)²) does not
automatically imply the same order holds for other, unweighted norms.
For the heat equation u = K·uₓₓ, xₜ ∈ (a,b), t ∈(0,T), the key idea is to discretise over
"space" first, applying the three-step finite difference procedure to arrive at a coupled system
of ODEs (semi-discrete values U ₘ(t) ≈ u(x=a+mΔx,t)), then discretise over the time variable
separately, applying the same three-step procedure again.
For the fully discrete heat equation problem, three schemes are commonly used:
U ₘ ⁺ⁿ ¹ = μU ₘ₋₁ⁿ + (1−2μ)U ₘⁿ + μU ₘ₊₁ⁿ, μ = KΔt/(Δx)² > 0
Rearranged this way, the solution at the next time step can be computed directly from the
previous one — no linear system solve is required. This gives forward Euler its explicit
name, and makes it the cheapest of the three per step (only a matrix-vector multiplication).
−μU ₘ₋₁ⁿ ¹ + (1+2μ)U ⁺ ₘ ⁺ⁿ ¹ − μU ₘ₊₁ⁿ ¹ = U ⁺ ₘⁿ
Now, at each time step, a tridiagonal linear system must be solved — more computationally
expensive, but (as shown below) unconditionally stable.
Averaging the forward and backward Euler spatial terms gives the Crank-Nicolson scheme,
which also requires a linear system solve at each time step (the most computational work of
the three), but achieves a higher order of accuracy in time.
Forward Euler: no matrix solve required (cheapest); local truncation error O(Δt) + O((Δx)²);
conditionally stable, requiring KΔt/(Δx)² ≤ 1/2.
Backward Euler: matrix solve required; local truncation error O(Δt) + O((Δx)²);
unconditionally stable (no restriction on Δt).
Crank-Nicolson: matrix solve required (most work); local truncation error O((Δt)²) + O((Δx)²)
— higher accuracy in time; unconditionally stable.
With Δt set as a function of Δx via Δt = K·(Δx)^β for some positive K, β, a Taylor expansion
of the fully discrete equations shows τ ₘⁿ = O(Δt) + O((Δx)²) = O((Δx)^min{β,2}). If β > 2, (Δx)²
is the leading-order term; if β < 2, (Δx)^β is the leading-order term.
Using the weighted 2-norm over space and the infinity norm over time gives consistency: lim
as Δx→0 of max over n ‖τⁿ‖(2,Δx) = 0, with rate O((Δx)^min{β,2}).
Consider the scalar IVP du/dt = λu, u(t=0)=1. A one-step discretisation Uⁿ ¹ = αUⁿ is⁺
absolutely stable if the amplification factor α has bounded magnitude, |α| ≤ 1. For forward
Euler applied to this problem, α = 1+λΔt, so absolute stability requires |1+λΔt| ≤ 1.
For a linear system of coupled ODEs, du/dt = Au, a discretisation Uⁿ ¹ = BUⁿ is absolutely⁺
stable if ‖Bw‖₂ ≤ ‖w‖₂ for all compatible w. If B is normal (BᵀB = BBᵀ — true for all real
symmetric matrices, among others), it is sufficient for absolute stability that all eigenvalues
λ ₖ of B satisfy |λ | ≤ 1.ₖ
Linking absolute and Lax-Richtmyer stability: if a t-dimension discretisation (at a given Δx) is
absolutely stable for all positive Δt, then it is Lax-Richtmyer stable in the spatial weighted 2-
norm — sufficient, but not necessary.
For a PDE discretisation of the form (1/Δt)Uⁿ ¹ = (1/Δt)BUⁿ + Fⁿ, the discretisation is Lax-⁺
Richtmyer stable in a given norm if, for all positive T, there exists C ∈(0,∞) such that ‖Bⁿw‖
≤ C‖w‖ for all compatible w and positive integers n with nΔt ≤ T.
The global error satisfies eⁿ ¹ = Beⁿ − Δt·τⁿ ¹, which telescopes to eⁿ = Bⁿe⁺ ⁺ ⁰ − Δt Σ ₚ Bⁿ ᵖτᵖ.⁻
Taking norms and applying the triangle inequality, then using Lax-Richtmyer stability, gives:
max over n ‖eⁿ‖ ≤ (1+T)·max ‖Bᵖτⁿ‖
So consistency + Lax-Richtmyer stability = convergence for a method of lines discretisation,
providing the same norm is used throughout.
Von Neumann analysis applies to problems satisfying simplifying assumptions: Fⁿ=0, one
spatial dimension, periodic spatial boundary conditions, and uniform grid spacing (these last
two can be somewhat relaxed). It seeks amplification factors α ₖ via the ansatz U ₘⁿ =
exp(2ikπ·mΔx/D), with U ₘ ⁺ⁿ ¹ = α U ₖ ₘⁿ.
Substituting the ansatz into the forward Euler heat equation scheme and using cos(z) =
(e ᶻ+eⁱ ⁻ⁱᶻ)/2 gives:
α ₖ= 1 + (KΔt/(Δx)²)[2cos(2kπΔx/D) − 2]
Since cos is bounded between −1 and 1, the bracketed term is always ≤ 0, so α ₖ≤ 1
automatically. For stability we also need α ₖ≥ −1, which (in the worst case, cos = −1)
requires:
0 < KΔt/(Δx)² ≤ 1/
This is the famous stability condition for forward Euler applied to the heat equation. By
contrast, repeating the same analysis for backward Euler leads to an amplification factor with
magnitude always ≤ 1 regardless of Δt — confirming backward Euler is unconditionally
stable.
Elliptic PDEs describe 2D (or higher-dimensional) spatial problems with boundary data and
no time component — unlike the parabolic case, there are no non-trivial plane-wave
solutions and no "propagating" nature. For Lu = F(x₁,...,xd) with L = ΣᵣΣ ₛ Aᵣ, ∂²/∂xᵣ∂xₛ ₛ+ Σᵣ
Bᵣ∂/∂xᵣ + C (Aᵣ, ₛ = A ,ᵣ), the operator L is elliptic if the symmetric matrix A with entries Aᵣ,ₛ ₛis
either symmetric positive definite or symmetric negative definite.
For d=2, this connects directly back to Section 1's classification: the matrix A has
eigenvalues μ± = (1/2)(a+c) ± (1/2)√((a+c)²+(b²−4ac)), which are half the eigenvalues of the
matrix M from the plane-wave analysis. μ+ and μ− are both non-zero and have the same
sign if and only if b²−4ac < 0 — exactly the elliptic condition.
Consider ∇²u = F(x₁,...,xd), where ∇² = Σᵣ ∂²/∂xᵣ². Two standard boundary condition types:
y ∇ = g on ∂Ω (specifying information perpendicular to the boundary),
where ∂u/∂n = u·n y and n y ∇ is the outward normal.
For the pure Neumann case, a solvability (compatibility) condition is required: ∫Ω F = ∫∂Ω g.
This follows directly from the divergence theorem, ∫Ω ²u = ∫Ω ·( u) = ∫∂Ω u·n
y ∇ ∇ ∇ ∇ = ∫∂Ω g,
which must equal ∫Ω F by the PDE itself. Additionally, if u solves the pure Neumann problem,
so does u+constant for any constant — so a further constraint (e.g. ∫Ω u = 0) is needed to
pick out a unique solution.
For a 2D Poisson equation uₓₓ+uᵧᵧ=F(x,y) on a square grid with Δx=Δy, the standard
discretisation is:
(U ₘ₋ ₚ₁, + U ₘ₊ ₚ₁, − 4U ₘ ₚ, + U ₘ ₚ₋, ₁ + U ₘ ₚ₊, ₁)/(Δx)² = F(mΔx,pΔx)
The stencil — the set of discrete grid points used by a discretisation of an operator — for this
scheme is the five-point Laplacian: the centre point plus its four immediate neighbours (up,
down, left, right).
A Taylor expansion (using U ₘ₋₁, +U ₚ ₘ₊₁, ₚ = 2U ₘ ₚ, + (Δx)²(uₓₓ) ₘ ₚ, + O((Δx)⁴), and similarly in
the y-direction) shows the local truncation error is τ ₘ ₚ, = O((Δx)²), after the leading terms
cancel using the original PDE.
Using the weighted 2-norm ‖u‖(2,Δx) = √((Δx)^d)·‖u‖₂, consistency follows in a manner
directly analogous to the 1D case. For stability, the discretisation matrix A is real symmetric
(hence normal), with eigenvectors v , (elements sin(kπ·mΔx)sin(lπ·pΔx)) and eigenvalues:ₖ ₗ
λ , = (2/(Δx)²)[cos(kπΔx) + cos(lπΔx) − 2]ₖ ₗ
As in the 1D case, λ , ≠ 0 for all valid k,l (so A is always invertible), all eigenvalues areₖ ₗ
negative (so A is symmetric negative definite), and λ₁,₁ is the eigenvalue with the smallest
magnitude. A Taylor expansion gives λ₁,₁ = −2π² + O((Δx)²), and the same style of argument
as the 1D proof shows ‖A ¹w‖(2,Δx) ≤ C‖w‖(2,Δx) for Δx sufficiently small — proving stability⁻
in the weighted 2-norm, and hence second-order convergence.
Marked explicitly as not examinable in the original course — included here only for
completeness.
A set of functions can form an orthonormal basis in the same way a set of vectors can:
⟨ φᵢ,φ ⱼ⟩ = ∫ φᵢ(x)φ (x)w(x)dx = δᵢ, , for a weighting function w(x). The key idea of spectralⱼ ⱼ
methods is to rewrite functions in terms of such a basis — e.g. the Fourier basis f(x) = Σ ₖ
A e ᵏˣ, with Aₖ ⁱ ₖ = (1/2π)∫f(x)e ⁻ⁱᵏˣdx.
For equally-spaced points, the discrete Fourier transform (DFT) gives the discrete analogue:
fy ₖ = (1/N)Σ ₙ f(x )e ²π ⁿᵏ/ᴺ, with the inverse recovering f(x ) = Σₙ ⁻ ⁱ ₙ ₖ ₖfy e²π ⁿᵏ/ᴺ exactly. ⁱ
Taking the Fourier transform of the heat equation converts it into a set of decoupled ODEs in
Fourier space, d/dt û ₖ = −k²û , which can even be solved analytically in this case: û (t) =ₖ ₖ
e ᵏ²ᵗû (t=0). The procedure is: (1) Fourier-transform the PDE and initial condition; (2) solve⁻ ₖ
the resulting (decoupled) ODEs; (3) inverse-transform back to obtain the solution to the
original PDE at the desired time.
An alternative implementation builds differentiation matrices directly (Dxx·u − Dx·u = b),
which can be derived either via local polynomial interpolation, or via the discrete Fourier
approach using an interpolant for the discrete delta function.
Spectral methods are not limited to periodic boundary conditions. For homogeneous Dirichlet
BCs, Chebyshev polynomials T (cosθ)=cos(nθ) (with recurrence Tₙ ₙ₊₁(x)=2xT (x)−T ₙ ₙ₋₁(x))
are a suitable orthonormal basis, with the roots of the Chebyshev polynomials, x =cos(jπ/N),ⱼ
as the optimal choice of grid points.
This choice guarantees the A-conjugacy property. Key properties of the algorithm: p ᵏ is A-⁽ ⁾
conjugate to all previous search directions; r ᵏ is orthogonal to all previous residuals; and the⁽ ⁾
subspaces spanned by the search directions, by {r ⁽⁰⁾,Ar ⁽⁰⁾,...,Aᵏ ¹r ⁻ ⁽⁰⁾} (the Krylov subspace),
and by {Ae ⁽⁰⁾,A²e ⁽⁰⁾,...} are all identical.
Using the A-norm ‖v‖A = (vᵀAv)^(1/2) to measure convergence, and the 2-norm condition
number κ(A) = λmax/λmin:
‖e ᵏ ‖A / ‖e⁽ ⁾ ⁽⁰⁾‖A ≤ 2·((√κ−1)/(√κ+1))ᵏ
A smaller condition number κ gives faster convergence. In exact arithmetic, conjugate
gradients is guaranteed to solve an m×m system exactly in at most m iterations; if A has
n
A system of PDEs u + Auₓ = 0, with A a real matrix, is hyperbolic if A is diagonalisable withₜ
real eigenvalues. If V diagonalises A (V ¹AV=Λ, diagonal), then defining ũ = V ¹u decouples⁻ ⁻
the system into independent scalar problems: (ũ ) + Λ , (ũ )ₓ = 0 for each element.ₚ ₜ ₚ ₚ ₚ
The prototypical first-order PDE is the advection equation, u + vuₓ = 0. If u solves this and vₜ
is constant, differentiating shows u also solves the wave equation u ₜₜ− v²uₓₓ = 0.
Using the change of coordinates x=x−vt, t
=t, the chain rule gives u = −vux + ut
ₜ and uₓ = ux,
so the advection equation becomes exactly ut
= 0 — meaning u is constant along lines of
constant x = x−vt. These lines are the characteristics. It follows immediately that the exact
solution is u(x,t) = P(x−vt), where P is the initial condition u(x,t=0)=P(x).
Since the solution is constant along each characteristic, exactly one value of u must be
specified per characteristic — no more, no less. This determines which boundary conditions
are appropriate, depending on the sign of v:
condition u(x,t=0)=P(x) plus a boundary condition at the left edge, u(x=a,t)=c(t).
condition plus a boundary condition at the right edge, u(x=b,t)=d(t).
Periodic boundary conditions can also be specified, using an extended function P
(x) built by
joining translated copies of P(x) from the base interval [a,b] (with P
(x+nD) = P
(x+(n+1)D) for
the domain length D=b−a), giving u(x,t) = P
(x−vt).
Applying the method of lines with a centred spatial discretisation, dU ₘ/dt +
v(U ₘ₊₁−U ₘ₋₁)/(2Δx) = 0, then discretising in time via backward Euler and applying the von
Neumann ansatz leads (using sin(z)=(e ᶻ−eⁱ ⁻ⁱᶻ)/2i) to complex amplification factors:
α ₖ= 1 / (1 + i·(vΔt/Δx)·sin(2kπΔx/D))
Since |α |² = 1/(1 + (v²(Δt)²/(Δx)²)sin²(2kπΔx/D)) is always ≤ 1, this scheme is unconditionallyₖ
Lax-Richtmyer stable — regardless of the value of Δt.
The quantity C = vΔt/Δx that appears throughout this analysis is the (signed) Courant
number — a central quantity when studying discretisations of the advection equation.
These methods trace solutions backward along the characteristics from a grid point at time
level n+1 to interpolate the numerical solution at time level n. For v > 0, with |vΔt/Δx| ≤ 1,
interpolating between grid points at x=a+mΔx and x=a+(m−1)Δx gives:
(U ₘ ⁺ⁿ ¹ − U ₘⁿ)/Δt + v(U ₘⁿ − U ₘ₋₁ⁿ)/Δx = 0
This is the upwind discretisation — the spatial difference is taken "upwind" (in the direction
the characteristics are coming from). For v < 0, the analogous scheme uses the other
neighbouring point instead: (U ₘ ⁺ⁿ ¹−U ₘⁿ)/Δt + v(U ₘ₊₁ⁿ−U ₘⁿ)/Δx = 0.