- Website of Léopold Trémant/
- Blog posts/
- A gentle introduction to backward error analysis/
- Motivating backward error analysis/
Motivating backward error analysis
Table of Contents
There are two main areas in backward error analysis (b.e.a.), which are modified equations and modifying integrators. The first serve to study the properties of integrators, while the second improves the convergence of such integrators. Let’s have a look!
Modified equations #
As mentioned previously, backward error analysis serves to find a so-called “modified” vector field for which the exact solution matches the numerical solution at discrete times. This is tentatively illustrated in the following diagram
where represents the exact integration of the ODE and represents the application of a numerical method. The vector field is the original vector field on which the numerical method is applied and is the aforementioned modified vector field.
As an illustration1 These illustrations are possible thanks to the Julia package
B-Series. Thanks to the devs!
Here the dashed lines are the exact solutions of (for now unspecified) modified differential equations. Notice that for each method, the line exactly2 In reality, the curves do not exactly match: the modified vector field is computed as a truncated power series in , which induces a small error.
Modifying integrators / Corrected equations #
More recently, it has also been used to “correct” the vector field in simulations and improve numerical convergence. Once again, let me try to illustrate this with a diagram:
Using the notations of the first diagram, we want to find such that , i.e. we want to somehow “invert” the backward error analysis. Unsurprisingly, this corrected field depends on the time-step .
Considering again the Lotka-Volterra problem , , and the explicit Euler method, let’s look at the numerical solution of the corrected vector field and compare it with the exact solutions of both the original problem and the corrected problem.
This time, the numerical solution perfectly matches the exact solution at the discrete times! The error of the scheme is compensated by choosing the right corrected vector field.
Why should you care? #
While there are many uses for both methods, here are two common use cases for each approach.
Modified equations
- find the order of convergence of a numerical scheme
- study the long-time properties of integrators (such as energy preservation)
Corrected equations:
- improve the order of convergence of integrators (obviously)
- appears in machine learning of differential equations
If this is all too abstract, you may read the next post with examples in the case of linear differential equations.