Previous | Next --- Slide 37 of 46
Back to Lecture Thumbnails zyx

Does the error also increase over time, or are there any bounds on the error? It seems like this may be a problem for long-running simulations like the interaction of galaxies. keenan

@zyx A key motivation for symplectic integrators is that conserved quantities do not "drift," even over very long integration times. Formally, a numerical integrator is symplectic if the update rule mapping the state (configuration and momentum) from one time step to the next belongs to a special class of transformations called a symplectomorphism.

This fancy-sounding word is actually not so hard to understand: recall our discussion of generalized coordinates, that we can encode the entire state of the system as a collection of scalar variables $q = (q_1, \ldots ,q_n)$ and corresponding velocities $\dot{q} = (\dot{q}1, \ldots, \dot{q}_n)$. Actually, instead of velocities let's consider the _momenta $p = (p_1, \ldots, p_n)$, where momentum is "mass times velocity." So overall, the n degrees of freedom in our system specify a point in a 2n-dimensional space called the "phase space." Just like linear transformations preserve lines through the origin, rotations preserve lengths and orientation, etc., symplectomorphisms are best characterized by the quantity that they preserve. This quantity is something called the symplectic form, which again is not so hard to understand. Consider first a system like our pendulum, which has only one degree of freedom, i.e., $q_1 = \theta$ and $p_1 = L$, where $\theta$ is the angle with the vertical, and $L$ is the corresponding angular momentum. In this case, the symplectic form just measures the area in phase space, i.e., it is the usual area measure "dA" in the 2-dimensional plane where one axis is $q_1$ and the other axis is $p_1$. A symplectomorphism is, in this case, any map that takes the plane to the plane while locally preserving area. For instance, any rigid transformation is a symplectomorphism, but the space of possibilities is much larger: for example, any motion of a 2D incompressible fluid (just "swirling the plane around" like a cup of coffee) will also do the trick. One way to visualize this is to take any region in the plane, and watch it evolve under this map. It can distort badly, but will always preserve its area: For a system with $n$ degrees of freedom, the story is basically the same: the phase-space area is preserved in each individual coordinate plane. I.e., it is preserved in the $p_1-q_1$ plane, and the $p_2-q_2$ plane, and so forth (though the 2n-dimensional volume is NOT preserved).

So what does this have to do with preserving energy? Actually, you can show that if the symplectic form is preserved, then all sorts of other quantities (energy, momentum, etc.) are also nearly preserved, meaning that they will oscillate around their true value for all time. The choice of time step will affect the magnitude of these oscillations, but the value will never drift (since the symplectic form is preserved exactly). The only thing you might worry about here is floating point error; the discussion above assumes exact-precision arithmetic. But in practice, especially with double precision, what you find is that there really is no drift.

This is all discussed in the book Geometric Numerical Integration by Hairer, Lubich, and Wanner. cou

The comments here: http://15462.courses.cs.cmu.edu/fall2016/lecture/odes/slide_039 Show the symplectic euler equation keenan

@cou Thanks!