1 Introduction

Explicit analytical solutions of differential equations of dynamical systems are the exception rather than the rule. If there are no exact invariants in the systems, one looks for adiabatic ones, like in [1,2,3]. For a mechanical system, there exists an intimate relation between the integrability of the system and the variations of its symmetries [4,5,6,7]. The adiabatic invariants can be found by perturbation to symmetry, and the study of symmetrical perturbation and adiabatic invariants proposes an effective way to obtain analytical solutions of disturbed systems. In recent years, some progress has been made in the study of symmetrical perturbation, such as Noether symmetrical perturbation [8], Lie symmetrical perturbation [9, 10], and Mei symmetrical perturbation [11], and they all can lead to adiabatic invariants. Conformal invariance is a modern method for finding conserved quantities for dynamical systems; it is built on the scale invariance, the translation invariance, rotational invariance and a variety of interactions [12]. Considerable progress has been made on the application of conformal invariance to mechanical systems in decades [13,14,15]. Perturbation to conformal invariance can also propose an effective method to get adiabatic invariants of disturbed Lagrangian systems [16]. The theoretical and numerical results show that perturbation to conformal invariance is a feasible way to solve disturbed dynamical systems.

Variational discretization is a structure-preserving discretization method for discrete conversion of continuous dynamical systems [17, 18]. The corresponding variational integrators approach the numerical integration from a variational principle rather than a discretization of the corresponding ordinary differential equations. So the underlying geometric properties of motion are preserved based on variational discretization. This approach is effective to analyze the stability and the optimal control of engineering devices [19, 20], the stochastic systems [21, 23], the dynamic behaviors of flexible multibody systems [23, 24], and the systems with holonomic [25] or nonholonomic constraints [26, 27]. As a while, the variational discretization is the theoretically most appealing method and, in addition, is numerically competitive.

Integrability of the continuous Hamiltonian systems is often identified with complete integrability, that is, the existence of as many independent integrals of motion in involution as the dimension of the phase space. By discretizing Hamilton’s variational principle, symmetries of the discrete Hamiltonian systems [28] and the Hamiltonian systems with constraints [29, 30] have been studied. However, the literature that is specially related to the integrability of discrete disturbed Hamiltonian systems is very limited. In addition, the adiabatic invariants of disturbed Hamiltonian systems have not been simulated by variational algorithm. To address the lack of research on these aspects, this paper extends the perturbation of conformal invariance to discrete Hamiltonian systems and gets the numerical integration and analytical solutions under the action of small disturbance. After presenting the basic theory of undisturbed Hamiltonian systems, the variational discretization of disturbed systems is constructed in Sect. 2; the corresponding structure-preserving algorithm is also introduced in this Section. Section 3 derives the definitions of conformal invariance for undisturbed and disturbed systems, respectively. Section 4 obtains exact invariants directly from the conformal invariance of undisturbed Hamiltonian systems. For the disturbed ones, the adiabatic invariants are constructed based on symmetrical transformations of initial systems. Two numerical examples are presented to demonstrate the application of the proposed approach in Sect. 5.

2 Variational discretization of disturbed Hamiltonian systems

Historically Hamiltonian systems came from Lagrangian systems in classical mechanics. Consider a Lagrangian system whose configuration is determined by n generalized coordinates \(q_{i}\) (\(i=1, {\ldots }, n\)). Introducing the generalized momentum \(p_{i}\) (\(i=1, {\ldots }, n\)) and Hamiltonian function \(H=H\) (t , \({{\varvec{q}}}\), p), the continuous canonical Hamiltonian equations are

$$\begin{aligned}&\displaystyle {\dot{q}}_i =\frac{\partial H}{\partial p_i }, \end{aligned}$$
(1)
$$\begin{aligned}&\displaystyle {\dot{p}}_i =-\frac{\partial H}{\partial q_i }, \quad i=1,\ldots ,n. \end{aligned}$$
(2)

Consider the disturbed Hamiltonian difference equations at some lattice points (t, \({{\varvec{q}}}_{k}\), \({{\varvec{p}}}_{k}\)). Suppose an n-dimensional configuration manifold q = {\(q_{1}, {\ldots }, q_{n}\)}, p = {\(p_{1}, {\ldots }, p_{n}\)}. By an application of the discrete Legendre transform to the discrete Euler–Lagrangian equations, the discrete Hamiltonian equations can be obtained from a variational principle [28],

$$\begin{aligned}&\displaystyle \mathop {D}\limits _{+h} (q_{i,k} )=\frac{q_{i,k+1} -q_{i,k} }{h_{k+1} }=\frac{\partial H_{D,k} }{\partial p_{i,k+1} }, \end{aligned}$$
(3)
$$\begin{aligned}&\displaystyle \mathop {D}\limits _{+h} (p_{i,k} )=\frac{p_{i,k+1} -p_{i,k} }{h_{k+1} }=-\frac{\partial H_{D,k} }{\partial q_{i,k} }, \end{aligned}$$
(4)
$$\begin{aligned}&\displaystyle h_{k+1} \frac{\partial H_{D,k} }{\partial t_k }-H_{D,k} +h_{k-1} \frac{\partial H_{D,k-1} }{\partial t_{k-1} }-H_{D,k-1} =0, \end{aligned}$$
(5)

where \(h_{k+1}=t_{k+1}-t_{k}\) and \(h_{k-1 }=t_{k}-t_{k-1}\) are the time steps, and \(H_{D,k}=H\) (\(t_{k, }t_{k+1}\), \({{\varvec{q}}}_{k}\), \({{\varvec{p}}}_{k+1})\) and \(H_{D,k-1}=H\) (\(t_{k-1, } t_{k}\), \({{\varvec{q}}}_{k-1}\), \({{\varvec{p}}}_{k})\) are the discrete Hamiltonian functions, \(\mathop {D}\nolimits _{+h} \) represents the left discrete (finite-difference) differentiation operators. Equations (3)–(5) require the discrete equations of undisturbed Hamiltonian systems.

In the following, the discrete disturbed Hamiltonian equations will be obtained from the variational discretization. The discrete Hamiltonian framework \(H_{D, k}=H\) (\(t_{k, } t_{k+1}\), \({{\varvec{q}}}_{k}\), \({{\varvec{p}}}_{k+1})\) is transformed from the Lagrangian \(L_{D,k}=L\) (\(t_{k, } t_{k+1}\), \({{\varvec{q}}}_{k}\), \({{\varvec{p}}}_{k+1})\) based on discrete Legendre transformations. The discrete disturbed forces are \(\varepsilon W_{i,d}=\varepsilon W\) (\(t_{k}\), \(t_{k+1}\), \({{\varvec{q}}}_{k}\), \({{\varvec{p}}}_{k+1}\)), where \(\varepsilon \ll \) 1 is the perturbed parameter. The finite-difference functional is obtained on the n-dimensional mesh \(\omega \):

$$\begin{aligned} H_h =\sum _\Omega {\left( {p_{i,k+1} \left( {q_{i,k+1} -q_{i,k} } \right) -H_{D,k} h_{k+1} } \right) },\quad i=1,\ldots ,n \end{aligned}$$
(6)

where the sum is taken over a finite or infinite domain \(\Omega \subset \omega \). And the total variation of \(H_{h}\) is

$$\begin{aligned} \Delta H_h =-\sum _\Omega {\varepsilon W_{i,d} h_{k+1} \delta q_{i,k} } \end{aligned}$$
(7)

where \(\delta q_{i,k}\) is the discrete virtual placement satisfying

$$\begin{aligned} \delta q_{i,k} =\Delta q_{i,k} -\frac{q_{i,k+1} -q_{i,k} }{h_{k+1} }\Delta t. \end{aligned}$$
(8)

The total variation of the function \(H_{h}\) along a curve \(q_{i }= {\phi }_{i}\) (t), \(p_{i}=\psi _{\iota }(t)\) at some points (t, \({{\varvec{q}}}_{k}\), \({{\varvec{p}}}_{k})\) will affect only two terms of the sum (6),

$$\begin{aligned} H_h =\cdot \cdot \cdot +p_{i,k} \left( {q_{i,k} -q_{i,k-1} } \right) -H_{D,k-1} h_{k-1} +p_{i,k+1} \left( {q_{i,k+1} -q_{i,k} } \right) -H_{D,k} h_{k+1} +\cdot \cdot \cdot . \end{aligned}$$
(9)

So Eq. (7) can be rewritten as

$$\begin{aligned} \Delta H_h =\frac{\partial H_h }{\partial p_{i,k} }\Delta p_{i,k} +\frac{\partial H_h }{\partial q_{i,k} }\Delta q_{i,k} +\frac{\partial H_h }{\partial t_k }\Delta t_k =-\sum _\Omega {\varepsilon W_{i,d} h_{k+1} \delta q_{i,k} }. \end{aligned}$$
(10)

Substituting Eqs. (8) and (9) into (10) gives

$$\begin{aligned}&\left( {q_{i,k} -q_{i,k-1} -h_{k-1} \frac{\partial H_{D,k-1} }{\partial p_{i,k} }} \right) \Delta p_{i,k} -\left( {p_{i,k+1} -p_{i,k} +h_{k+1} \frac{\partial H_{D,k} }{\partial q_{i,k} }-\varepsilon W_{i,d} h_{k+1} } \right) \Delta q_{i,k} \nonumber \\&\quad -\left( {h_{k+1} \frac{\partial H_{D,k} }{\partial t_k }-H_{D,k} +h_{k-1} \frac{\partial H_{D,k-1} }{\partial t_k }+H_{D,k-1} \hbox {+}(q_{i,k+1} -q_{i,k} )\varepsilon W_{i,d} } \right) \Delta t=0. \end{aligned}$$
(11)

For the stationary value of the discrete Hamiltonian action, the systems of \(2n+1\) equations can be derived:

$$\begin{aligned}&\displaystyle \mathop {D}\limits _{+h} (q_{i,k} )=\frac{q_{i,k+1} -q_{i,k} }{h_{k+1} }=\frac{\partial H_{D,k} }{\partial p_{i,k+1} }, \end{aligned}$$
(12)
$$\begin{aligned}&\displaystyle \mathop {D}\limits _{+h} (p_{i,k} )=\frac{p_{i,k+1} -p_{i,k} }{h_{k+1} }=-\frac{\partial H_{D,k} }{\partial q_{i,k} }+\varepsilon W_{i,d} , \end{aligned}$$
(13)
$$\begin{aligned}&\displaystyle h_{k+1} \frac{\partial H_{D,k} }{\partial t_k }-H_{D,k} +h_{k-1} \frac{\partial H_{D,k-1} }{\partial t_{k-1} }-H_{D,k-1} +\mathop {D}\limits _{+h} (q_{i,k} )\varepsilon W_{i,d} h_{k+1} =0. \end{aligned}$$
(14)

Note that the first 2n Eqs. (12) and (13) are first-order difference equations, which correspond to the disturbed Hamiltonian equations in the continuous limit. Equation (14) is of the second order; it defines the lattice on which the disturbed Hamiltonian equations are discretized, which is the energy equation. In the continuous limit, the lattice equation itself disappears. Equations (12)–(14) require the discrete equations of disturbed Hamiltonian systems.

3 Conformal invariance of discrete Hamiltonian systems

3.1 The definition of conformal invariance of undisturbed systems

To consider the discrete Hamiltonian equations, we need three lattice points. The prolongation of the Lie group operator to the neighboring points (\(t_{k-1,}\)\({{\varvec{q}}}_{k-1}\), \({{\varvec{p}}}_{k-1})\) and (\(t_{k+1}\), \({{\varvec{q}}}_{k+1}\), \({{\varvec{p}}}_{k+1}\)) is as follows:

$$\begin{aligned} prX_0^\alpha= & {} \xi _{00,k}^\alpha \frac{\partial }{\partial t_k }+\xi _{i0,k}^\alpha \frac{\partial }{\partial q_{i,k}}+\eta _{i0,k}^\alpha \frac{\partial }{\partial p_{i,k}}+\xi _{00,k-1}^\alpha \frac{\partial }{\partial t_{k-1} }+\xi _{i0,k-1}^\alpha \frac{\partial }{\partial q_{i,k-1}}+\eta _{i0,k-1}^\alpha \frac{\partial }{\partial p_{i,k-1}}\nonumber \\&\xi _{00,k+1}^\alpha \frac{\partial }{\partial t_{k+1} }+\xi _{i0,k+1}^\alpha \frac{\partial }{\partial q_{i,k+1}}+\eta _{i0,k+1}^\alpha \frac{\partial }{\partial p_{i,k+1}} \end{aligned}$$
(15)

where \(\xi ^{\alpha }_{00,k-1}=\xi ^{\alpha }_{00,k-1} (t_{k-1}, {{\varvec{q}}}_{k-1}, {{\varvec{p}}}_{k-1})\), \(\xi ^{\alpha }_{i0,k-1}=\xi ^{\alpha }_{i0,k-1} (t_{k-1}, {{\varvec{q}}}_{k-1}, {{\varvec{p}}}_{k-1})\), \(\eta _{i0,k-1}^{\alpha }=\eta _{i0,k-1}^{\alpha } (t_{k-1}, {{\varvec{q}}}_{k-1}, {{\varvec{p}}}_{k-1})\), \(\xi ^{\alpha }_{00,k+1}=\xi ^{\alpha }_{00,k+1} (t_{k+1}, {{\varvec{q}}}_{k+1}, {{\varvec{p}}}_{k+1})\), \(\xi ^{\alpha }_{i0,k+1}=\xi ^{\alpha }_{i0,k+1} (t_{k+1}, {{\varvec{q}}}_{k+1}, {{\varvec{p}}}_{k+1})\) and \(\eta _{i0,k+1}^{\alpha }=\eta _{i0,k+1}^{\alpha } (t_{k+1}, {{\varvec{q}}}_{k+1}, {{\varvec{p}}}_{k+1})\) are discrete infinitesimal integrators. For the undisturbed Hamiltonian systems, Eqs. (3) and (4) can be expressed as follows:

$$\begin{aligned} \mathbf{F}_{i,d} \equiv \left[ {\begin{array}{l} F_{i,d}^q \\ F_{i,d}^p \\ \end{array}} \right] =\left[ {\begin{array}{l} \frac{q_{i,k+1} -q_{i,k} }{h_{k+1} }-\frac{\partial H_{D,k} }{\partial p_{i,k+1} } \\ \frac{p_{i,k+1} -p_k }{h_{k+1} }+\frac{\partial H_{D,k} }{\partial q_{i,k} } \\ \end{array}} \right] =0. \end{aligned}$$
(16)

Definition 1

If there is a nonsingular matrix \(\mathbf{H}^l_{i,d}\) satisfying the following condition:

$$\begin{aligned} prX_0^\alpha (\mathbf{F}_{i,d} )=\mathbf{H}_{i,d}^l \left( {\mathbf{F}_{l,d} } \right) , \end{aligned}$$
(17)

then this kind of invariance is called the conformal invariance of undisturbed Hamiltonian systems under single-parameter infinitesimal transformations (15). Equation (17) is the determining equation of conformal invariance of the undisturbed systems (3) and (4), where \(\mathbf{H}^l_{i,d}\) is called conformal factor.

3.2 The definition of conformal invariance of disturbed systems

When the system is subjected to small disturbance forces \(\varepsilon W_{i,d}\), where \(W_{i,d}= W_{i,d }(t_{k,}\)\({{\varvec{q}}}_{k}\), \({{\varvec{p}}}_{k})\) and \(\varepsilon \) is a small parameter, the original conformal invariance will change accordingly. Assume the variation is a perturbation based on symmetrical transformation of the initial system, then \(\xi _{0,k}^{\alpha }=\xi _{0,k}^{\alpha } (t_k, {{\varvec{q}}}_k,{{\varvec{p}}}_k)\), \(\xi _{i,k}^{\alpha }=\xi _{i,k}^{\alpha } (t_k, {{\varvec{q}}}_k,{{\varvec{p}}}_k)\), and \(\eta _{i,k}^{\alpha }=\eta _{i,k}^{\alpha } (t_k, {{\varvec{q}}}_k,{{\varvec{p}}}_k)\) denote the new generators after being perturbed and can be expressed as

$$\begin{aligned}&{\xi } _{{0,k}}^{{\alpha }} ={\xi } _{{00}}^{{\alpha }} +{\varepsilon } {\xi } _{{01}}^{{\alpha }} +{\varepsilon } ^{{2}}{\xi } _{{02}}^{{\alpha }} +{\cdots } , \end{aligned}$$
(18)
$$\begin{aligned}&\xi _{i,k}^\alpha =\xi _{i0}^\alpha +\varepsilon \xi _{i1}^\alpha +\varepsilon ^{2}\xi _{i2}^\alpha +\cdots , \end{aligned}$$
(19)
$$\begin{aligned}&\eta _{i,k}^\alpha =\eta _{i0}^\alpha +\varepsilon \eta _{i1}^\alpha +\varepsilon ^{2}\eta _{i2}^\alpha +\cdots . \end{aligned}$$
(20)

The prolongation of the Lie group operators for a discrete disturbed system can be written as

$$\begin{aligned} pr{\tilde{X}}^{\alpha }=\varepsilon ^{m}prX_m^\alpha , \end{aligned}$$
(21)

where

$$\begin{aligned} prX_m^\alpha= & {} \xi _{0m,k}^\alpha \frac{\partial }{\partial t}+\xi _{im,k}^\alpha \frac{\partial }{\partial q_{i,k} }+\eta _{im,k}^\alpha \frac{\partial }{\partial p_{i,k} }+\xi _{0m,k-1}^\alpha \frac{\partial }{\partial t_{k-1} }+\xi _{im,k-1}^\alpha \frac{\partial }{\partial q_{i,k-1}}+\eta _{im,k-1}^\alpha \frac{\partial }{\partial p_{i,k-1}}\nonumber \\&+\xi _{0m,k+1}^\alpha \frac{\partial }{\partial t_{k+1} }+\xi _{im,k+1}^\alpha \frac{\partial }{\partial q_{i,k+1}}+\eta _{im,k+1}^\alpha \frac{\partial }{\partial p_{i,k+1}}. \end{aligned}$$
(22)

Expressions (12) and (13) become

$$\begin{aligned} {\tilde{\mathbf{F}}}_{i,d} \equiv \left[ {\begin{array}{l} {\tilde{F}}_{i,d}^q \\ {\tilde{F}}_{i,d}^p \\ \end{array}} \right] =\left[ {\begin{array}{l} \frac{q_{i,k+1} -q_{i,k} }{h_{k+1} }-\frac{\partial H_{D,k} }{\partial p_{i,k+1} } \\ \frac{p_{i,k+1} -p_k }{h_{k+1} }+\frac{\partial H_{D,k} }{\partial q_{i,k} }-\varepsilon W_{i,d} \\ \end{array}} \right] =0. \end{aligned}$$
(23)

Definition 2

For the discrete disturbed Hamiltonian systems, if there exists a nonsingular matrix \({\tilde{\mathbf{H}}}_{i,d}^l \) satisfying

$$\begin{aligned} pr{\tilde{X}}^{\alpha }({\tilde{F}}_{i,d} )={\tilde{\mathbf{H}}}_{i,d}^l \left( {{\tilde{F}}_{l,d} } \right) , \end{aligned}$$
(24)

then the Hamiltonian systems maintain the perturbation to conformal invariance under the expressions (18)–(20). Equation (24) is called the determining equation of the perturbation to conformal invariance for disturbed systems, and \({\tilde{\mathbf{H}}}_{i,d}^l \) is called the conformal factor of discrete disturbed systems.

4 Adiabatic invariants of discrete disturbed Hamiltonian systems

4.1 Exact invariants led by conformal invariance of discrete Hamiltonian systems

Theorem 3

For the undisturbed Hamiltonian (3) and (4), if there is a gauge function \({ G}^{\alpha }_{{ i}0, { d}} ={ G}^{\alpha }_{{ i}0, d} (t_{k}\), \(t_{k+1}\), \({{\varvec{q}}}_{k}\), \({{\varvec{p}}}_{k+1})\) that makes the infinitesimal generators \(\xi ^{\alpha }_{00,k}\), \(\xi ^{\alpha }_{i0,k}\) and \(\eta ^{\alpha }_{i0,k}\)of conformal invariance of the systems satisfy the following structural equation:

$$\begin{aligned} \eta _{i0,k+1}^\alpha \mathop {D}\limits _{+h} \left( {q_{i,k} } \right) +p_{i,k+1} \mathop {D}\limits _{+h} \left( {\xi _{i0,k}^\alpha } \right) -prX^{\alpha }\left( {H_{D,k} } \right) -H_{D,k} \mathop {D}\limits _{+h} \left( {\xi _{00,k}^\alpha } \right) +\mathop {D}\limits _{+h} \left( {G_{i0,d}^\alpha } \right) =0, \end{aligned}$$
(25)

then the undisturbed Hamiltonian systems possess discrete exact invariants

$$\begin{aligned} I_0 =\eta _{i0,k}^\alpha p_{i,k} -\xi _{00,k}^\alpha \left( H_{D,k-1} +h_{k-1} \frac{\partial H_{D,k-1} }{\partial t_k }\right) +G_{i0,d}^\alpha =const. \end{aligned}$$
(26)

The proof is identical to that in [28] and we will not reproduce it here. Equation (25) is called the discrete version of generalized Noether-type identity for the systems. The discrete Eq. (26) is called the difference version of Noether conservation laws associated continuous Hamiltonian systems.

4.2 Adiabatic invariants led by the conformal invariance of discrete disturbed Hamiltonian systems

The change slowly in parameters is the same as the role of small perturbations. For the disturbed Hamiltonian systems, the following theorem gives the condition that the perturbation to conformal invariance under small disturbance can lead to Noether adiabatic invariants.

According to the definition of adiabatic invariants in [31], the definition of discrete adiabatic invariants is given as the following definition.

Definition 3

For the discrete Hamiltonian systems, if a physical quantity \({ I}^{\alpha }_{{ zd }}={ I}^{\alpha }_{{ zd}}\) (\(t_{k}\), \(t_{k+1}\), \({{\varvec{q}}}_{k}\), \({{\varvec{p}}}_{k+1}\), \(\varepsilon \)) satisfies

$$\begin{aligned} \mathop {D}\limits _{+h} \left( {I_{zd}^\alpha } \right) =O\left( {\varepsilon ^{z+1}} \right) , \end{aligned}$$
(27)

where \({ I}^{\alpha }_{{ zd}}= { I}^{\alpha }_{0d} + \varepsilon I ^{\alpha }_{1d} +{\cdots }+ \varepsilon ^{z}{ I}^{\alpha }_{zd}\), then \({ I}^{\alpha }_{{ zd}}\) is called a zth-order adiabatic invariant of the systems.

Based on Definition 3, the Noether theorem for discrete Hamiltonian systems subjected to perturbation quantities is obtained below.

Theorem 4

For the discrete disturbed Hamiltonian systems, if a discrete gauge function \({ G}^{\alpha }_{im,d} ={ G}^{\alpha }_{im,d}(t_{k}, t_{k+1}, {{\varvec{q}}}_{k}, {{\varvec{p}}}_{k+1})\) exists such that the infinitesimal transformation generators satisfy the discrete Noether identity

$$\begin{aligned}&\eta _{im,k+1}^\alpha \mathop {D}\limits _{+h} (q_{i,k} )+p_{i,k+1} \mathop {D}\limits _{+h} (\xi _{im,k}^\alpha )-prX_m^\alpha \left( {H_{D,k} } \right) -H_{D,k} \mathop {D}\limits _{+h} (\xi _{0m,k}^\alpha )\nonumber \\&\quad +\,W_{i,d} \left[ {\xi _{i(m-1),k}^\alpha -\mathop {D}\limits _{+h} (q_{i,k} )\xi _{0(m-1),k}^\alpha } \right] +\mathop {D}\limits _{+h} (G_{im,d}^\alpha )=0, \end{aligned}$$
(28)

then the following formula:

$$\begin{aligned} I_{zd}^\alpha =\sum _{m=0}^z {\varepsilon ^{m}\left( {\xi _{im,k}^\alpha p_i -\xi _{0m,k}^\alpha \left( H_{D,k-1} +h_{k-1} \frac{\partial H_{D,k-1} }{\partial t}\right) +G_{im,d}^\alpha } \right) } \end{aligned}$$
(29)

is the zth-order adiabatic invariant of Noether type of discrete disturbed Hamiltonian systems.

Proof

After being perturbed, the gauge function comes into

$$\begin{aligned} G_{i,d}^\alpha =G_{i0,d}^\alpha +\varepsilon G_{i1,d}^\alpha +\varepsilon ^{2}G_{i2,d}^\alpha +\cdots . \end{aligned}$$
(30)

Considering Eqs. (18)–(20) and (30), and computing the discrete derivative of \({ I}^{\alpha }_{{ zd}}\), one obtains

$$\begin{aligned}&\mathop {D}\limits _{+h} \left( {I_{zd}^\alpha } \right) =\mathop {D}\limits _{+h} \sum _{m=0}^z {\varepsilon ^{m}\left\{ {\xi _{im,k}^\alpha p_{i,k} -\xi _{0m,k}^\alpha \left( H_{D,k-1} +h_{k-1} \frac{\partial H_{D,k-1} }{\partial t_k }\right) +G_{im,d}^\alpha } \right\} } \\&\quad =\sum _{m=0}^z {\varepsilon ^{m}} \left\{ {\mathop {D}\limits _{+h} \left( {\xi _{im,k}^\alpha p_{i,k} -\xi _{0m,k}^\alpha \left( {H_{D,k-1} +h_{k-1} \frac{\partial H_{D,k-1} }{\partial t_k }} \right) } \right) } \right. -\eta _{im,k+1}^\alpha \mathop {D}\limits _{+h} (q_{i,k} )-p_{i,k+1} \mathop {D}\limits _{+h} (\xi _{im,k}^\alpha ) \\&\qquad \left. {+prX_m^\alpha \left( {H_{D,k} } \right) +H_{D,k} \mathop {D}\limits _{+h} (\xi _{0m,k}^\alpha )-W_{i,d} \left[ {\xi _{i(m-1),k}^\alpha -\mathop {D}\limits _{+h} (q_{i,k} )\xi _{0(m-1),k}^\alpha } \right] } \right\} \\&\quad =\sum _{m=0}^z {\varepsilon ^{m}\left\{ {\xi _{0m,k}^\alpha \left( {\mathop {D}\limits _{+h} (H_{D,k-1} )-\frac{\partial H_{D,k} }{\partial t_k }-\frac{h_{k-1} }{h_{k+1} }\frac{\partial H_{D,k-1} }{\partial t_k }-\varepsilon W_{i,d} \mathop {D}\limits _{+h} (q_{i,k} )} \right) } \right. } \\&\qquad -\xi _{im,k}^\alpha \left( {\mathop {D}\limits _{+h} (p_{i,k} )+\frac{\partial H_{D,k} }{\partial q_{i,k} }-\varepsilon W_{i,d} } \right) +\eta _{im,k+1}^\alpha \left( {\mathop {D}\limits _{+h} (q_{i,k} )-\frac{\partial H_{D,k} }{\partial p_{i,k\hbox {+}1}}} \right) \\&\qquad \left. {-W_{i,d} \left( {\xi _{i(m-1),k}^\alpha -\mathop {D}\limits _{+h} \left( {q_{i,k} } \right) \xi _{0(m-1),k}^\alpha } \right) } \right\} . \end{aligned}$$

Making use of (12)–(14), after deduction, we have

$$\begin{aligned} \mathop {D}\limits _{+h} \left( {I_{zd}^\alpha } \right)= & {} \sum _{m=0}^z {\varepsilon ^{m}\left\{ {\varepsilon W_{i,d} \left( {\xi _{im,k}^\alpha -\mathop {D}\limits _{+h} \left( {q_{i,k} } \right) \xi _{0m,k}^\alpha } \right) -W_{i,d} \left( {\xi _{i(m-1),k}^\alpha -\mathop {D}\limits _{+h} \left( {q_{i,k} } \right) \xi _{0(m-1),k}^\alpha } \right) } \right\} }\\= & {} \sum _{m=0}^z {\varepsilon ^{m+1}W_{i,d} \left( {\xi _{im,k}^\alpha -\mathop {D}\limits _{+h} \left( {q_{i,k} } \right) \xi _{0m,k}^\alpha } \right) } {}{}{}{}-\sum _{m=0}^z {\varepsilon ^{m}W_{i,d} \left( {\xi _{i(m-1),k}^\alpha -\mathop {D}\limits _{+h} \left( {q_{i,k} } \right) \xi _{0(m-1),k}^\alpha } \right) }\\= & {} \varepsilon ^{z+1}W_{i,d} \left( {\xi _{iz,k}^\alpha -\mathop {D}\limits _{+h} \left( {q_{i,k} } \right) \xi _{0z,k}^\alpha } \right) -\varepsilon ^{0}W_{i,d} \left( {\xi _{i(-1),k}^\alpha -\mathop {D}\limits _{+h} \left( {q_{i,k} } \right) \xi _{0(-1),k}^\alpha } \right) , \end{aligned}$$

the perturbations \(W_{i,d }= 0\) hold when \(z = 0\), so

$$\begin{aligned} \mathop {D}\limits _{+h} \left( {I_{zd}^\alpha } \right) =\varepsilon ^{z+1}W_{i,d} \left( {\xi _{iz,k}^\alpha -\mathop {D}\limits _{+h} \left( {q_{i,k} } \right) \xi _{0z,k}^\alpha } \right) . \end{aligned}$$
(31)

It shows that \({ I}^{\alpha }_{zd}\) is in direct proportion to z+1, so \({ I}^{\alpha }_{zd}\) is the discrete analogue of zth-order adiabatic invariants for discrete disturbed Hamiltonian systems. The theorem is proved. \(\square \)

5 Numerical examples

5.1 Simple harmonic oscillator

Consider the Lagrangian \(L=\left( {{\dot{q}}^2 -q^2 } \right) /2\) of a simple harmonic oscillator with an additional force \(F(q) = - \varepsilon { q}\). For \(\varepsilon \ll 1\), the system is amenable to solution using the methods from the previous Section. The discrete Hamiltonian based on the variational discretization is given by \(H_{D,k}=(p^2_{k+1}+q^2_k)/2\). Let the positive and constant h be the time step. The discrete undisturbed Hamiltonian Eq. (16) is computed to be

$$\begin{aligned} \mathbf{F}_{i,d} \equiv \left[ {\begin{array}{l} F_{i,d}^q \\ F_{i,d}^p \\ \end{array}} \right] =\left[ {\begin{array}{l} \frac{q_{k+1} -q_k }{h}-p_{k+1} \\ \frac{p_{k+1} -p_k }{h}+q_k \\ \end{array}} \right] =0. \end{aligned}$$
(32)

The Lie group operators for the discrete system (32) with regard to the conformal invariance of the undisturbed Hamiltonian equation are given by \(\xi _{00} =1\), \(\xi _{10}=q_{k}\) and \(\eta _{10}=p_{k}\). The Noether identities (25) read \(p_{k+1}^2 -q_k^2 +\mathop {D}\nolimits _{+h} \left( {G_{0,d} } \right) =0\). The exact invariant is \(I_{0d }= (p^2_{k}+q^2_{k-1})/2\) with the gauge function \(G_{0,d} =-p_k q_k \).

The energy error of the harmonic oscillator is shown in Figs. 1 and 2. Figure 1 demonstrates numerical energy conservation by the variational algorithm, and the energy error is to about \(10^{-8}\) after 10,000 iterations as well. Figure 2 demonstrates that the variational method is more precise than those from the standard RK4 under the initial conditions (\(q_{1}\), \(b_{1}) = (0.01, 0.01)\). It is obvious that the variational method has the advantage of energy conservation in the long-time simulation. The relative error is stable of the order \(10^{-8}\) for the variational algorithm. Compared with the time step \(h=10^{-1}\), \(10^{-8}\) accuracy is rather small. Therefore, the algorithm based on the variational discretization shows a huge advantage in the quantitative problems, especially in the long-term tracking numerical simulation.

Fig. 1
figure 1

Error in the energy for free harmonic oscillator for the variational method

Fig. 2
figure 2

Comparison about error in the energy between the variational method and the RK4

Suppose the systems are disturbed by the small perturbation \(\varepsilon W_{d}=\varepsilon q_{k}\), then the disturbed Hamiltonian Eq. (23) becomes

$$\begin{aligned} {\tilde{\mathbf{F}}}_{i,d} \equiv \left[ {\begin{array}{l} {\tilde{F}}_{i,d}^q \\ {\tilde{F}}_{i,d}^p \\ \end{array}} \right] =\left[ {\begin{array}{l} \frac{q_{k+1} -q_k }{h}-p_{k+1} \\ \frac{p_{k+1} -p_k }{h}+q_k +\varepsilon q_k \\ \end{array}} \right] =0. \end{aligned}$$

The prolongation of the Lie group operators for the discrete system is

$$\begin{aligned} pr{\tilde{X}}=\left( {q_k +\varepsilon q_k } \right) \frac{\partial }{\partial q_k }+\left( {q_{k-1} +\varepsilon q_{k-1} } \right) \frac{\partial }{\partial q_{k-1} }+\left( {q_{k+1} +\varepsilon q_{k+1} } \right) \frac{\partial }{\partial q_{k+1} }, \end{aligned}$$
(33)

and the conformal factor is \(\mathbf{H}_{i,d}^l =\left( {{\begin{array}{ll} 1&{}\quad 0 \\ 0&{}\quad 1 \\ \end{array} }} \right) \). From Theorem 4, the adiabatic invariant is

$$\begin{aligned} I_{1d} =\left( {1+\varepsilon } \right) \left( {p_k^2 +q_{k-1}^2 } \right) /2 \end{aligned}$$
(34)

with the gauge function \(G_{1,d} =-(1+\varepsilon )p_k q_k \).

Figure 3 displays the adiabatic invariant (34) with different coefficients of \(\varepsilon \) under the same initial conditions (\(q_{1}\), \(b_{1})\) = (0.01, 0.01). As we go forward in time, the perturbed parameter \(\varepsilon \) keeps on increasing leading to almost the same accuracy. It can be seen more obviously from Fig. 3 which shows the relative changes of the adiabatic invariant (34) for different \(\varepsilon \).

Fig. 3
figure 3

Error of adiabatic invariant (34) for the variational method

5.2 Kepler (two body) problem

The celestial mechanics often involves the Kepler problem, for example, satellites circle the earth, and the planets move around the sun or binary star systems. The discrete Lagrangian of the Kepler problem is

$$\begin{aligned} L_{D,k} =\frac{1}{2}\left( {\left( {\Delta q_{1,k} } \right) ^{2}+\left( {\Delta q_{2,k} } \right) ^{2}} \right) -K^{2}\left( {q_{1,k}^2 +q_{2,k}^2 } \right) ^{-1/2}. \end{aligned}$$
(35)

The discrete canonical conjugate momenta and the difference discrete Hamiltonian can be introduced by the discrete Legendre transformation

$$\begin{aligned} p_{i,k+1} =\frac{\partial L_{D,k} }{\partial \Delta q_{i,k} }, \quad H_{D,k} =p_{i,k +1} \Delta q_{i,k} -L_{D,k} , \quad \left( {i=1,2} \right) . \end{aligned}$$
(36)

So the discrete Hamiltonian of the Kepler problem yields

$$\begin{aligned} H_{D,k} =\frac{1}{2}\left( {p_{1,k+1}^2 +p_{2,k+1}^2 } \right) +K^{2}\left( {q_{1,k}^2 +q_{2,k}^2 } \right) ^{-1/2}. \end{aligned}$$
(37)

The discrete Hamiltonian equations on the uniform mesh read

$$\begin{aligned}&\frac{q_{i,k+1} -q_{i,k} }{h}=\frac{\partial H_{D,k} }{\partial p_{i,k+1} }, \end{aligned}$$
(38)
$$\begin{aligned}&\frac{p_{i,k+1} -p_{i,k} }{h}=-\frac{\partial H_{D,k} }{\partial q_{i,k} }. \end{aligned}$$
(39)

The conformal invariance of the undisturbed Hamiltonian Eq. (38) and (39) is

$$\begin{aligned}&\xi _{00,k}^1 =0,\xi _{10,k}^1 =-q_{2,k} ,\xi _{20,k}^1 =q_{1,k} ,\eta _{10,k}^1 =-p_{2,k} ,\eta _{20,k}^1 =p_{1,k} , \end{aligned}$$
(40)
$$\begin{aligned}&\xi _{00,k}^2 =1,\xi _{10,k}^2 =-q_{2,k} ,\xi _{20,k}^2 =q_{1,k} ,\eta _{10,k}^2 =-p_{2,k} ,\eta _{20,k}^2 =p_{1,k} . \end{aligned}$$
(41)

From Theorem 3 and solutions (40) and (41), the exact invariants are

$$\begin{aligned} I_0^1= & {} -q_{2,k} p_{1,k} +q_{1,k} p_{2,k} =const. \end{aligned}$$
(42)
$$\begin{aligned} I_0^2= & {} -q_{2,k} p_{1,k} +q_{1,k} p_{2,k} -H_{k-1} =const. \end{aligned}$$
(43)

with the same gauge function \(G_{0,d}=0\).

This Hamiltonian being autonomous, it is an invariant of the system. For simulations, we select the initial conditions to be \(h=0.1\), \(q_{1}(0) =0\), \(q_{2}(0) =1.2\), \(p_{1}(0) = -1\), and \(p_{2}(0) = -0.6\). The comparison of phase diagrams of undisturbed systems is demonstrated using the variational method and RK4 method in Fig. 4. It is clearly shown that the calculating phase diagrams of the variational methods are overlapped closed curves, and the numerical results are consistent with the known analytical results. The phase diagram of the RK4 method is a closed loop with a certain width, which indicates that an obvious artificial dissipation phenomenon has appeared during simulation and also reflects the disadvantages of non-variational algorithms.

Fig. 4
figure 4

Phase diagrams a RK4 method; b variational methods

Suppose the perturbed forces are \(\varepsilon W_{1,d} = -\varepsilon q_{1,k}\), and \(\varepsilon W_{2,d} = -\varepsilon q_{2,k}\). The discrete equations of the disturbed systems read

$$\begin{aligned}&\frac{q_{i,k+1} -q_{i,k} }{h}=\frac{\partial H_{D,k} }{\partial p_{i,k+1} }, \end{aligned}$$
(44)
$$\begin{aligned}&\frac{p_{i,k+1} -p_{i,k} }{h}=-\frac{\partial H_{D,k} }{\partial q_{i,k} }-\varepsilon W_{i,d} . \end{aligned}$$
(45)

One can readily verify the invariance of the Hamiltonian functions and the perturbed forces, that is

$$\begin{aligned}&pr{\tilde{X}}\left( {\begin{array}{l} F_1 \\ F_2 \\ F_3 \\ F_4 \\ \end{array}} \right) =pr{\tilde{X}}\left\{ {\begin{array}{l} \frac{q_{1,k+1} -q_{1,k} }{h}-p_{1,k+1} \\ \frac{q_{2,k+1} -q_{2,k} }{h}-p_{2,k+1} \\ \frac{p_{1,k+1} -p_{1,k} }{h}+q_{1,k} \left( {q_{1,k}^2 +q_{2,k}^2 } \right) ^{-\frac{3}{2}}-\varepsilon q_{1,k} \\ \frac{p_{2,k+1} -p_{2,k} }{h}+q_{2,k} \left( {q_{1,k}^2 +q_{2,k}^2 } \right) ^{-\frac{3}{2}}-\varepsilon q_{2k} \\ \end{array}} \right\} \\&\quad =\left\{ {\begin{array}{l} \frac{\xi _{1,k+1} -\xi _{1,k} }{h}-\eta _{1,k+1} \\ \frac{\xi _{2,k+1} -\xi _{2,k} }{h}-\eta _{2,k+1} \\ \frac{\eta _{1,k+1} -\eta _{1,k} }{h}+\xi _{1,k} \left[ {\left( {q_{1,k}^2 +q_{2,k}^2 } \right) ^{-\frac{3}{2}}-3q_{1,k}^2 \left( {q_{1,k}^2 +q_{2,k}^2 } \right) ^{-\frac{5}{2}}} \right] -3\xi _{2,k} q_{1,k} q_{2,k} \left( {q_{1,k}^2 +q_{2,k}^2 } \right) ^{-\frac{5}{2}}-\varepsilon \xi _{1,k} \\ \frac{\eta _{2,k+1} -\eta _{2,k} }{h}+\xi _{2,k} \left[ {\left( {q_{1,k}^2 +q_{2,k}^2 } \right) ^{-\frac{3}{2}}-3q_{2,k}^2 \left( {q_{1,k}^2 +q_{2,k}^2 } \right) ^{-\frac{5}{2}}} \right] -3\xi _{1,k} q_{1,k} q_{2,k} \left( {q_{1,k}^2 +q_{2,k}^2 } \right) ^{-\frac{5}{2}}-\varepsilon \xi _{2k} \\ \end{array}} \right\} , \end{aligned}$$

and we have

$$\begin{aligned} pr{\tilde{X}}\left( {\begin{array}{l} F_1 \\ F_2 \\ F_3 \\ F_4 \\ \end{array}} \right) =\left( {{\begin{array}{llll} 0&{}\quad {-1}&{}\quad 0&{}\quad 0 \\ 1&{}\quad 0&{}\quad 0&{}\quad 0 \\ 0&{}\quad 0&{}\quad 0&{}\quad {-1} \\ 0&{}\quad 0&{}\quad 1&{}\quad 0 \\ \end{array} }} \right) \left( {\begin{array}{l} F_1 \\ F_2 \\ F_3 \\ F_4 \\ \end{array}} \right) \end{aligned}$$

with the solutions of

$$\begin{aligned} \xi _{0,k}^1= & {} 0,\xi _{1,k}^1 =-\left( {1+\varepsilon } \right) q_{2,k} ,\xi _{2,k}^1 =\left( {1+\varepsilon } \right) q_{1,k} ,\eta _{1,k}^1 =-\left( {1+\varepsilon } \right) p_{2,k} ,\eta _{2,k}^1 =\left( {1+\varepsilon } \right) p_{1,k} , \end{aligned}$$
(46)
$$\begin{aligned} \xi _{0,k}^2= & {} 1,\xi _{1,k}^2 =-\left( {1+\varepsilon } \right) q_{2,k} ,\xi _{2,k}^2 =\left( {1+\varepsilon } \right) q_{1,k} ,\eta _{1,k}^2 =-\left( {1+\varepsilon } \right) p_{2,k} ,\eta _{2,k}^2 =\left( {1+\varepsilon } \right) p_{1,k} . \end{aligned}$$
(47)

The conformal factor reads

$$\begin{aligned} {\tilde{\mathbf{H}}}_{i,d}^l =\left( {{\begin{array}{llll} 0&{}\quad {-1}&{}\quad 0&{}\quad 0 \\ 1&{}\quad 0&{}\quad 0&{}\quad 0 \\ 0&{}\quad 0&{}\quad 0&{}\quad {-1} \\ 0&{}\quad 0&{}\quad 1&{}\quad 0 \\ \end{array} }} \right) . \end{aligned}$$
(48)

From the Noether identities (28), one obtains

$$\begin{aligned} \eta _{i,k+1} \mathop {D}\limits _{+h} \left( {q_{i,k} } \right) +p_{i,k+1} \mathop {D}\limits _{+h} \left( {\xi _{i,k} } \right) -\varepsilon q_{i,k} \xi _{i,k} +\mathop {D}\limits _{+h} \left( {G_{i,d}^\alpha } \right) =0, \quad \left( {i=1,2} \right) . \end{aligned}$$

The adiabatic invariant of (46) then reads

$$\begin{aligned} I_{1d}^1 =\left( {1+\varepsilon } \right) \left( {-q_{2,k} p_{1,k} +q_{1,k} p_{2,k} } \right) \end{aligned}$$
(49)

with the gauge function \(G^1_1\), \(d=0\). For solution (47), the adiabatic invariant of the system is computed to be

$$\begin{aligned} I_{1d}^2 =\left( {1+\varepsilon } \right) \left( {-q_{2,k} p_{1,k} +q_{1,k} p_{2,k} -H_{k-1} } \right) -\varepsilon \left( {q_{1,k}^2 +q_{2,k}^2 } \right) /2 \end{aligned}$$
(50)

with the gauge function \(G_{1,d}^2 =-\varepsilon \left( {q_{1,k}^2 +q_{2,k}^2 } \right) /2\).

Figure 5 displays the adiabatic invariant with different coefficients of \(\varepsilon \) under the same initial conditions in as Fig. 4. Similarly as for the adiabatic invariant presented in Fig. 3, the absolute value of the adiabatic invariant (50) is almost constant.

Fig. 5
figure 5

Adiabatic invariant (50) with time t for the variational method

6 Conclusions

This paper proposed a procedure for obtaining discrete adiabatic invariants of disturbed Hamiltonian systems. This procedure is based on the perturbations to conformal invariance method approach to derive the adiabatic invariants of the systems. The exact invariants and the adiabatic invariants are, respectively, constructed by the discrete Noether theorems. Numerical tests prove that adiabatic invariants of disturbed Hamiltonian systems have indeed almost constant values. It is demonstrated that algorithms defining the variational discretization preserve the structure properties of the disturbed Hamiltonian systems.