Accounting equation: Difference between revisions
en>Bkell m fix TeX |
|||
Line 1: | Line 1: | ||
In the mathematical field of [[numerical ordinary differential equations]], a '''geometric integrator''' is a numerical method that preserves geometric properties of the exact [[Vector field#Flow curves|flow]] of a differential equation. | |||
==Pendulum example== | |||
We can motivate the study of geometric integrators by considering the motion of a [[simple pendulum|pendulum]]. | |||
Assume that we have a pendulum whose bob has mass <math>m=1</math> and | |||
whose rod is massless of length <math>\ell=1</math>. Take the | |||
acceleration due to gravity to be <math>g=1</math>. Denote by | |||
<math>q(t)</math> the angular displacement of the rod from the vertical, | |||
and by <math>p(t)</math> the pendulum's momentum. The [[Hamiltonian mechanics|Hamiltonian]] of | |||
the system, the sum of its [[kinetic energy|kinetic]] and [[potential energy|potential]] energies, is | |||
:<math>H(q,p) = T(p)+U(q) = \frac{1}{2}p^2 - \cos q, </math> | |||
which gives [[Hamilton's equations]] | |||
:<math>(\dot q,\dot p) = (p,-\sin q). \, </math> | |||
It is natural to take the [[configuration space]] <math>Q</math> of all <math>q</math> to be the unit | |||
circle <math>\mathbb S^1</math>, so that <math>(q,p)</math> lies on the | |||
cylinder <math>\mathbb S^1\times\mathbb R</math>. However, we will take | |||
<math>(q,p)\in\mathbb R^2</math>, simply because <math>(q,p)</math>-space is | |||
then easier to plot. Define <math>z(t) = (q(t),p(t))^{\mathrm T}</math> | |||
and <math>f(z) = (p,-\sin q)^{\mathrm T}</math>. Let us experiment by | |||
using some simple numerical methods to integrate this system. As usual, | |||
we select a constant step size, <math>h</math>, and for an aribtrary non-negative integer <math>k</math> we write | |||
<math>z_k:=z(kh)</math>. | |||
We use the following methods. | |||
: <math> z_{k+1} = z_k + hf(z_k) \, </math> ([[Euler method|explicit Euler]]), | |||
: <math> z_{k+1} = z_k + hf(z_{k+1}) \, </math> ([[implicit Euler method|implicit Euler]]), | |||
: <math> z_{k+1} = z_k + hf(q_k,p_{k+1}) \, </math> ([[Euler–Cromer algorithm|symplectic Euler]]), | |||
: <math> z_{k+1} = z_k + hf((z_{k+1}+z_k)/2) \, </math> ([[implicit midpoint rule]]). | |||
(Note that the symplectic Euler method treats ''q'' by the explicit and <math>p</math> by the implicit Euler method.) | |||
The observation that <math>H</math> is constant along the solution | |||
curves of the Hamilton's equations allows us to describe the exact | |||
trajectories of the system: they are the [[level set|level curves]] of <math>p^2/2 - | |||
\cos q</math>. We plot, in <math>\mathbb R^2</math>, the exact | |||
trajectories and the numerical solutions of the system. For the explicit | |||
and implicit Euler methods we take <math>h=0.2</math>, and ''z''<sub>0</sub> = (0.5, 0) and (1.5, 0) respectively; for the other two methods we take <math>h=0.3</math>, and ''z''<sub>0</sub> = (0, 0.7), (0, 1.4) and (0, 2.1). | |||
[[Image:pendulumtrajectories.png|thumb|300px|Simple pendulum: trajectories]] | |||
The explicit (resp. implicit) Euler method spirals out from (resp. in to) the origin. The other two methods show the correct qualitative behaviour, with the implicit midpoint rule agreeing with the exact solution to a greater degree than the symplectic Euler method. | |||
Recall that the exact flow <math>\phi_t</math> of a Hamiltonian system with one degree of freedom is | |||
area-preserving, in the sense that | |||
:<math>\det\frac{\partial\phi_t}{\partial (q_0,p_0)} = 1</math> for all <math>t</math>. | |||
This formula is easily verified by hand. For our pendulum | |||
example we see that the numerical flow <math>\Phi_{{\mathrm{eE}},h}:z_k\mapsto z_{k+1}</math> of the explicit Euler method is '''not''' area-preserving; viz., | |||
:<math>\det\frac{\partial}{\partial (q_0,p_0)}\Phi_{{\mathrm{eE}},h}(z_0) | |||
= \begin{vmatrix}1&h\\-h\cos q_0&1\end{vmatrix} | |||
= 1+h^2\cos q_0.</math> | |||
A similar calculation can be carried out for the implicit Euler method, | |||
where the determinant is | |||
:<math>\det\frac{\partial}{\partial (q_0,p_0)}\Phi_{{\mathrm{iE}},h}(z_0) | |||
= (1+h^2\cos q_1)^{-1}.</math> | |||
However, the symplectic Euler method '''is''' area-preserving: | |||
:<math> | |||
\begin{pmatrix}1&-h\\0&1\end{pmatrix}\frac{\partial}{\partial (q_0,p_0)}\Phi_{{\mathrm{sE}},h}(z_0) | |||
= \begin{pmatrix}1&0\\-h\cos q_0&1\end{pmatrix},</math> | |||
thus <math>\det(\partial\Phi_{{\mathrm{sE}},h}/\partial (q_0,p_0)) = 1</math>. The implicit midpoint rule has similar geometric properties. | |||
To summarize: the pendulum example shows that, besides the explicit and | |||
implicit Euler methods not being good choices of method to solve the | |||
problem, the symplectic Euler method and implicit midpoint rule agree | |||
well with the exact flow of the system, with the midpoint rule agreeing | |||
more closely. Furthermore, these latter two methods are area-preserving, | |||
just as the exact flow is; they are two examples of geometric (in fact, [[symplectic integrator|symplectic]]) integrators. | |||
==Moving frame method== | |||
The [[moving frame]] method can be used to construct numerical methods which preserve [[Lie group|Lie]] [[Symmetry group|symmetries]] of the ODE. Existing methods such as [[Runge-Kutta]] can be modified using moving frame method to produce invariant versions.<ref>[http://www.math.ohio-state.edu/~pwkim/invode.pdf Invariantization of Numerical Schemes Using Moving Frames], Pilwon Kim, 2006, BIT Numerical Mathematics, 2007 – Springer</ref> | |||
==See also== | |||
* [[Energy drift]] | |||
==References== | |||
<references/> | |||
*Ernst Hairer, Christian Lubich and Gerhard Wanner, ''Geometric Numerical Integration: Structure-Preserving Algorithms for Ordinary Differential Equations.'' Springer, Berlin, 2002. ISBN 3-540-43003-2. | |||
*Ben Leimkuhler and Sebastian Reich, ''Simulating Hamiltonian Dynamics.'' Cambridge University Press, 2005. ISBN 0-521-77290-7. | |||
{{DEFAULTSORT:Geometric Integrator}} | |||
[[Category:Numerical differential equations]] |
Revision as of 09:19, 29 January 2014
In the mathematical field of numerical ordinary differential equations, a geometric integrator is a numerical method that preserves geometric properties of the exact flow of a differential equation.
Pendulum example
We can motivate the study of geometric integrators by considering the motion of a pendulum.
Assume that we have a pendulum whose bob has mass and whose rod is massless of length . Take the acceleration due to gravity to be . Denote by the angular displacement of the rod from the vertical, and by the pendulum's momentum. The Hamiltonian of the system, the sum of its kinetic and potential energies, is
which gives Hamilton's equations
It is natural to take the configuration space of all to be the unit circle , so that lies on the cylinder . However, we will take , simply because -space is then easier to plot. Define and . Let us experiment by using some simple numerical methods to integrate this system. As usual, we select a constant step size, , and for an aribtrary non-negative integer we write . We use the following methods.
(Note that the symplectic Euler method treats q by the explicit and by the implicit Euler method.)
The observation that is constant along the solution curves of the Hamilton's equations allows us to describe the exact trajectories of the system: they are the level curves of . We plot, in , the exact trajectories and the numerical solutions of the system. For the explicit and implicit Euler methods we take , and z0 = (0.5, 0) and (1.5, 0) respectively; for the other two methods we take , and z0 = (0, 0.7), (0, 1.4) and (0, 2.1).
The explicit (resp. implicit) Euler method spirals out from (resp. in to) the origin. The other two methods show the correct qualitative behaviour, with the implicit midpoint rule agreeing with the exact solution to a greater degree than the symplectic Euler method.
Recall that the exact flow of a Hamiltonian system with one degree of freedom is area-preserving, in the sense that
This formula is easily verified by hand. For our pendulum example we see that the numerical flow of the explicit Euler method is not area-preserving; viz.,
A similar calculation can be carried out for the implicit Euler method, where the determinant is
However, the symplectic Euler method is area-preserving:
thus . The implicit midpoint rule has similar geometric properties.
To summarize: the pendulum example shows that, besides the explicit and implicit Euler methods not being good choices of method to solve the problem, the symplectic Euler method and implicit midpoint rule agree well with the exact flow of the system, with the midpoint rule agreeing more closely. Furthermore, these latter two methods are area-preserving, just as the exact flow is; they are two examples of geometric (in fact, symplectic) integrators.
Moving frame method
The moving frame method can be used to construct numerical methods which preserve Lie symmetries of the ODE. Existing methods such as Runge-Kutta can be modified using moving frame method to produce invariant versions.[1]
See also
References
- ↑ Invariantization of Numerical Schemes Using Moving Frames, Pilwon Kim, 2006, BIT Numerical Mathematics, 2007 – Springer
- Ernst Hairer, Christian Lubich and Gerhard Wanner, Geometric Numerical Integration: Structure-Preserving Algorithms for Ordinary Differential Equations. Springer, Berlin, 2002. ISBN 3-540-43003-2.
- Ben Leimkuhler and Sebastian Reich, Simulating Hamiltonian Dynamics. Cambridge University Press, 2005. ISBN 0-521-77290-7.