$$ \newcommand{\half}{\frac{1}{2}} \newcommand{\tp}{\thinspace .} \newcommand{\uex}{{u_{\small\mbox{e}}}} \newcommand{\uexd}[1]{{u_{\small\mbox{e}, #1}}} \newcommand{\vex}{{v_{\small\mbox{e}}}} \newcommand{\Oof}[1]{\mathcal{O}(#1)} $$

Truncation error analysis

Hans Petter Langtangen [1, 2]

[1] Center for Biomedical Computing, Simula Research Laboratory
[2] Department of Informatics, University of Oslo

Oct 17, 2015


WARNING: Preliminary version (expect typos!)

Table of contents

Overview of truncation error analysis
      Abstract problem setting
      Error measures
Truncation errors in finite difference formulas
      Example: The backward difference for \( u'(t) \)
      Example: The forward difference for \( u'(t) \)
      Example: The central difference for \( u'(t) \)
      Overview of leading-order error terms in finite difference formulas
      Software for computing truncation errors
Truncation errors in exponential decay ODE
      Truncation error of the Forward Euler scheme
      Truncation error of the Crank-Nicolson scheme
      Truncation error of the \( \theta \)-rule
      Using symbolic software
      Empirical verification of the truncation error
      Increasing the accuracy by adding correction terms
      Extension to variable coefficients
      Exact solutions of the finite difference equations
      Computing truncation errors in nonlinear problems
Truncation errors in vibration ODEs
      Linear model without damping
      Model with damping and nonlinearity
      Extension to quadratic damping
      The general model formulated as first-order ODEs
Truncation errors in wave equations
      Linear wave equation in 1D
      Finding correction terms
      Extension to variable coefficients
      1D wave equation on a staggered mesh
      Linear wave equation in 2D/3D
Truncation errors in diffusion equations
      Linear diffusion equation in 1D
      Linear diffusion equation in 2D/3D
      A nonlinear diffusion equation in 2D
Exercises
      Exercise 1: Truncation error of a weighted mean
      Exercise 2: Simulate the error of a weighted mean
      Exercise 3: Verify a truncation error formula
      Exercise 4: Truncation error of the Backward Euler scheme
      Exercise 5: Empirical estimation of truncation errors
      Exercise 6: Correction term for a Backward Euler scheme
      Exercise 7: Verify the effect of correction terms
      Exercise 8: Truncation error of the Crank-Nicolson scheme
      Exercise 9: Truncation error of \( u'=f(u,t) \)
      Exercise 10: Truncation error of \( [D_t D_tu]^n \)
      Exercise 11: Investigate the impact of approximating \( u'(0) \)
      Exercise 12: Investigate the accuracy of a simplified scheme