I took these notes in spring 2017 for CME 306, taught by Professor Lexing Ying.
Notation
If f is ∣α∣-differentiable, then Dαf∈C∣α∣−1 is the usual derivative.
If f is weakly differentiable, then Dαf:Rn→R satisfies ⟨Dαf,ϕ⟩=(−1)∣α∣⟨f,Dαϕ⟩for all ϕ∈C0∞.
If f is differentiable in the distributional sense, then Dαf:C0∞→R satisfies(Dαf){ϕ}=(−1)∣α∣⟨f,Dαϕ⟩for all ϕ∈C0∞.
Ck(Ω) is the space of k-differentiable functions on Ω, equipped with the norm
∣∣f∣∣Ck(Ω)=∣α∣≤kmax∣∣Dαf∣∣C(Ω) and the seminorm ∣f∣Ck(Ω)=∣α∣=kmax∣∣Dαf∣∣C(Ω)
L2(Ω) is the space of square-integrable functions on Ω, equipped with the inner product ⟨f,g⟩=∫Ωfg and induced norm ∣∣f∣∣=∫Ωf2.
Hk(Ω) is the Sobolev spaceHk(Ω)={f∈L2(Ω)∣Dαf∈L2(Ω) for all ∣α∣≤k} equipped with the inner product ⟨f,g⟩k=∣α∣≤k∑⟨Dαf,Dαg⟩L2(Ω).
Poincare inequality: ∣∣f∣∣≤C∣∣Df∣∣.
Note ∣f∣12≤∣∣f∣∣12≤(C2+1)∣f∣12 for H01
Finite-difference methods
In finite-difference methods, derivatives are approximated with forward/backwards/central difference operators: ∂Uj=hUj+1−Uj,∂ˉUj=hUj−Uj−1,∂^Uj=2hUj+1−Uj−1.
They may be combined to yield, for example, approximations to the second derivative:
∂∂ˉUj=h2Uj+1−2Uj+Uj−1,ΔhUj=ℓ∑∂ℓ∂ˉℓUj.
Error estimates (truncation error) are obtained using Taylor’s theorem: ∣∂uj−u′(xj)∣∣∂^uj−u′(xj)∣∣∂∂ˉuj−u′′(xj)∣∣Δhuj−Δu(xj)∣≤Ch∣u∣C2(xj−1,xj)≤Ch2∣u∣C2(xj−1,xj+1)≤Ch2∣u∣C4(xj−1,xj+1)≤Ch2∣u∣C4.
Poisson’s equation
To solve Poisson’s equation with finite differences, replace −Δuu=f in Ω=0 on ∂Ω⟹−ΔhUjUj=fj for xj∈Ω=0 for xj∈∂Ω, assuming that all neighbors of every point xj are contained in Ωˉ. This yields a system of linear equations in the Uj, which we may solve.
Consistency is given by the error estimate ∣U−u∣Ω≤Ch2∣u∣C4 by the following argument.
Discrete maximum principle: If −ΔhU≤0 for all xj∈Ω, then U attains its maximum on ∂Ω. (Proof: assume it attains an interior maximum; then its neighbors are also maxima.)
Bound on growth: ∣U∣Ωˉ≤∣U∣Γ+C∣ΔhU∣Ω. (Proof: Recalling for a paraboloid W, ΔhW=ΔW=constant, construct a paraboloid for which ΔhWj=−∣ΔhU∣Ω and 0≤Wj≤C. Then apply the discrete maximum principle to the mesh function Vj±=±Uj−Wj.)
This implies uniqueness (and hence existence), applying the bound to U1−U2.
This implies the error estimate, applying the bound to U−u and using the truncation error on Δh: ∣U−u∣Ω≤C∣ΔhU−Δhu∣=∣f−Δhu∣=∣Δu−Δhu∣≤Ch2∣u∣C4.
Initial-value problems
Suppose we are solving an initial value problem of the form ut=p(∂x∂)u, where p is some polynomial. With finite differences, we construct an evolution operator Ek that describes the approximate solution at the next time step t+k: Ujn+1=EkUjn and compute iterates upon an initial condition Uj0. A necessary condition for convergence to the correct solution is both consistency and stability.
For analysis, view Ek as a convolution operator acting on a function v(x): Ekv=p∑apv(x−hp)dx, so that the Fourier transform of both sides is (Ekv)^=E^(hξ)v^(ξ), with E^(ξ)=p∑ape−ipξ.
For an operator Ek to be consistent, we require Ekv∼E(k)v as k→0 and h→0, where E(t) is the true time evolution operator (that evolves by time t). Generally, a scheme created via finite differences will be consistent. However, if we need to constrct an operator by hand as a linear combination of lattice points, there is a nice characterization in the Fourier domain. By Taylor expansion in t and using the PDE, the true evolution operator is E(k)v=exp(k∂t∂)v=exp(kp(∂x∂))v. Under the Fourier transform, ∂x∂↦iξ, so this equation becomes (E(k)v)^=exp(kp(iξ))v^. Therefore, Ek is accurate to order r, i.e. Ekv=E(k)v+O(hr+1v(r+1)), if and only if E^k(hξ)=exp(kp(iξ))+O((hξ)r+1), or, rescaling: E^k(ξ)=exp(kp(hiξ))+O(ξr+1).
For an operator to be stable w.r.t. some norm, we require ∣∣Eknu∣∣≤∣∣u∣∣ for all n, where now we think of u as the error. If an operator is unstable, the error’s magnitude may increase exponentially. (Note that the PDE itself must be stable, which is true for the heat equation and transport equation.) Von Neumann stability analysis uses the L2-norm, which especially nice because the Plancherel theorem says that ∣∣v∣∣22=(2π)−1∣∣v^∣∣22. Thus, the stability condition can be written ∣∣E^knu^∣∣2≤∣∣u^∣∣2, which holds if and only if ∣∣E^k∣∣∞≤1. A necessary condition for stability is the CFL condition (Courant-Friedrichs-Lewy), which says that a necessary condition for stability is that the domain of Ek contains the domain of E(k).
If Ek is both consistent and stable, we may show convergence via the following error estimate. Similar to above, ∣∣Un−un∣∣22=∣∣(E^(hξ)n−exp(nkp(iξ)))v^∣∣22=∣∣(E^(hξ)−exp(kp(iξ)))j=0∑n−1E^(hξ)n−1−jexp(jkp(iξ))v^∣∣22≤Cn∣∣(E^(hξ)−exp(kp(iξ)))v^∣∣22≤Cn∣∣(hξ)r+1v^∣∣22≤C∣∣nhr+1v(r+1)∣∣22.
Heat equation
For the heat equation, the condition for rth-order accuracy becomes E^k(ξ)=e−λξ2+O(ξr+2), where λ=h2k. (We may increase the order by 1 in error term because the p only has even powers.)
The θ-method uses the evolution operator given by ∂ˉtUjn+1=θ∂x∂ˉxUjn+1+(1−θ)∂x∂ˉxUjn. The explicit forward Euler scheme uses θ=0, is a second-order scheme, and is L2-stable for λ≤21.
The implicit forward Euler scheme uses θ=1 and is so-named because we need to solve a linear system to determine Un+1. It is stable for all λ. The mesh sizes h and k need not be related anymore, and the max-norm error estimate can be written ∣∣Un−un∣∣∞≤Ct(h2+k)τ≤tmax∣u(⋅,t)∣C4.
The Crank-Nicolson scheme uses θ=21. It is stable for all λ. The max-norm error estimate can be written ∣∣Un−un∣∣∞≤Ct(h2+k2)τ≤tmax∣u(⋅,t)∣C6.
Transport equation
For the scalar transport equation ut=aux, the condition for rth-order accuracy becomes E^k(ξ)=eiλaξ+O(ξr+1), where λ=hk. The von Neumann stability condition for the following three schemes is ∣aλ∣≤1.
The forward Euler scheme uses the evolution operator given by ∂tUjn={a∂xUjna∂ˉxUjn if a>0, if a<0, where the dependence on the sign of a is called upwinding (necessary to satisfy the CFL condition).
The Friedrichs scheme is a first-order method based on the central difference ∂tUn=a∂^xUn+21λh∂x∂ˉxUn, where the artificial diffusion stabilizes it.
The Lax-Wendroff scheme is a method constructed explicitly to be second-order accurate:Ujn+1=aUj−1n+bUjn+cUj+1n, where a=21(a2λ2+aλ),b=1−a2λ2,c=21(a2λ2−aλ).
The Wendroff box scheme is a second-order method suitable for mixed initial-boundary value problems: ∂tUj+1/2n+aj+1/2n+1/2∂xUjn+1/2+bj+1/2n+1/2Uj+1/2n+1/2=fj+1/2n+1/2,where averages of surrounding grid points (up to four) are used if the grid point doesn’t exist.
Finite-element method
The Galerkin method is the following. We relax the strong formulation of the PDE Au=f into the weak formulation(Au,v)=(f,v)∀v∈H for some bilinear form (⋅,⋅) and space of test functionsH. Define a bilinear form ϕ as ϕ(u,v)=(Au,v), often symmetric.
If we relax H to some subspace W with basis v1,…,vn, we may express u=i∑uivi,so that this becomes i∑uiϕ(vi,vj)=(f,vj)j=1,…,n. In matrix form, this is the linear system Au=b, with the matrices Aij=ϕ(vi,vj),bj=(f,vj). The matrix A is called the stiffness matrix and b is called the load vector.
Let’s consider Poisson’s equation −∇⋅(a∇u)=f with Dirichlet boundary conditions, with a≥a0>0 (a coercivity condition). Here, the space of test functions is the Sobolev space H01 with the bilinear forms (v,w)=∫Ωvw,ϕ(v,w)=−a∫Ω∇v⋅∇w. For the finite-element method, the subspace is the space of piecewise linear functions on meshpoints {Pj}, with basis of the “pyramid functions” {Φi} interpolated from Φi(Pj)=δij.
Error analysis is most natural in the energy norm∣∣v∣∣a=ϕ(v,v). Since ϕ(U,χ)=(f,χ) and ϕ(u,χ)=(f,χ) for all χ∈W by construction, we have ϕ(U−u,χ)=0, so choosing χ=χ∗−U, ∣∣U−u∣∣a2=ϕ(U−u,U−u)+ϕ(U−u,χ∗−U)=ϕ(U−u,χ∗−u)≤∣∣U−u∣∣a∣∣χ∗−u∣∣a,so ∣∣U−u∣∣a=χ∈Wmin∣∣χ∗−u∣∣a. We assumed that ϕ is symmetric to apply Cauchy-Schwarz.
We may be interested in bounding with the L2 norm. For this, first convert norms from above using the relation c∣∣v∣∣L2≤∣∣v∣∣a≤C∣∣v∣∣L2, where the first follows is a coercivity condition (which follows from a≥a0 and Poincaré’s inequality) and the second is a boundedness condition (???). Then set χ=Ihu to be the linear interpolation of u and use the interpolation bound ∣∣Ihv−v∣∣L2≤Ch2∣v∣H2 to arrive at ∣∣U−u∣∣L2≤Ch2∣u∣H2≤Ch2∣Δu∣L2, where the last inequality is true when Ω is convex.
We may be also interested in bounding with the H1 seminorm ∣v∣H1=∣∣∇v∣∣L2. For this, first convert norms from above using the relation c∣v∣H1≤∣∣v∣∣a≤C∣v∣H1, which the first follows from our a≥a0 condition and the second is Poincaré’s inequality. Then set χ=Ihu to be the linear interpolation of u and use the interpolation bound ∣Ihv−v∣H1≤Ch∣v∣H2 to arrive at ∣U−u∣H1≤Ch∣u∣H2≤Ch∣∣Δu∣∣L2, where the last inequality is true when Ω is convex.
Finite-volume method
Conservative schemes discretize the spatial domain into cells Cj=[xj,xj+1] and locally solve the integral equation dtd∫xjxj+1u(x,t)dx=f(u(xj,t))−f(u(xj+1,t)). Approximate Uj≈h1∫xjxj+1u(x,t)dx to arrive at the conservative schemeh∂tUjn=f^(Uj−1n,Ujn)−f^(Ujn,Uj+1n) with numerical fluxf^(UL,UR).
A conservative scheme is consistent if f^ locally satisfies a Lipschitz condition ∣f^(UL,UR)−f(u)∣≤Cmax(∣UL−u∣,∣UR−u∣). If a consistent conservative scheme converges, then it converges to a weak solution (Lax and Wendroff).
If additionally the scheme is monotone, i.e. the scheme is written Ujn+1=G(Uj−1n,Ujn,Uj+1n) and G is monotonically increasing in its three arguments, then the scheme converges to an entropy solution (Crandell and Majda). This condition may be expanded to read ∂1f^≥0,∂2f^≤0,kh≥∂1f^(Uj,Uj+1)−∂2f^(Uj−1,Uj). Monotone schemes are at best first-order.
Define α=max∣u∣≤A∣f′(u)∣ and A≥∣u(x,0)∣, where we can think of α as the maximum velocity of flow. The following schemes are monotone with kh≥α, a CFL condition.
The Godunov scheme uses the numerical flux f^(UL,UR)={minUL≤u≤URf(u)maxUR≤u≤ULf(u)UL≤URUR≤UL, derived from solving the Riemann problem at each mesh point (requires casework).
The Lax-Friedrichs scheme uses the numerical flux f^(UL,UR)=21[f(UL)+f(UR)−α(UR−UL)].