Preprint
Article

This version is not peer-reviewed.

Numerical Analysis for a Class of Variational Integrators

A peer-reviewed article of this preprint also exists.

Submitted:

09 June 2025

Posted:

10 June 2025

You are already at the latest version

Abstract
In this paper, we study a geometric framework for a class of second order differential systems arising in classical and relativistic mechanics. For this class of systems, we derive the necessary and sufficient conditions for their Lagrangian description. Using the discrete variational principle, we present a class of variational integrators by splitting the Lagrangian. We then prove that the newly derived numerical methods are equivalent to composition methods. When applied to the Kepler problem, these methods show superior performance over classical methods. By establishing the theory of modified equations and modified Lagrangians, we provide error estimates for the new variational methods. The analysis of the Laplace--Runge--Lenz (LRL) vector confirms the numerical performance.
Keywords: 
;  ;  ;  ;  

1. Introduction

Some important physical problems, ranging from celestial mechanics to magnetized plasmas, naturally exhibit rich conservative invariants. These problems are often connected to geometric structures, which have garnered increasing interest in recent studies [1,2,3]. Examples of such structures include Hamiltonian, volume-preserving, Poisson, contact, and integral-preserving systems. Among these, variational structures play a central role in modeling systems in various applications. The inverse variational principle [4] provides the foundational approach for studying systems within the Lagrangian framework [4,5,6]. Through Legendre transformations, the Hamiltonian and Lagrangian formulations are shown to be equivalent. In the variational framework, variational integrators are constructed by discretizing the Lagrangian. Numerical methods are then derived via the discrete Euler–Lagrange equations. Further details can be found in [7] and the references therein. These numerical methods consistently demonstrate superior efficiency and stability. Such methods have been successfully applied to simulate various physical problems, including soliton wave equations [8,9], charged particle dynamics in electromagnetic fields [10,11,12,13], and kinetic models in plasma physics [14,15], among others.
In the theory of backward error analysis (or modified equations theory), a numerical method is interpreted as the exact solution of a nearby “modified” system. According to this theory, structure-preserving numerical methods satisfy modified equations that retain the same structure as the original system. This explains the superior behavior of structure-preserving numerical methods in long-term simulations [16,17,18]. In [19], the concept of modified equations has been extended to variational equations. This theory can be extended to analyze adaptive time-step variational integrators [20] and Hamiltonian partial differential equations (PDEs) [21,22], broadening its applicability to a wider range of systems.
This paper focuses on second order ordinary differential systems. We establish the necessary and sufficient conditions for variational formulations of a class of systems. This framework naturally encompasses classical and relativistic dynamics, as well as the motion of charged particles under Lorentz forces. In this variational framework, variational integrators are constructed by discretizing the Lagrangian. To enhance computational efficiency, we introduce new variational integrators by splitting the Lagrangian. Through Legendre transformations, we prove that these methods are equivalent to composition methods. We use the Kepler problem as an example, where geometric integrators have been shown to perform well in long-term numerical simulations [23,24,25,26]. The Kepler system, a super-integrable system that models gravitational motion, involves conserved quantities such as energy, angular momentum, and the Laplace–Runge–Lenz (LRL) vector [27]. We investigate the superior numerical performance of variational integrators in simulating the Kepler problem. In addition to energy and momentum, the LRL vector, a hidden conserved quantity [28], governs orbital geometry. By Noether’s Theorem [29], we show the variational symmetries for energy, momentum, and the LRL vector. Through the development of modified equations and modified Lagrangians, we understand the solution of variational integrators as exact solutions of the perturbed Kepler system. Using modified equation theory, we demonstrate that the modified Kepler equation remains integrable, ensuring bounded errors in preserving energy and momentum. However, the modified equation loses super-integrability, leading to a quasi-periodic orbit instead of a periodic one. We explicitly derive the modified Lagrangians for the symplectic Euler, Störmer—Verlet methods, and the newly derived variational integrators. Perturbation theory reveals the super-convergence of these new variational integrators in preserving the LRL vector.
The paper is organized as follows. Section 2 establishes the necessary and sufficient conditions for describing second order systems within a variational framework. Section 3 constructs variational discretizations by splitting the Lagrangian. The resulting numerical discretization is shown to be equivalent to the composition method. Using classical and relativistic Kepler systems as examples, we illustrate the numerical methods and present variational symmetries for energy, momentum, and the LRL vector. Section 4 develops the theory of modified equations and modified Lagrangians. The recursive expressions for the Nyström methods is provided. For the Kepler problem, we also analyze the errors of the newly proposed variational integrators in conserving quantities. In Section 5, we apply the newly derived variational integrators to solve the Kepler problem. The numerical results demonstrate the superior performance of these methods. We further analyze the numerical performance using the modified Lagrangian theory. Additionally, we apply the variational integrators to solve the relativistic Kepler system. Finally, Section 6 concludes the paper.

2. Variational Principle in Lagrangian Formalism

We begin this section by introducing the inverse variational methods presented in [4,5,6]. Let H be a real Hilbert space with inner product · , · . Let N : H H be an operator. The operator N is called as symmetric if N = N * , where N * is the adjonit operator defined by N * u , v : = u , N v for u , v H . The Fréchet derivative of N at x H , denoted N x , is the linear operator satisfying
N x δ u = d d ε ε = 0 N ( x + ε δ u ) , x , δ u H .
According to the Vainberg’s Theorem in [4], we have
Theorem 1.
Let N be a operator defined on H . If the Fréchet derivative of N is symmetric, i.e. N x = N x * , then there exists a functional S on H , constructed as
S ( x ) = 0 1 x · N ( λ x ) d λ d t ,
such that N = δ S δ x , where the variational derivative δ S δ x is defined by d d ϵ ϵ = 0 S ( x + ϵ δ u ) = δ S δ x , δ u , δ u H .
In this paper, we mainly focus on the variational description for the system of second order differential equations. Consider the systems governed by
d d t M ( x , x ˙ ) x ˙ = f ( t , x , x ˙ ) , x R n
where M ( x , x ˙ ) is an n × n symmetric matrix.
Theorem 2.
System (2.1) admits a variational formulation if and only if
k = 1 n M i k x ˙ j x ˙ k = k = 1 n M j k x ˙ i x ˙ k ,
k = 1 n M i k x j + M j k x i x ˙ k = f i x ˙ j + f j x ˙ i ,
k = 1 n d d t M i k x j x ˙ k = f i x j f j x i + d d t f j x ˙ i
hold for all i , j = 1 , , n .
Proof. 
Define N ( x ) = d d t ( M x ˙ ) f . The variational calculus gives
N x δ u = d d t M δ u ˙ + k = 1 n M x ˙ k δ u ˙ k + M x k δ u k x ˙ f x δ u f x ˙ δ u ˙ .
The adjoint of N x is defined as
N x * δ u , δ v = δ u , N x δ v = d d t M δ v ˙ + k = 1 n M x ˙ k δ v ˙ k + M x k δ v k x ˙ f x δ v f x ˙ δ v ˙ , δ u .
From the integration by parts, we have
δ u , N x δ v = d d t x ˙ x ˙ M δ u ˙ x x ˙ M δ u ˙ f x δ u + d d t f x ˙ δ u , δ v .
Therefore,
N x * δ u = d d t x ˙ x ˙ M δ u ˙ x x ˙ M δ u ˙ f x δ u + d d t f x ˙ δ u .
According to Theorem 1, The system is variational if and only if (2.3) and (2.4) are identical. Comparing (2.3) and (2.4) leads to
M i j + k = 1 n M i k x ˙ j x ˙ k M j i k = 1 n M j k x ˙ i x ˙ k δ u ¨ j + d d t M i j + k = 1 n M i k x ˙ j x ˙ k M j i k = 1 n M j k x ˙ i x ˙ k + k = 1 n M i k x j + M j k x i x ˙ k f i x ˙ j f j x ˙ i δ u ˙ j + d d t k = 1 n M i k x j x ˙ k f i x j + f j x i d d t f j x ˙ i δ u j = 0 .
The above equality holds for arbitrary u H , thus the coefficients in terms δ u , δ u ˙ and δ u ¨ vanish. Since M is symmetric, this implies exactly that
k = 1 n M i k x ˙ j x ˙ k M j k x ˙ i x ˙ k = 0 , k = 1 n M i k x j + M j k x i x ˙ k f i x ˙ j f j x ˙ i = 0 , d d t k = 1 n M i k x j x ˙ k f i x j + f j x i d d t f j x ˙ i = 0 .
This completes the proof of the theorem.  □
Assuming M = M ( x ˙ ) and f is linear in x ˙ , we can rewrite the above theorem as follows.
Theorem 3.
For M = M ( x ˙ ) and f = A ( t , x ) x ˙ + φ ( t , x ) , system (2.1) is variational if and only if
k = 1 n M i k x ˙ j x ˙ k = k = 1 n M j k x ˙ i x ˙ k ,
A ( t , x ) = A ( t , x ) ,
A j k x i + A k i x j + A i j x k = 0 ,
φ i x j φ j x i = A i j t ,
where i , j , k = 1 , , n .
Proof. 
Since M depends only on x ˙ , (2.2b) simplifies to (2.5a). The condition (2.2c) reduces to
k = 1 n A j k x i + A k i x j + A i j x k x ˙ k = A j i t + φ i x j φ j x i .
In the above equality, the term on the right-hand side does not depend on x ˙ , so the coefficients of x ˙ vanish.  □
Remark 1.
Define a differential two-form by ω = 1 2 d x A d x . If (2.5a) and (2.5b) hold, then d ω = 0 . By Poincaré’s lemma, there exists a one-form β = g d x such that ω = d β . This implies A = x g x g . Condition (2.5c) means that φ can be generated from a potential ϕ by φ = x ϕ g t .
In more classical applications, M is typically a constant matrix. In this case, for the system to be variational, we only need the conditions for the vector field f.
Theorem 4.
For constant symmetric M, system (2.1) is variational iff
f i x ˙ j + f j x ˙ i = 0 ,
f i x j f j x i + d d t f i x ˙ j = 0
holds for i , j , k = 1 , , n .
Many important physical problem including some relativistic models can have the forms of Theorem 3. Consider the relativistic dynamics (such as a charged particle in a Coulomb potential)
d d t γ ( x ˙ ) x ˙ = ϕ ( x )
where γ ( x ˙ ) : = ( 1 | x ˙ | 2 / c 2 ) 1 / 2 is the Lorentz factor, c is the speed of light. In the non-relativistic limit ( | x ˙ | c ), this reduces to Newtonian mechanics x ¨ = ϕ ( x ) . It is evident that the velocity-dependent terms satisfy the symmetry conditions (2.2a) and (2.5c). This system admits the variational formulation with Lagrangian L ( x , x ˙ ) = c 2 γ 1 ( x ˙ ) + ϕ ( x ) .
It is well known that from Lagrangian framework it is more convenient to investigate the connections between conservation laws and symmetry properties of dynamical systems based on Noether theorem. The foundational framework requires introducing generalized vector fields and their action on variational principles [6].
A generalized vector field is given by
v = i = 1 n v i [ x ] x i
where v i [ x ] contain x and all the derivatives of x and v = ( v 1 , . . . , v n ) denote its characteristic. The infinite prolongation of v is defined as
pr v = v + i = 1 n j = 1 d j v i d t j x i ( j )
where x i ( j ) : = d j x i d j t denotes j-th order time derivatives.
Definition 1.
A generalized vector field v is called a variational symmetry for the functional S [ x ] = L [ x ] d t if there exists a function K [ x ] such that
pr v ( L ) = d d t K [ x ] .
Given a differential system N [ x ] = 0 , if there exists Q [ x ] satisfying
d P d t = N [ x ] · Q
then Q is called the characteristic of the nontrivial conservation law d P d t = 0 .
Theorem 5
(Noether’s theorem). A generalized vector field v is a variational symmetry if and only if its characteristic Q is also the characteristic of a conservation law d P d t = 0 along the solution of Euler–Lagrange equations.
When the system is perturbed, the following proposition holds.
Proposition 1.
Given a Lagrangian L, let v and P denote its variational symmetry and the corresponding conserved quantity, respectively. Under the perturbed Lagrangian L ˜ = L + ε L ¯ , P along solutions of EL ( L ˜ ) = 0 satisfies
d P d t = ε EL ( L ¯ ) · v
where EL = d d t x ˙ x is the the Euler operator.
Proof. 
By Theorem 5, it gives d P d t = EL ( L ) · v . For the solution of the perturbed system EL ( L ˜ ) = 0 , we have
EL ( L ) · v + ε EL ( L ¯ ) · v = 0 .
Substitution yields d P d t = ε EL ( L ¯ ) · v .  □

3. Discrete Lagrangian Mechanics

Variational integrators preserve geometric structures by discretizing Hamilton’s principle. For foundational theory, see [7]. Consider a uniform time grid t n = t 0 + n h with coordinates x n R N . The discrete Hamilton’s principle is to find the trajectories x n n = 0 N extremizing the discrete action functional
S x n n = 0 N = h n = 0 N 1 L x n , x n + 1 , h .
Here, L is the discretization of L, given by L ( x n , x n + 1 , h ) 1 h t n t n + 1 L ( x , x ˙ ) d t . Its adjoint, denoted by L * , is defined as L * ( x n , x n + 1 , h ) = L ( x n + 1 , x n , h ) . The discrete solution x n satisfies the discrete Euler—Lagrange equations
1 L ( x n , x n + 1 , h ) + 2 L ( x n 1 , x n , h ) = 0 .
Consider the system
x ¨ = ϕ ( x ) , x R N ,
with Lagrangian L ( x , x ˙ ) = 1 2 x ˙ 2 ϕ ( x ) . We discretize the Lagrangian to obtain the variational integrators. By splitting the potential ϕ ( x ) as ϕ ( x ) = i = 1 N ϕ [ i ] ( x ) , we present the following discrete Lagrangian. A first order variational integrator uses the discrete Lagrangian
L 1 st ( x n , x n + 1 , h ) = 1 2 | x n + 1 x n | 2 h 2 i = 1 N ϕ [ i ] ( x ^ n i )
where x ^ n i : = x n + j = 1 i ( x n + 1 j x n j ) e j , e j is the N-dimensional vector with the j-th element being 1.
Theorem 6.
The discrete Lagrangian is of order 1. Moreover, the discrete Euler–Lagrange equations for (3.3) generate
x n + 1 i 2 x n i + x n 1 i h 2 = x i j = 1 i 1 ϕ [ j ] ( x ^ n j ) + j = i N ϕ [ j ] ( x ^ n 1 j ) , i = 1 , , N .
It coincides with the composition method
Φ h = Φ H N h Φ H 1 h ,
where H i = 1 2 p i 2 + ϕ [ i ] ( x ) represents the subsystem, and Φ H i h is the corresponding numerical discretization, given by
x n + 1 = x n + h H [ i ] p ( x n + 1 , p n ) , p n + 1 = p n h H [ i ] x ( x n + 1 , p n ) .
Proof. 
Using the Taylor expansion at an arbitrary t [ t n , t n + 1 ] , we have
x ( t n + 1 ) x ( t n ) h = x ˙ ( t ) + O ( h ) , ϕ [ i ] ( x ^ i ( t n ) ) = ϕ [ i ] ( x ( t ) ) + O ( h ) .
Substituting these into (3.3), it is easy to known that the discrete Lagrangian has first order accuracy.
Introduce the discrete Legendre transformation
p n = h L 1 st ( x n , x n + 1 ) x n = x n + 1 x n h + h i = 2 N x i j = 1 i 1 ϕ [ j ] ( x ^ n j ) e i ,
the discrete Euler–Lagrange equation gives
p n + 1 = h L 1 st ( x n , x n + 1 ) x n + 1 = x n + 1 x n h + h i = 1 N x i j = i N ϕ [ j ] ( x ^ n j ) e i .
From (3.4) and (3.5), we can derive
x n + 1 = x n + h p n h 2 i = 2 N x i j = 1 i 1 ϕ [ j ] ( x ^ n j ) e i ,
p n + 1 = p n h i = 1 N ϕ [ i ] ( x ^ n i ) .
This is exactly the composition method Φ h .  □
The discrete Lagrangian of higher order variational integrators can be constructed by combining L and its adjoint L *
L 2 nd ( x n , x n + 1 , h ) = 1 2 L 1 st ( x n , x n + 1 / 2 , h / 2 ) + 1 2 L * ( x n + 1 / 2 , x n + 1 , h / 2 ) ,
L 2 nd ( x n , x n + 1 , h ) = 1 2 L * ( x n , x n + 1 / 2 , h / 2 ) + 1 2 L 1 st ( x n + 1 / 2 , x n + 1 , h / 2 ) .
By the discrete Euler–Lagrange equation, these provide the higher order variational integrators.
Theorem 7.
The variational integrators from (3.7) and (3.8) are equivalent to Φ h 2 nd = Φ h / 2 * Φ h / 2 and Φ h 2 nd = Φ h / 2 Φ h / 2 * , respectively.
Proof. 
The corresponding discrete Euler–Lagrange equation for (3.7) gives
L 1 st ( x n , x n + 1 / 2 , h / 2 ) x n + L * ( x n 1 / 2 , x n , h / 2 ) x n = 0 ,
L 1 st ( x n , x n + 1 / 2 , h / 2 ) x n + 1 / 2 + L * ( x n + 1 / 2 , x n + 1 , h / 2 ) x n + 1 / 2 = 0 .
Introduce the discrete Legendre transformation,
p n = h 2 L 1 st ( x n , x n + 1 / 2 , h / 2 ) x n ,
p n + 1 / 2 = h 2 L 1 st ( x n , x n + 1 / 2 , h / 2 ) x n + 1 / 2 ,
p n + 1 = h 2 L * ( x n + 1 / 2 , x n + 1 , h / 2 ) x n + 1 .
From (3.9b), we know
p n + 1 / 2 = h 2 L 1 st ( x n , x n + 1 / 2 , h / 2 ) x n + 1 / 2 = h 2 L * ( x n + 1 / 2 , x n + 1 , h / 2 ) x n + 1 / 2 .
Combine (3.10) and (3.11), we can prove that Φ h 2 nd = Φ h / 2 * Φ h / 2 .  □
As follows, we take the Kepler problem as example to illustrate the new derived variational methods of first and second order.
Kepler problem. The Kepler problem describes the motion of two bodies attracting each other. We focus on the 2-dimensional Kepler problem in the following text. If one body is placed at the origin, and x represents the position of the other body, their dynamics are governed by the following system
x ¨ = ϕ ( x ) , x R 2 ,
where ϕ ( x ) = 1 | x | . It is obvious that the Kepler problem (3.12) satisfies Theorem 4, and its Lagrangian is given by
L ( x , x ˙ ) = 1 2 | x ˙ | 2 + 1 | x | .
The Kepler problem (3.12) has three conserved quantities: energy, angular momentum, and the Laplace–Runge–Lenz (LRL) vector. When the initial energy H 0 < 0 , the solution orbit of the Kepler problem is elliptic, such as the motion of one astronomical body moving around another. In this case, the LRL vector determines the orientation and shape of the elliptical orbit. The magnitude | A | = A 1 2 + A 2 2 equals the orbital eccentricity e, and the vector A points along the major axis of the orbit.
Proposition 2.
For the 2D Kepler system (3.12), the following quantities are conserved
  • Energy  H ( x , x ˙ ) = 1 2 | x ˙ | 2 1 | x | ,
  • Angular Momentum  m ( x , x ˙ ) = x 1 x ˙ 2 x 2 x ˙ 1 ,
  • LRL Vector  A ( x , x ˙ ) = ( A 1 , A 2 ) = x 1 | x ˙ | 2 x ˙ 1 x , x ˙ x 1 | x | , x 2 | x ˙ | 2 x ˙ 2 x , x ˙ x 2 | x | .
Introducing the polar coordinates ( x 1 , x 2 ) = ( r sin θ , r cos θ ) , the Kepler’s Three Laws [28] are exhibited.
Proposition 3
(Kepler’s Three Laws). For bound orbits (negative energy) in the 2D Kepler problem, we have
  • The inverse of the radial distance is given by 1 r = 1 + e cos θ a b 2 ;
  • The period of the orbit is T = 2 π a 3 / 2 ;
  • The areal velocity r 2 d θ d t is conserved, i.e., r 2 d θ d t = 2 π a b T .
where a and b represent the semi-major and semi-minor axes of the orbit, e = 1 b 2 / a 2 is the eccentricity.
Based on Noether’s theorem, for the two-dimensional Kepler problem (3.12), we derive the variational symmetries corresponding to the three conservative quantities expressed in Proposition 2.
Proposition 4.
The variational symmetries associated with the energy, angular momentum, and the LRL vector are as follows:
  • v H = x ˙ 1 x 1 + x ˙ 2 x 2 ,
  • v m = x 2 x 1 + x 1 x 2 ,
  • v A 1 = x 2 x ˙ 2 x 1 + 2 x 1 x ˙ 2 x ˙ 1 x 2 x 2 , v A 2 = 2 x 2 x ˙ 1 x 1 x ˙ 2 x 1 x 1 x ˙ 1 x 2 .
Proof. 
Taking N [ x ] = x ¨ 1 + x 1 | x | 3 , x ¨ 2 + x 2 | x | 3 gives the following equality for energy conservation
d H d t = x ˙ · ( x ¨ + x / | x | 3 ) = x ˙ · N [ x ] .
Suppose the generalized vector field v H = ( x ˙ 1 , x ˙ 2 ) . By Theorem 5, v H is exactly the variational symmetry of the energy. The other variational symmetries follow analogously from their conservation laws.  □
Splitting ϕ as ϕ = ϕ [ 1 ] + ϕ [ 2 ] , we construct the first order and second order discrete Lagrangians. The first order Lagrangian (3.3) yields the variational integrator through the discrete Euler–Lagrange equations
x n + 1 2 x n + x n 1 h 2 = x 1 ϕ [ 1 ] ( x n 1 , x n 1 2 ) + ϕ [ 2 ] ( x n 1 , x n 2 ) x 2 ϕ [ 1 ] ( x n + 1 1 , x n 2 ) + ϕ [ 2 ] ( x n 1 , x n 2 ) .
The second order Lagrangians (3.8) generates the numerical methods
x n + 1 / 2 2 x n + x n 1 / 2 ( h / 2 ) 2 = x 1 ϕ [ 1 ] ( x n 1 , x n 1 / 2 2 ) + 2 ϕ [ 2 ] ( x n 1 , x n 2 ) + ϕ [ 1 ] ( x n 1 , x n + 1 / 2 2 ) x 2 2 ϕ [ 2 ] ( x n 1 , x n 2 ) , x n + 1 2 x n + 1 / 2 + x n ( h / 2 ) 2 = 0 x 2 ϕ [ 1 ] ( x n 1 , x n + 1 / 2 2 ) + ϕ [ 1 ] ( x n + 1 1 , x n + 1 / 2 2 ) .
Relativistic Kepler Problems. Considering the relativistic Kepler systems in (2.7) with the potential ϕ ( x ) = 1 | x | . By the proper time τ and relativistic momentum u : = γ ( x ˙ ) x ˙ , we reformulate system (2.7) as
d d τ t x = γ u , d d τ γ u = 0 ϕ / c 2 ϕ 0 γ u ,
where γ ( u ) = 1 + | u / c | 2 . Let x = ( t , x ) and x ˙ = ( γ , u ) , where ’·’ denotes differentiation with respect to τ . By Theorem 4, we learn that the system (3.16) admits a variational formulation with Lagrangian
L ( x , x ˙ ) = 1 2 x ˙ M x ˙ + A ( x ) · x ˙ ,
where M = c 2 0 0 I N and A ( x ) = ( ϕ ( x ) , 0 1 × N ) . The system (3.16) has two Hamiltonian formulations. Defining p = L x ˙ = M x ˙ + A ( x ) , the system (3.16) admits the standard Hamiltonian form
y ˙ = J 1 H ( y ) , y = ( x , p ) ,
where J = 0 I N + 1 I N + 1 0 and the Hamiltonian H ( x , p ) = 1 2 ( p A ( x ) ) M 1 ( p A ( x ) ) is non-separable. Introducing v = M x ˙ = ( c 2 γ , u ) transforms the system into a K-symplectic [1,3] formulation:
z ˙ = K 1 ( z ) H ( z ) , z = ( x , v ) ,
where K ( z ) = F ( x ) I N + 1 I N + 1 0 with F ( x ) = 0 ϕ ( x ) ϕ ( x ) 0 . In the formulation (3.18), the Hamiltonian becomes separable
H ( x , v ) = c 2 2 γ 2 + 1 2 i = 1 N u i 2 .
By decomposing this Hamiltonian into N + 1 parts, we derive the N + 1 K-symplectic subsystems.
The subsystem H t = c 2 2 γ 2 has the exact solution, which is
t ( τ + h ) = t + h γ , x ( τ + h ) = x , γ ( τ + h ) = γ , u ( τ + h ) = u h γ ϕ ( x ) .
For H i = 1 2 u i 2 , i = 1 , . . . , N , the solution of i-th subsystem is
t ( τ + h ) = t , x ( τ + h ) = x + h u e i , γ ( τ + h ) = γ ϕ ( x + h u e i ) ϕ ( x ) c 2 , u ( τ + h ) = u .
We obtain the K-symplectic method by composing the exact solution of the subsystem.
Φ h = ϕ H N h ϕ H 1 h ϕ H t h .
Theorem 8.
The discrete Lagrangian for (3.16)
L 1 st ( x n , x n + 1 , h ) = 1 2 ( x n + 1 x n ) M ( x n + 1 x n ) h 2 + A ( x n ) · x n + 1 x n h
generates the variational integrator
t n + 1 2 t n + t n 1 h 2 = ϕ ( x n ) ϕ ( x n 1 ) h , x n + 1 2 x n + x n 1 h 2 = t n + 1 t n h ϕ ( x n ) .
This is equivalent to the K-symplectic method (3.19).
Proof. 
Introducing the following transformations
v n = h L 1 st x n , x n + 1 x n A ( x n ) , v n + 1 = h L 1 st x n , x n + 1 x n + 1 A ( x n + 1 ) ,
with v n = c 2 γ n , u n , yields
γ n = t n + 1 t n h , u n = x n + 1 x n h + t n + 1 t n ϕ ( x n ) , γ n + 1 = t n + 1 t n h ϕ ( x n + 1 ) ϕ ( x n ) c 2 , u n + 1 = x n + 1 x n h .
Reformulating (3.21) leads to
t n + 1 = t n + h γ n , x n + 1 = x n + h u n h t n + 1 t n ϕ ( x n ) , γ n + 1 = γ n ϕ ( x n + 1 ) ϕ ( x n ) c 2 , u n + 1 = u n t n + 1 t n ϕ ( x n ) ,
which are exactly the K-symplectic methods (3.19).  □

4. Modified Equations for Variational Integrator

We begin this section by introducing the concept of modified equations presented in [19] for second order systems
x ¨ = f ( x ) .
Definition 2.
For system (4.1), denote the method by x n + 1 = Ψ ( x n , x n 1 , h ) . Its modified equation is a formal second order differential equation
x ˜ ¨ = f ( x ˜ ) + k = 1 h k f [ k ] ( x ˜ , x ˜ ˙ )
satisfying x ˜ ( n h ) = x n for all n.
Expanding the difference equation x ( t + h ) = Ψ ( x ( t ) , x ( t h ) , h ) around x = x ( t ) gives
0 = x ( t + h ) Ψ ( x ( t ) , x ( t h ) , h ) h 2 = x ¨ f ( x ) + k = 1 h k g k [ x ] .
Introducing v = x ˙ , it follows from (4.2) that
x ¨ = f ˜ ( x , v , h ) = f ( x ) + h f [ 1 ] ( x , v ) + h 2 f [ 2 ] ( x , v ) + .
Taking the derivative of the above equality with respect to t gives
x ( 3 ) = f ˜ v x ˙ + f ˜ v f ˜ = f x ( x ) v + h f x [ 1 ] v + f v [ 1 ] f + h 2 f x [ 2 ] x ˙ + f v [ 1 ] f [ 1 ] +
x ( 4 ) = f ˜ x x x ˙ , x ˙ + 2 f ˜ x v f ˜ , x ˙ + f ˜ x f ˜ + f ˜ v v f ˜ , x ¨ + f ˜ v f ˜ x x ˙ + f ˜ v f ˜ v f ˜ = f x x x ˙ , x ˙ + f x f + h f x x [ 1 ] x ˙ , x ˙ + 2 f x v [ 1 ] f , x ˙ + f x [ 1 ] f + f x f [ 1 ] + f v v [ 1 ] f , f + f v [ 1 ] f x v +
Substituting the higher derivatives x ( k ) , k 2 into the terms g k [ x ] in (4.3), we obtain the following theorem by comparing the coefficients of h on both sides of (4.3).
Theorem 9.
The coefficients f [ k ] in the modified equations (4.2) are uniquely determined recursively by f, f [ 1 ] , …, f [ k 1 ] , g 1 , …, g k , and their derivatives.
Theorem 9 provides a recursive relation for calculating the coefficients of modified equations. We illustrate this by applying the Nyström methods [2] to (4.1), which results in
x n + 1 = x n + h v n + h 2 i = 1 s b ¯ i f ( x n i ) ,
v n + 1 = v n + h i = 1 s b ^ i f ( x n i ) ,
x n i = x n + c i h v n + h 2 j = 1 s a ¯ i j f ( x n j ) .
Theorem 10.
For the Nyström methods (4.5), the coefficients of modified equation can be achieved by
f [ 1 ] ( x , x ˙ ) = 1 + i = 1 s b ^ i c i + b ¯ i f x ˙ , f [ 2 ] ( x , x ˙ ) = 1 12 f x ˙ , x ˙ + f f + 1 2 f x ˙ , x ˙ + f f + i = 1 s b ^ i c i 2 + 2 ( b ¯ i b ^ i ) c i b ¯ i f x ˙ , x ˙ + 2 b ¯ i c i b ^ i c i b ¯ i f f + 2 j = 1 s ( a ¯ i j c i b ¯ j ) f f
where f x ˙ , x ˙ = j , k 2 f x j x k x ˙ j x ˙ k is an elementary differential, as described in [2].
Proof. 
Using (4.5a) and (4.5b) to eliminate the intermediate variable v yields the scheme
x ( t + h ) 2 x ( t ) + x ( t h ) h 2 = i = 1 s [ b ^ i f ( x i ( t h ) ) + ( b ¯ i b ^ i ) f ( x i ( t ) ) ] .
From (4.5a) and (4.5c), we derive
x i ( t ) = c i x ( t + h ) + ( 1 c i ) x ( t ) + h 2 j = 1 s ( a ¯ i j c i b ¯ j ) f ( x j ( t ) ) .
Expanding the left-hand side of (4.6) about x ( t ) gives
x ( t + h ) 2 x ( t ) + x ( t h ) h 2 = x ¨ + h 2 12 x ( 4 ) +
Similarly, f ( x i ( t ) ) and f ( x i ( t h ) ) on the right term can be expanded about x ( t ) = x up to O ( h 3 ) , as
f ( x i ( t ) ) = f + h c i f x ˙ + h 2 2 [ c i 2 f x x x ˙ , x ˙ + c i f x ¨ + 2 j ( a ¯ i j c i b ¯ j ) f f ] + ,
f ( x i ( t h ) ) = f + h ( c i 1 ) f x ˙ + h 2 2 [ ( c i 1 ) 2 f x x x ˙ , x ˙ + ( c i 1 ) f x ¨ + 2 j ( a ¯ i j c i b ¯ j ) f f ] + .
Substituting (4.8) and the higher derivatives (4.4) into the right-hand side of (4.6) and comparing the coefficients of the term h k yields recursive formulas.
f [ 1 ] = 1 + i = 1 s ( b ^ i c i + b ¯ i ) f x ˙ f [ 2 ] = 1 12 f x ˙ , x ˙ + f f + 1 2 f x ˙ , x ˙ + f f + i = 1 s b ^ i c i 2 + 2 ( b ¯ i b ^ i ) c i b ¯ i f x ˙ , x ˙ + 2 b ¯ i c i b ^ i c i b ¯ i f f + 2 j = 1 s ( a ¯ i j c i b ¯ j ) f f
thus completing the proof.  □
Remark 2.
Generally, the system of modified equations represents a formal divergent series. However, for linear second order systems, we are able to obtain a convergent modified series. Further details can be found in Appendix A.
It is well-known that the system (3.2) has a variational description. However, not all numerical discretizations of this system are variational. A method is variational if and only if its modified equation (4.2) maintains variational structure. By Theorem 4, this requires the coefficients f [ k ] , k = 1 , 2 , to satisfy
f i [ k ] x ˙ j + f j [ k ] x ˙ i = 0 , f i [ k ] x j f j [ k ] x i + d d t f i [ k ] x ˙ j = 0 .
This implies the existence of formal Lagrangian which is called as the modified Lagrangian denoted by L mod .
Definition 3.
The modified Lagrangian is a formal series
L mod ( x , x ˙ , h ) = k = 0 h k L [ k ] ( x , x ˙ )
whose Euler–Lagrange equations
d d t L mod x ˙ L mod x = 0
have the solution matching the variational integrator x ( n h ) = x n .
An alternative definition of modified Lagrangian can be found in [19], that is
t n t n + 1 L mod ( x ( t ) , x ˙ ( t ) , h ) d t = h L ( x n , x n + 1 , h ) t n t n + 1 L x ( t ) , x ˙ ( t ) d t ,
where t n = t 0 + n h . Differentiating (4.10) w.r.t to x n yields
1 L ( x n , x n + 1 , h ) + 2 L ( x n 1 , x n , h ) = t n 1 t n + 1 L mod x · x ( t ) x n + L mod x ˙ · x ˙ ( t ) x n d t = t n 1 t n + 1 L mod x d d t L mod x ˙ · x ( t ) x n d t + x ( t ) x n | t n 1 t n + 1
where boundary terms vanish.
Expand the discrete Lagrangian L ( x ( t ) , x ( t + h ) , h ) at x ( t + h 2 ) , it reads
L ( x ( t ) , x ( t + h ) , h ) = L [ x ( t + h 2 ) ] , h : = L ( x , x ˙ ) + k = 1 h k L k [ x ]
where x denote x t + h 2 , [ x ] contains x and its derivatives. By Lemma 1 in [19], the discrete action functional over the interval [ t 0 , t N ] can be expressed as
S ( x n n = 0 N ) = k = 0 N 1 h L ( x ( t 0 + k h ) , x ( t 0 + ( k + 1 ) h ) , h ) = t 0 t N k = 0 2 1 2 k 1 h 2 k B 2 k ( 2 k ) ! d 2 k d t 2 k L ( [ x ( t ) ] , h ) d t ,
where B k are Bernoulli numbers with B 0 = 1 , B 2 = 1 6 and B n = k = 1 n ( 1 ) k k ! k + 1 i = 0 k k i ( 1 ) i i n . From (4.10), it follows that
t 0 t N L mod ( x , x ˙ , h ) d t = t 0 t N d t L ( [ x ] , h ) h 2 24 d 2 d t 2 L ( [ x ] , h ) + 7 h 4 5760 d 4 d t 4 L ( [ x ] , h ) + .
Solving x ¨ = f ˜ ( x , x ˙ , h ) implicitly from the modified Euler–Lagrange equation (4.9) and substituting it into (4.12), we can eliminate x ¨ and its higher order derivatives in the right-hand side of (4.12). According to Proposition 6 in [19], the term L k only depends on x and its j order derivatives x ( j ) , j k + 1 . Comparing the coefficients of the term h k on both sides of (4.12), we obtain
h 1 : L [ 1 ] ( x , x ˙ ) = L 1 ( x , x ˙ ) , h 2 : L [ 2 ] ( x , x ˙ ) = L 2 ( x , x ˙ , f , f x x ˙ + f x ˙ f ) 1 24 L x x x ˙ , x ˙ + 2 L x x ˙ x ˙ , f + L x ˙ x ˙ f , f + L x f + L x ˙ f x x ˙ + f x ˙ f ,
Recursively, we can derive the modified Lagrangian as a formal series corresponding to the time step h.
For the system (3.2), the Störmer–Verlet method originates from the discrete Lagrangian
L SV ( x n , x n + 1 , h ) = 1 2 | x n + 1 x n | 2 h 2 1 2 ϕ ( x n ) + ϕ ( x n + 1 ) .
As presented in [19], its second order modified Lagrangian
L mod SV ( x , x ˙ , h ) = 1 2 | x ˙ | 2 ϕ ( x ) + h 2 24 ϕ 2 2 ϕ x x x ˙ , x ˙ + O ( h 4 )
yields the following modified Euler–Lagrange equation
x ¨ = ϕ + h 2 12 ϕ x x x x ˙ , x ˙ ϕ x x ϕ + O ( h 4 ) .
The symplectic Euler method corresponds to the first order discrete Lagrangian
L symE ( x n , x n + 1 , h ) = 1 2 | x n + 1 x n | 2 h 2 ϕ ( x n + 1 ) .
The discrete Lagrangians (4.13) and (4.16) are weak equivalence [7] as their corresponding variational integrators are the same as
x n + 1 2 x n + x n 1 h 2 = ϕ ( x n ) .
Theorem 11.
For the discrete Lagrangian (4.16), its third order modified Lagrangian is
L mod symE ( x , x ˙ , h ) = 1 2 | x ˙ | 2 ϕ h 2 ϕ · x ˙ + h 2 24 ϕ 2 2 ϕ x x x ˙ , x ˙ + O ( h 4 )
with corresponding Euler–Lagrange equation
x ¨ = ϕ + h 2 12 ϕ x x x x ˙ , x ˙ ϕ x x ϕ + O ( h 4 ) .
Proof. 
Expanding (4.16) around x ( t + h / 2 ) , we obtain
L symE [ x ] , h = 1 2 | x ( t + h ) x ( t ) | 2 h 2 ϕ ( x ( t + h ) ) ) = 1 2 | x ˙ | 2 ϕ ( x ) h 2 ϕ · x ˙ + h 2 24 x ˙ x ( 3 ) 3 ϕ x ¨ 3 ϕ x x x ˙ , x ˙ h 3 48 ϕ · x ( 3 ) + 3 ϕ x x x ˙ , x ¨ + ϕ x x x x ˙ , x ˙ , x ˙ + O ( h 4 ) .
Applying the modified Lagrangian construction (4.12)
L mod symE ( x , x ˙ , h ) = L symE ( [ x , h ] ) h 2 24 d 2 d t 2 L symE ( [ x ] , h ) + O ( h 4 ) = 1 2 | x ˙ | 2 ϕ h 2 ϕ · x ˙ + h 2 24 | x ¨ | 2 2 ϕ · x ¨ 2 ϕ x x x ˙ , x ˙ h 3 48 ϕ · x ( 3 ) + 3 ϕ x x x ˙ , x ¨ + ϕ x x x x ˙ , x ˙ , x ˙ d 2 d t 2 ϕ · x ˙ + O ( h 4 ) .
It is evident that
ϕ · x ˙ = d ϕ d t , ϕ · x ( 3 ) + 3 ϕ x x x ˙ , x ¨ + ϕ x x x x ˙ , x ˙ , x ˙ = d 3 ϕ d t 3 ,
which implies that the terms in h 3 vanish. Substituting x ¨ = ϕ + O ( h 2 ) into (4.18) yields (4.17). The Euler–Lagrange equation follows from
d d t L mod symE ( x , x ˙ , h ) x ˙ L mod symE ( x , x ˙ , h ) x = x ¨ + ϕ h 2 12 ϕ x x x x ˙ , x ˙ ϕ x x ϕ + O ( h 4 ) .
 □
We illustrate the solutions of truncated modified equations using the pendulum problem. For this, let ϕ ( x ) = cos x in (4.1). The modified Lagrangian gives the corresponding modified Hamiltonian via the Legendre transformation. Denote the k-th order truncated Lagrangian by L mod , k and the corresponding Hamiltonian by H mod , k . For k = 1 , the modified Hamiltonian corresponding to L mod , 1 symE ( x , x ˙ ) is given by
H mod , 1 ( x , p ) = 1 2 p + h 2 ϕ ( x ) 2 + ϕ ( x ) = H mod ( x , p ) + O ( h 2 ) ,
which matches the result in [2]. In Figure 1, we show the numerical solution using the symplectic Euler method from (4.16), along with the exact flow of the pendulum problem, represented by the contour plot of the Hamiltonian. The contour plot of (4.20) shows the exact flow of the modified pendulum problem at first order. The initial conditions are ( x 0 , v 0 , h ) = ( π 2 , 0.5 , 0.25 ) . In Figure 1, the solid line represents the exact solution of the pendulum, while the dotted lines correspond to the symplectic Euler method and the exact solution of the modified pendulum. The results show that the modified pendulum problem provides better agreement between the numerical solution and the exact solution. As we include more terms in the truncation, we expect further improvement. However, since the modified equations are not convergent, there is an optimal truncation level based on asymptotic expansion theory.
For the newly presented variational integrators from (3.3) and (3.8), the modified Lagrangians are established in the following theorem.
Theorem 12.
For the first order discrete Lagrangian (3.3), its modified Lagrangian truncated to order 2 can be formulated as
L mod 1 st ( x , x ˙ , h ) = 1 2 | x ˙ | 2 ϕ ( x ) h 2 ϕ · x ˙ 2 ϕ [ 1 ] x 2 x ˙ 2 + h 2 24 ϕ 2 2 ϕ x x x ˙ , x ˙ + 12 2 ϕ [ 1 ] x 1 x 2 x ˙ 1 x ˙ 2 + O ( h 3 ) .
The corresponding Euler–Lagrange equation takes the following form:
x ¨ = ϕ + h x ˙ 2 2 ϕ [ 1 ] x 1 x 2 , x ˙ 1 2 ϕ [ 1 ] x 1 x 2 + h 2 12 ϕ x x x x ˙ , x ˙ ϕ x x ϕ + h 2 2 3 ϕ [ 1 ] x 1 x 2 2 x ˙ 2 2 + 2 ϕ [ 1 ] x 1 x 2 ϕ x 2 , 3 ϕ [ 1 ] x 1 2 x 2 x ˙ 1 2 + 2 ϕ [ 1 ] x 1 x 2 ϕ x 1 + O ( h 3 ) .
For the second order discrete Lagrangian (3.8), the second truncation of the modified Lagrangian is given by
L mod 2 nd ( x , x ˙ , h ) = 1 2 | x ˙ | 2 ϕ ( x ) + h 2 96 7 ϕ 2 12 ϕ x 2 ϕ [ 1 ] x 2 8 ϕ x x x ˙ , x ˙ + 12 ϕ x x [ 1 ] x ˙ , x ˙ 12 2 ϕ [ 1 ] x 1 2 x ˙ 1 2 + O ( h 4 ) .
The corresponding Euler–Lagrange equation can be expressed as
x ¨ = ϕ + h 2 48 4 ϕ x x x x ˙ , x ˙ ϕ x x ϕ 6 ϕ x x x [ 1 ] x ˙ , x ˙ + 12 ϕ x x [ 1 ] ϕ + A 1 , A 2 + O ( h 4 ) ,
where
A 1 = 6 3 ϕ [ 1 ] x 1 3 x ˙ 1 2 + 12 3 ϕ [ 1 ] x 1 2 x 2 x ˙ 1 x ˙ 2 12 2 ϕ [ 1 ] x 1 2 ϕ x 1 6 2 ϕ [ 1 ] x 1 x 2 ϕ x 2 6 2 ϕ x 1 x 2 ϕ [ 1 ] x 2 , A 2 = 6 3 ϕ [ 1 ] x 1 2 x 2 x ˙ 1 2 6 2 ϕ [ 1 ] x 2 2 ϕ x 2 6 2 ϕ x 2 2 ϕ [ 1 ] x 2 .
Proof. 
Without loss of generality, we compute the modified Lagrangian of second truncation for the discrete Lagrangian (3.8). Expand (3.8) about x ( t + h / 2 ) , we derive
L 2 nd [ x ] , h = 1 4 | x ( t + h / 2 ) x ( t ) | 2 ( h / 2 ) 2 + | x ( t + h ) x ( t + h / 2 ) | 2 ( h / 2 ) 2 1 2 [ ϕ [ 1 ] x 1 t , x 2 t + h / 2 + ϕ [ 1 ] x 1 ( t + h ) , x 2 ( t + h / 2 ) + ϕ [ 2 ] x 1 ( t ) , x 2 ( t ) + ϕ [ 2 ] x 1 ( t + h ) , x 2 ( t + h ) ] = 1 2 | x ˙ | 2 ϕ ( x ) + h 2 96 3 | x ¨ | 2 + 4 x ˙ x ( 3 ) 12 ϕ [ 1 ] x 1 x ¨ 1 12 2 ϕ [ 1 ] x 1 2 x ˙ 1 2 12 ϕ [ 2 ] · x ¨ 12 ϕ x x [ 2 ] x ˙ , x ˙ + O ( h 4 ) .
Substitute L 2 nd [ x ] , h into (4.12), we obtain
L mod 2 nd ( x , x ˙ , h ) = L 2 nd ( [ x , h ] ) h 2 24 d 2 d t 2 L 2 nd ( [ x ] , h ) + O ( h 4 ) = 1 2 | x ˙ | 2 ϕ ( x ) + h 2 96 | x ¨ | 2 8 ϕ · x ¨ + 12 ϕ [ 1 ] x 2 x ¨ 2 8 ϕ x x x ˙ , x ˙ + 12 ϕ x x [ 1 ] x ˙ , x ˙ 12 2 ϕ [ 1 ] x 1 2 x ˙ 1 2 + O ( h 4 ) .
We apply x ¨ = ϕ ( x ) + O ( h 2 ) to eliminate term x ¨ in (4.25), this leads to (4.23). With the modified Lagrangian (4.23), the direct calculation provides the modified equation (4.24).  □
As discussed earlier, the variational integrator can be interpreted as the exact solution to the modified equations. Consequently, the conservative properties of numerical methods are linked to their modified Lagrangian. Through backward error analysis [2], it is expected that variational integrators can preserve energy and angular momentum over long-time integration. For the Kepler problem, known as super-integrable, we present the following theorem to characterize the preservation of the LRL vector.
Theorem 13.
For the perturbed Kepler problem, let its Lagrangian be L ˜ = L ( x , x ˙ ) + ε L ¯ ( x , x ˙ ) . Assume the initial orbits are aligned with the x 2 -axis to O ( ε ) , then the variation of the LRL vector over one period satisfies
Δ A = ε T EL ( L ¯ ) · v A 2 + O ( ε 2 ) ,
and the change in the angle ω relative to the x-axis is given by
Δ ω = ε T e EL ( L ¯ ) · v A 1 + O ( ε 2 ) .
Here, v A i are the LRL characteristics shown in Proposition 4, T is the orbital period, and [ · ] denotes the T-period average.
Proof. 
Under the assumption of the proposition, we have A 1 = O ( ε ) and A 2 e . According to Proposition 1, it follows that
d d t A i [ x ˜ ] = ε EL ( L ¯ [ x ˜ ] · v A i [ x ˜ ] = ε EL ( L ¯ [ x ] · v A i [ x ] + O ( ε 2 ) ,
where x ˜ and x are the solutions of the perturbed and unperturbed Euler—Lagrange systems, respectively. Differentiating | A | and ω = arctan ( A 2 / A 1 ) yields
d d t | A | = d d t A 1 2 + A 2 2 = 1 A 1 2 + A 2 2 A 1 d A 1 d t + A 2 d A 2 d t , ω ˙ = d d t arctan A 2 A 1 = 1 A 1 2 + A 2 2 A 1 d A 2 d t A 2 d A 1 d t .
Therefore, we obtain
d d t | A | = ε EL ( L ¯ ) · v A 2 + O ( ε 2 ) , ω ˙ = ε e EL ( L ¯ ) · v A 1 + O ( ε 2 ) .
Integrating both sides of the above equalities w.r.t t over one period proves the theorem.  □
By the theory of modified Lagrangian, the variational integrators yield the perturbed Lagrangian. In the following, we present the error estimates of the LRL vector for the Störmer–Verlet methods, the symplectic Euler methods, and the variational integrators in (3.14) and (3.15). Moreover, we prove that the eccentricity for the Störmer–Verlet method exhibits super-convergence, extending the precession analysis of angle from [30].
Theorem 14.
Under the condition of Theorem 13, for the Störmer-Verlet from (4.13), the eccentricity error satisfies
Δ | A | = O ( h 4 ) .
Proof. 
In Theorem 13, setting ε = h 2 24 and L ¯ ( x , x ˙ ) = 1 | x | 4 2 | x ˙ | 2 | x | 3 + 6 ( x x ˙ ) 2 | x | 5 + O ( ε 2 ) leads to
Δ A = ε T EL 1 | x | 4 2 | x ˙ | 2 | x | 3 + 6 ( x x ˙ ) 2 | x | 5 · v A 2 + O ( ε 2 ) .
As verified in [30], we know that
EL 1 | x | 4 2 | x ˙ | 2 | x | 3 + 6 ( x x ˙ ) 2 | x | 5 · v A 2 = 60 x 1 | x | 6 + 48 H x 1 | x | 5 30 m 2 x 1 | x | 7 + 8 d d t x ˙ 1 | x | 3 m .
Due to the periodicity of the Kepler solution, the term d d t x ˙ 1 | x | 3 vanishes. In polar coordinates, where x 1 = r sin ( θ ) and x 2 = r cos ( θ ) , we compute the time average of x 1 | x | k over one period, which vanish for k = 5 , 6 , 7 . Specifically,
x 1 | x | k = 1 T 0 T sin ( θ ) r k 1 d t = a k 4 2 π b 2 k 5 0 2 π ( 1 + e cos ( θ ) ) k 3 sin ( θ ) d θ = 0 , k = 5 , 6 , 7 .
Consequently, it follows from (4.29) that
Δ A = O ( h 4 ) ,
which completes the proof.  □
Theorem 15.
Under the condition of Theorem 13, for the symplectic Euler method from (4.16), the errors in eccentricity and the angle of the LRL vector over one period are of order 2.
Proof. 
For the discrete Lagrangian (4.16), its modified Lagrangian is given in Theorem 11. Setting ε = h 2 and L ¯ = ϕ ( x ) · x ˙ + O ( ε ) , the modified Lagrangian can be written as
L mod symE ( x , x ˙ , h ) = 1 2 x ˙ 2 ϕ ( x ) ε ( ϕ ( x ) · x ˙ + O ( ε ) ) = L ( x , x ˙ ) + ε L ¯ ( x , x ˙ ) .
From Theorem 13, we have
Δ A = ε T EL ( ϕ ( x ) · x ˙ ) · v A 2 + O ( ε 2 ) , Δ ω = ε T e EL ( ϕ ( x ) · x ˙ ) · v A 1 + O ( ε 2 ) .
Noting that EL ( ϕ ( x ) · x ˙ ) = 0 , it follows that
Δ A = O ( h 2 ) , Δ ω = O ( h 2 ) .
 □
For the newly constructed discrete Lagrangians (3.3), we set ϕ [ 1 ] = α ϕ and ϕ [ 2 ] = ( 1 α ) ϕ with α [ 0 , 1 ] . The following theorem establishes that the corresponding variational integrators (3.14) derived from (3.3) exhibit super-convergence both in preserving the eccentricity and the angle of the LRL vector.
Theorem 16.
Under the condition of Theorem 13, for the first order discrete Lagrangian (3.3) with ϕ [ 1 ] = α ϕ and ϕ [ 2 ] = ( 1 α ) ϕ , α [ 0 , 1 ] , the errors of the variational integrator (3.14) in eccentricity and the angle of the LRL vector are both of order 2.
Proof. 
For the discrete Lagrangian (3.3), the modified Lagrangian is given in Theorem 12 as
L mod 1 st ( x , x ˙ , h ) = 1 2 x ˙ 2 ϕ ( x ) h 2 ϕ · x ˙ 2 α ϕ x 2 x ˙ 2 + O ( h ) .
Define L ¯ = ϕ · x ˙ 2 α ϕ x 2 x ˙ 2 + O ( h ) . Since EL ( ϕ ( x ) · x ˙ ) = 0 , it follows that
EL ϕ · x ˙ + 2 α ϕ x 2 x ˙ 2 = EL 2 α ϕ x 2 x ˙ 2 = 6 α | x | 5 x 1 x 2 x ˙ 1 , x 1 x 2 x ˙ 2 .
By Theorem 13, the error in eccentricity is given by
Δ A = h T 2 EL 2 α ϕ x 2 x ˙ 2 · v A 1 = h T 2 12 α H x 1 x 2 2 | x | 5 + 12 α A 2 x 1 x 2 | x | 5 .
Similarly, the error in the angle of the LRL vector is
Δ ω = h T 2 e EL 2 α ϕ x 2 x ˙ 2 · v A 2 = h T 2 e 12 α H x 1 2 x 2 | x | 5 12 α A 1 x 1 x 2 | x | 5 .
In polar coordinates, where x 1 = r sin ( θ ) and x 2 = r cos ( θ ) with θ = 0 corresponding to the positive x 2 axis, we apply Kepler’s laws. The integral average of x 1 x 2 / | x | 5 over one period is computed as
x 1 x 2 | x | 5 = 1 T 0 T cos ( θ ) sin ( θ ) r 3 d t = 1 2 π b 3 0 2 π ( 1 + e cos θ ) cos ( θ ) sin ( θ ) d θ = 0 .
Similarly, we find
x 1 2 x 2 | x | 5 = 1 2 π a b 0 2 π cos ( θ ) sin 2 ( θ ) d θ = 0 , x 1 x 2 2 | x | 5 = 1 2 π a b 0 2 π cos 2 ( θ ) sin ( θ ) d θ = 0 .
Combining the above results, we conclude
Δ A = O ( h 2 ) , Δ ω = O ( h 2 ) .
 □

5. Numerical Experiments

In this section, we present numerical experiments to evaluate the results obtained using the newly constructed variational integrators introduced in section 2. We compute the classical and relativistic Kepler systems.
Kepler problem is an important dynamical system that is super-integrable with three conserved quantities. As shown in section 2, the system is variational, and its variational integrators can be constructed by splitting the potential ϕ . In this section, we implement the first order variational integrator (3.14) (VI-1) and the second order variational integrator (3.15) (VI-2) by taking ϕ [ 1 ] = ϕ [ 2 ] .
Using the initial conditions ( x 0 , p 0 ) = ( 1 e , 0 , 0 , ( 1 + e ) / ( 1 e ) ) with e = 0.6 , and a time step of h = 0.05 , we perform numerical computations over t [ 0 , 200 ] . For comparison, we also show results from the symplectic Euler method and Störmer—Verlet method. The numerical orbits computed by the four variational integrators are shown in Figure 2. The orbit in the top-left corner is generated using the symplectic Euler method, while the top-right orbit is computed using the Störmer–Verlet method. The bottom-left and bottom-right orbits are simulated by the first and second order variational integrators (VI-1) and (VI-2), respectively. The background dotted line represents the exact orbit. It is clear that the numerical orbits on the top show a pronounced clockwise drift, while the two variational integrators provide better simulation results. Among the four methods, the orbit computed by the second order variational integrator (VI-2) exhibits the least numerical error.
We now show the preservation of conservative quantities by the variational integrators. The initial conditions are ( x 0 , p 0 ) = ( 3 , 0 , 0 , 0.45 ) , and the step size is h = 0.05 . From Figure 3, we observe that the numerical errors in energy can be bounded by all four variational integrators over the long term. For the Kepler system, the Laplace–Runge–Lenz (LRL) vector, which defines the orientation and shape of the orbit, is also a conserved quantity. We present the numerical results for both the norm of the vector (eccentricity) and the angle (which governs the orientation and shape of the elliptical orbit). As discussed in Section 4, the solution of the variational integrator corresponds to the exact solution of the modified second order differential equation. While the original Kepler system is super-integrable, the modified system is not. However, through backward error analysis [16,18], we show that the modified system remains integrable under symplectic methods. Thus, all four numerical methods bound the energy and momentum. The energy errors for the four variational integrators are plotted in Figure 3.
In Figure 4 and Figure 5, we compute the LRL vector using all four variational integrators. These figures show that the eccentricity error is bounded by all four methods, with the new variational integrators producing significantly smaller errors in both eccentricity and rotation angle.
We also present the convergence rates for the eccentricity and angle of the LRL vector, illustrated in Figure 6. To estimate the convergence order, we begin with h = 0.5 and compute results for time steps h i = 2 i , for i = 1 , , 6 . The results are shown in a log-log plot. For the eccentricity error in Figure 6(a), both the symplectic Euler method and the first order variational integrator exhibit second order convergence. Their error curves are nearly identical. The Störmer—Verlet method shows super-convergence of order 4, while the second order variational integrator also demonstrates super-convergence and produces smaller errors compared to the Störmer—Verlet method. In Figure 6(b), we show the convergence rate for the angle error. All four methods exhibit a second order convergence rate, consistent with the theoretical estimates in Section 4. The error curves for the symplectic Euler and Störmer—Verlet methods are nearly identical, but both the first and second order variational integrators show smaller errors in preserving the angle of the LRL vector. Among all four methods, the second order variational integrator achieves the smallest errors, demonstrating superior performance.
Relativistic Kepler System describes the motion of particles or bodies whose velocities are close to the speed of light. This system can be formulated by introducing proper time, with the Lagrangian given by L ( t , x ; γ , u ) = 1 2 c 2 γ 2 + 1 2 u 2 + γ | x | . The initial conditions are ( x 0 , p 0 ) = ( 0.4 , 0 , 0 , 2 ) , with a time step of h = 0.05 , and the computation spans t [ 0 , 40 ] . In Figure 7, we show the numerical orbits computed by the variational integrators (3.20) and (3.8). The numerical orbits computed by the two variational integrators show better performance qualitatively, confirming the structure-preserving nature of the newly proposed methods in relativistic spacetime.

6. Concluding Remarks

In this paper, we consider a class of second order systems in the form of (2.1), which can describe many important physical problems, including classical mechanics and relativistic plasma dynamics. For this class of systems, we derived the necessary and sufficient conditions for their variational formulation using the basic theory of inverse variational problems. We introduced a class of variational integrators by splitting the Lagrangian and proved that these numerical methods are equivalent to explicit symplectic compositions, ensuring efficient numerical computation. Remarkably, when the newly derived variational integrators are applied to the Kepler problem, we demonstrate better performance compared to the symplectic Euler and Störmer–Verlet methods. To analyze the numerical errors of the variational integrators in preserving conservative quantities, we developed the theory of modified Lagrangians and modified equations. The error estimates in preserving the LRL vector for the Kepler problem verify the numerical behavior. We also simulated the relativistic Kepler problem.
This framework can be extended to PDEs. Consider a nonlinear wave equation with rotational symmetry, assuming the equation has traveling wave solutions of the form u ( t , x ) = R ( t ) q ( x c t ) , where R ( t ) = e a t J 1 and J = 0 1 1 0 . This reduces the wave equation to the following system of second order ODEs:
( c 2 1 ) q ¨ = 2 c a J 1 q ˙ + a 2 + V ( | q | 2 ) q .
It can be easily verified that this system satisfies conditions (2.6a)-(2.6b). According to the theorem presented in this paper, this system admits a variational formulation when c 1 . This extends the applicability of our approach to various mechanical and continuum problems and opens the door to developing the theory of modified equations for PDEs.

Author Contributions

Conceptualization, Y. Shen and Y. Sun; methodology, Y. Shen and Y. Sun; formal analysis, Y. Shen and Y. Sun; writing—original draft preparation, Y. Shen and Y. Sun; writing—review and editing, Y. Shen and Y. Sun; visualization, Y. Shen; funding acquisition, Y. Sun. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the National Natural Science Foundation of China No. 12271513.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
PDEs partial differential equations
LRL Laplace–Runge–Lenz vector
Sym-Euler Symplectic Euler method
SV Störmer–Verlet method
VI Variational integrator

Appendix A. Modified Equations of Linear Second Order Systems

First, we introduce the basic theory of power series expansion.
Lemma A1.
For | x | 1 , the function arcsin 2 ( x ) has the convergent series expansion
arcsin 2 ( x ) = k = 1 2 2 k ( k ! ) 2 2 k 2 ( 2 k ) ! x 2 k .
Proof. 
Consider the differential equation
1 x 2 d 2 y d x 2 x d y d x 2 = 0 , | x | 1 .
By using the polar coordinate transformation x = sin θ with θ ( π / 2 , π / 2 ] , we have d y d x = d y d θ / cos ( θ ) and d 2 y d x 2 = d 2 y d θ 2 / cos 2 ( θ ) + d y d θ sin ( θ ) / cos 3 ( θ ) . Substituting this into (A1) reaches d 2 y d θ 2 = 2 . Thus, with initial conditions y ( 0 ) = 0 and y ( 0 ) = 0 , the solution of (A1) is
y ( x ) = arcsin 2 ( x ) .
Alternatively, we assume y ( x ) can be expressed in a series as
y ( x ) = k = 1 a k x k .
From (A1), the recurrence relation of coefficients follows that a k + 2 = k 2 a k ( k + 2 ) ( k + 1 ) , a 1 = 0 , a 2 = 1 . Solving this gives
a 2 k = 2 2 k ( k ! ) 2 2 k 2 ( 2 k ) ! , a 2 k 1 = 0 , k = 1 , 2 , .
The conclusion of this lemma follows by comparing (A2) and (A3).  □
Consider the harmonic oscillator
x ¨ = λ x , λ > 0 .
We discretize it by the central difference scheme
x n + 1 2 x n + x n 1 h 2 = λ x n .
The solution { x n } of the difference equation (A5) can be expressed as
x n = a e 2 i n θ + b e 2 i n θ , θ = arcsin λ h 2 ,
where a and b are constants determined by the initial conditions. Define x ( t ) = a e 2 i t θ / h + b e 2 i t θ / h , and its second derivative with respect to t is
x ¨ = 4 h 2 arcsin 2 λ h 2 x = k = 1 2 ( k 1 ) ! 2 ( 2 k ) ! h 2 k 2 λ k x = λ x 1 12 h 2 λ 2 x 1 90 h 4 λ 3 x +
It is clear that the series on the right-hand side of the above equation converges for h 2 h λ .

References

  1. Feng, K. Collected Works II; National Defense Industry Press: Beijing, 1995. [Google Scholar]
  2. Hairer, E.; Lubich, C.; Wanner, G. Geometric Numerical Integration, 2nd ed.; Springer-Verlag: Berlin, 2006. [Google Scholar]
  3. Feng, K.; Qin, M. Symplectic Geometric Algorithms for Hamiltonian Systems; Springer: Heidelberg, 2010. [Google Scholar]
  4. Vainberg, M.M. Variational Methods for the Study of Nonlinear Operators; Holden-Day: San Francisco, 1964. [Google Scholar]
  5. Santilli, R.M. Foundations of Theoretical Mechanics I; Springer-Verlag: New York-Heidelberg, 1978. [Google Scholar]
  6. Olver, P.J. Applications of Lie Groups to Differential Equations, 2nd ed.; Springer-Verlag: New York, 1993. [Google Scholar]
  7. Marsden, J.E.; West, M. Discrete mechanics and variational integrators. Acta Numer. 2001, 10, 357–514. [Google Scholar] [CrossRef]
  8. Marsden, J.E.; Pareick, G.W.; Shkoller, S. Multisymplectic Geometry, Variational Integrators, and Nonlinear PDEs. Commun. Math. Phys. 1998, 199, 351–395. [Google Scholar] [CrossRef]
  9. Sun, Y.; Qin, M. Construction of multisymplectic schemes of any finite order for modified wave equations. J. Math. Phys. 2000, 41, 7854–7868. [Google Scholar] [CrossRef]
  10. Qin, H.; Guan, X. Variational symplectic integrator for long-time simulations of the guiding-center motion of charged particles in general magnetic fields. Phys. Rev. Lett. 2008, 100, 035006. [Google Scholar] [CrossRef] [PubMed]
  11. Xiao, J.; Qin, H. Explicit high-order gauge-independent symplectic algorithms for relativistic charged particle dynamics. Comput. Phys. Commun. 2019, 241, 19–27. [Google Scholar] [CrossRef]
  12. Hairer, E.; Lubich, C. Long-term analysis of a variational integrator for charged-particle dynamics in a strong magnetic field. Numer. Math. 2020, 144, 699–728. [Google Scholar] [CrossRef]
  13. Hairer, E.; Lubich, C.; Shi, Y. Leapfrog methods for relativistic charged-particle dynamics. SIAM J. Numer. Anal. 2023, 61, 2844–2858. [Google Scholar] [CrossRef]
  14. Kraus, M.; Maj, O. Variational integrators for nonvariational partial differential equations. Phys. D 2015, 310, 37–71. [Google Scholar] [CrossRef]
  15. Xiao, J.; Qin, H.; Liu, J. Structure-preserving geometric particle-in-cell methods for Vlasov–Maxwell systems. Plasma Sci. Technol. 2018, 20, 110501. [Google Scholar] [CrossRef]
  16. Sanz-Serna, J.M. Backward error analysis of symplectic integrators. Fields Inst. Commun. 1996, 10, 193–205. [Google Scholar]
  17. Hairer, E. Variable time step integration with symplectic methods. Appl. Numer. Math. 1997, 25, 219–227. [Google Scholar] [CrossRef]
  18. Reich, S. Backward error analysis for numerical integrators. SIAM J. Numer. Anal. 1999, 36, 1549–1570. [Google Scholar] [CrossRef]
  19. Vermeeren, M. Modified equations for variational integrators. Numer. Math. 2017, 137, 1001–1037. [Google Scholar] [CrossRef]
  20. Sharma, H.; Borggaard, J.; Patil, M.; Woolsey, C. Performance assessment of energy-preserving, adaptive time-step variational integrators. Commun. Nonlinear Sci. Numer. Simul. 2022, 114, 106646. [Google Scholar] [CrossRef]
  21. McLachlan, R.I.; Offen, C. Backward error analysis for variational discretisations of PDEs. J. Geom. Mech. 2022, 14, 447–471. [Google Scholar] [CrossRef]
  22. Oliver, M.; Vasylkevych, S. A new construction of modified equations for variational integrators. arXiv 2024, arXiv:2403.17585. [Google Scholar]
  23. Chin, S.A. Symplectic integrators from composite operator factorizations. Phys. Lett. A 1997, 226, 344–348. [Google Scholar] [CrossRef]
  24. Minesaki, Y.; Nakamura, Y. A new discretization of the Kepler motion which conserves the Runge-Lenz vector. Phys. Lett. A 2002, 306, 127–133. [Google Scholar] [CrossRef]
  25. Minesaki, Y.; Nakamura, Y. A new conservative numerical integration algorithm for the three-dimensional Kepler motion based on the Kustaanheimo-Stiefel regularization theory. Phys. Lett. A 2004, 324, 282–292. [Google Scholar] [CrossRef]
  26. Kozlov, R. Conservative discretizations of the Kepler motion. J. Phys. A 2007, 40, 4529–4539. [Google Scholar] [CrossRef]
  27. Arnold, V.I. Mathematical Methods of Classical Mechanics, 2nd ed.; Springer-Verlag: New York, 1989. [Google Scholar]
  28. Goldstein, H.; Poole, C.P.; Safko, J.L. Classical Mechanics; Pearson Education India, 2011. [Google Scholar]
  29. Noether, E. Invariante Variationsprobleme. Nachrichten von der Gesellschaft der Wissenschaften zu Göttingen, Mathematisch-Physikalische Klasse, 1918; 235–257. [Google Scholar]
  30. Vermeeren, M. Numerical precession in variational discretizations of the Kepler problem, Cham, 2018; Vol. 267, Springer Proc. Math. Stat., pp. 333–348.
Figure 1. Numerical methods and the solutions of truncated modified system
Figure 1. Numerical methods and the solutions of truncated modified system
Preprints 162932 g001
Figure 2. Keplerian orbits (blue curves) vs exact solutions (red dots) for the Kepler problem
Figure 2. Keplerian orbits (blue curves) vs exact solutions (red dots) for the Kepler problem
Preprints 162932 g002
Figure 3. Energy error. Red: the symplectic Euler and Störmer–Verlet methods; Blue: variational integrators
Figure 3. Energy error. Red: the symplectic Euler and Störmer–Verlet methods; Blue: variational integrators
Preprints 162932 g003
Figure 4. Eccentricity error. Red: the symplectic Euler and Störmer–Verlet methods; Blue: variational integrators
Figure 4. Eccentricity error. Red: the symplectic Euler and Störmer–Verlet methods; Blue: variational integrators
Preprints 162932 g004
Figure 5. Rotation angle error. Red: the symplectic Euler and Störmer–Verlet methods; Blue: variational integrators
Figure 5. Rotation angle error. Red: the symplectic Euler and Störmer–Verlet methods; Blue: variational integrators
Preprints 162932 g005
Figure 6. Convergence rates of the LRL vector over one period of motion. (a) Eccentricity error; (b) Angle error. Solid lines denote the reference convergence rates.
Figure 6. Convergence rates of the LRL vector over one period of motion. (a) Eccentricity error; (b) Angle error. Solid lines denote the reference convergence rates.
Preprints 162932 g006
Figure 7. Numerical solutions from two variational integrators for the relativistic Kepler problem are shown. The blue curves represent the numerical solutions, while the black dots indicate the exact orbits.
Figure 7. Numerical solutions from two variational integrators for the relativistic Kepler problem are shown. The blue curves represent the numerical solutions, while the black dots indicate the exact orbits.
Preprints 162932 g007
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2025 MDPI (Basel, Switzerland) unless otherwise stated