1 Introduction

The high accuracy investigation of the evolution of dynamical systems is a principal task in various astrophysical and physical problems, e.g. trajectories of artificial satellites testing General Relativity [1], orbits and precession of planets of the Solar System [2, 3], galactic dynamics and gravitating N-body problem [4], etc. Therefore, the development of more advanced methods, especially of those enabling non-iterative, and hence with negligible error storage at each iteration, for a description of the evolution of dynamical systems or broadening the classes of systems to which they are applicable, are of particular interest.

Among the principal issues is the numerical treatment of systems in chaotic regimes, including the tools for revealing chaos. For example, since, on the one hand, Lyapunov exponents are characteristics in the limit of infinite time, on the other hand, long iterative trajectory computations lead to inevitable accumulation of errors, suggested numerical procedures for n-dimensional non-linear systems (e.g. [5]) can be applied and interpreted with limited efficiency. Hence, time error-free schemes developed even for particular models such as [6] can be efficient.

The methods of the theory of dynamical systems are rather efficient for numerical studies of complex systems, including chaotic and random ones [7,8,9], and that approach is used below. We develop further the resolvent method suggested in [10, 11]. The main issues elaborated below are:

  1. 1.

    Avoiding of the explicit use of Laplace and inverse Laplace transforms, and obtaining an essentially simplified evolution function representation, we broaden the classes of dynamical systems to which the method is applicable, namely, to non-linear Hamiltonian systems with many degrees of freedom. This is crucial, particularly, for N-body codes [4].

  2. 2.

    The evolution function is obtained analytically i.e. with an accuracy independent of time and establishes the asymptotic and time-average characteristics of the system and, hence, enables one to deal also with chaotic trajectories. To this end, the error-free estimation of phase point (state) evolution in time allows one to characterize the behavior and system’s accessory at ergodic or mixing phase space regions. This is, again, a principal topic for gravitating N-body systems known to possess chaotic properties [12].

  3. 3.

    The choice of the initial function, i.e. of the one not affected by perturbations, as a periodic function is justified in various physical contexts; the newly applied procedure does not involve the Fourier expansion used previously in the resolvent computation. Hence, the Hamiltonian and the initial function can be represented by more convenient variables, depending on the particular dynamical system and aims, e.g. unbounded and non-periodic, differing from the action-angle variables.

The Hamiltonian formalism introduced for dissipative systems needs specific steps, and the transformation to even-dimensional Liouville system usually mounts additional constraints, e.g. the dual Hamiltonian description [13, 14] for damping systems requires the introduction of auxiliary supplement. Based on this, the developed method allows one to follow the trajectory change of the Hamiltonian’s principal term, not paying attention to the additional part. Then the reduction in [11] is again applicable via the scheme introduced here.

The method developed below, as we show also with computations on sample systems, enables one to perform an error-free study for broad classes of dynamical systems—of perturbed Hamiltonian and dissipative ones—and can be applied to complex physical systems.

2 The evolution function and the resolvent

Hamiltonian equations for a perturbed system given by the Hamiltonian

$$\begin{aligned} H(p,q,\beta ) = H_0(p,q) + \beta V(p,q), \end{aligned}$$
(1)

are considered in [10, 11] in a unified form,

$$\begin{aligned} \dot{x}^k=A^k(x), \end{aligned}$$
(2)

where \((x^1,x^2,\ldots ,x^{2n-1},x^{2n})=(p^1,q^1,\ldots ,p^n,q^n)\).

Systems (1) are the key ones in Kolmogorov–Arnold–Moser (KAM) theory stating the survival of the perturbed tori when certain conditions are fulfilled [7].

Then for any smooth function f(x) the following equation holds:

$$\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}t} f(x) - L_A f(x) = 0 \end{aligned}$$
(3)

where

$$\begin{aligned} L_A = A^k(x)\frac{\partial }{\partial x^k}. \end{aligned}$$
(4)

Considering \(f(\cdot )\) as a function of generalized coordinates, conjugate momenta and time, the equation describing the evolution of this function in phase space changing according to (1) gets the form

$$\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}t} f(x,t) - L(\beta ) f(x,t) = 0,\quad x\equiv (p,q). \end{aligned}$$
(5)

Then, according to the Hamiltonian equations,

$$\begin{aligned}&L(\beta ) = L_0 + \beta L_1,\nonumber \\&L_0 = \frac{\partial H_0}{\partial p_k}\; \frac{\partial }{\partial q^k} - \frac{\partial H_0}{\partial q^k}\;\frac{\partial }{\partial p_k} = \{H_0,\cdot \},\nonumber \\&L_1(V) = \frac{\partial V}{\partial p_k}\; \frac{\partial }{\partial q^k} - \frac{\partial V}{\partial q^k}\;\frac{\partial }{\partial p_k}= \{V,\cdot \}. \end{aligned}$$
(6)

The evolution equation can be changed from the canonical variables to action-angle ones used in KAM-analysis to describe the phase portrait (\(\mathrm{Tor}^n\times R^n\)) of the trajectories (see [7], §50). Then

$$\begin{aligned} H(I,\vartheta ,\beta ) = H_0(I) + \beta V(I,\vartheta ) \end{aligned}$$
(7)

and

$$\begin{aligned}&L_0 =\frac{\partial H_0(I)}{\partial I_k}\; \frac{\partial }{\partial \vartheta ^k} =\omega ^k(I)\; \frac{\partial }{\partial \vartheta ^k},\nonumber \\&L_1(V) = \frac{\partial V}{\partial I_k}\; \frac{\partial }{\partial \vartheta ^k} - \frac{\partial V}{\partial \vartheta ^k}\; \frac{\partial }{\partial I_k}, \end{aligned}$$
(8)

where \(\omega ^k(I)=\frac{\partial H_0(I)}{\partial I_k}\).

By means of the Laplace transform

$$\begin{aligned} \tilde{f}(x,s) = \mathcal {L}\left\{ f(x,t) \right\} = \int _0^{\infty } \mathrm{d}t f(x,t) e^{-s t}, \end{aligned}$$
(9)

one can rewrite Eq. (1) as follows:

$$\begin{aligned} s \tilde{f}(x,s) - L(\beta )\tilde{f}(x,s) = f(x,0) \end{aligned}$$
(10)

or

$$\begin{aligned} \tilde{f}(x,s)= & {} R_s(L) g(x),\nonumber \\ g(x)\equiv & {} f(x,0), \end{aligned}$$
(11)

where the resolvent \(R_{s}(L)\) is equal to

$$\begin{aligned} R_{s}(L) = \left( s - L(\beta )\right) ^{-1}. \end{aligned}$$
(12)

For any well-defined operators A and B one can show the resolvent satisfies the following relation:

$$\begin{aligned} R_s(A) - R_s(B) = R_s(A)\left[ A-B\right] R_s(B). \end{aligned}$$
(13)

Then, by means of the inverse Laplace transform, the time domain of \(R_{s}(\cdot )\) can be defined, e.g. for A

$$\begin{aligned} \mathscr {L}^{-1} \left\{ R_s(A) \right\} =\int _C\frac{\mathrm{d} s}{2\pi i} e^{st}R_s(A)=e^{tA}, \end{aligned}$$
(14)

where the contour of integration is

$$\begin{aligned} C=\{ \sigma +i\gamma , \sigma = a>0, -\infty< \gamma < \infty \}. \end{aligned}$$
(15)
Fig. 1
figure 1

The time evolution of the surface determined by Eq. (26) for \(I_1=\mathrm{const}, I_2=\mathrm{const}, \beta =0.03\). The motion is regular with \(T=20\) period

Fig. 2
figure 2

Variation in time of the system given by Eq. (26) with initial conditions \(I_{10}=1.0, I_{20} = 2.0, \vartheta _{10}=3.0, \vartheta _{20}=2.0\) for different values of \(\beta \)

Fig. 3
figure 3

Variation in time of the system given by Eq. (27) with initial conditions \(I_{10}=1.0, I_{20} = 2.0, \vartheta _{10}=3.0, \vartheta _{20}=2.0\) for different values of \(\beta \)

Thus, one can rewrite (13) as

$$\begin{aligned} e^{tA} - e^{tB} = \int _0^{t} \mathrm{d}\tau e^{(t-\tau )A}\left[ A-B\right] e^{\tau B}. \end{aligned}$$
(16)

In contrast,

$$\begin{aligned} f(x,t) \equiv e^{tL}g(x), \end{aligned}$$
(17)

indeed, due to (9) and (11)

$$\begin{aligned} \tilde{f}(x,s) \equiv \mathscr {L}\left\{ e^{tL} \right\} g(x) = R_s(L)g(x). \end{aligned}$$
(18)

Finally, if \(A=L(\beta )\) and \(B=L_0\) by means of (16)–(17) we get the desired formula,

$$\begin{aligned} f(x,t) = e^{tL}g(x) = \bigg [ e^{tL_0} + \beta \int _0^{t} \mathrm{d}\tau e^{(t-\tau )L} L_1 e^{\tau L_0} \bigg ]g(x) \end{aligned}$$
(19)

or

$$\begin{aligned} f(x,t)= & {} \sum ^{+\infty }_{k=0} \beta ^{k} \left[ e^{tL_0}L_1 *\right] ^{k}e^{tL_0}g(x)\nonumber \\= & {} \sum ^{N}_{k=0} \beta ^{k} \left[ e^{tL_0}L_1 *\right] ^{k}e^{tL_0}g(x) + o(\beta ^{N}) \end{aligned}$$
(20)

where

$$\begin{aligned} (u*v)(t)=\int _{0}^{t}\mathrm{d}\tau u(t-\tau )v(\tau ), \end{aligned}$$

i.e. at fixed perturbation \(\beta \), by variation of N, we can reach a given accuracy. In order to reach higher accuracies, exp(tL) in (19) should be calculated recursively substituting the equation itself under the integral. Notably, for \(N=1\)

$$\begin{aligned} f(x,t)= & {} e^{t(L_0 + \beta L_1)}g(x)\nonumber \\= & {} \bigg [ e^{tL_0} + \beta \int _0^{t} \mathrm{d}\tau e^{(t-\tau )L_0} L_1 e^{\tau L_0} +o(\beta ) \bigg ]g(x).\nonumber \\ \end{aligned}$$
(21)

Hence, the evolution for the initial function \(f(x,0) = g(x)\) is found. Then, after selecting the point (state) in the phase space, e.g. the maximum of \(f(\,\cdot \,,t)\), for each t we pursue the time evolution of the point (state), thus determining the evolution of the Hamiltonian system in those time instances.

The presented method can be slightly modified (by adding an extra variable t with the equation \(\dot{t}=1\)) for the possible explicit time-dependent Hamiltonian systems.

The developed scheme, besides providing a computation accuracy independent on time, also allows one to investigate the qualitative properties of the Hamiltonian system within the ergodic theory approach. Namely, despite the fact that an analytical solution for the Hamiltonian equations may not even exist due to internal resonances between different degrees of freedom, the precise time evolution for any state can be derived using the developed method. Such results can be used to distinguish to which class of dynamical systems the investigated system belongs to, e.g. of ergodic, weak mixing, K-system, etc.

The obtained exact form of \(f(\,\cdot \,,t)\) is more convenient for the study of asymptotic and average properties of the system. In a Hilbert space the time average of the evolution (20) of the system is obtained by von Neumann’s theorem as

$$\begin{aligned} \lim _{T\rightarrow \infty } \frac{1}{T} \int _{0}^T e^{t L} g(x) \mathrm{d}t = \langle e^{tL}g(x), 1\rangle . \end{aligned}$$
(22)
Fig. 4
figure 4

Evolving contour lines for \(V_2(I,\vartheta )\) with increasing time and perturbation. The deformed tori at \(t=60\) reappear again as stated by KAM theorem

3 Error-free evolution: sample systems

The elimination of the explicit Laplace transform provides superior feasibility for computer algebra calculation than those described in [10, 11]. Note that one is free to choose the initial function g(x) from the set of the smooth functions as seems convenient for the studied system or the aims.

For the sample system, we will consider \(\beta \ll 1\) for simplicity. It is important to note that, in the case of sufficiently large perturbations, i.e. \(\beta \rightarrow \infty \), by applying the duality principle [15], one obtains a rescaled Hamiltonian and by the “dual” KAM theorem perturbed invariant tori are preserved.

Consider a dynamical system given by a two-dimensional Hamiltonian of two oscillators in action-angle form with a different combination of a small perturbation,

$$\begin{aligned}&H(I,\vartheta ,\beta ) = \omega _1 I_1 + \omega _2 I_2 +\beta V(I,\vartheta ),\\&V_1(I,\vartheta )=I_1 \cos \vartheta _2,\nonumber \\&V_2(I,\vartheta )=I_1 \sin \vartheta _2+I_2 \cos \vartheta _1.\nonumber \end{aligned}$$
(23)

We have the following exact form for the operator:

$$\begin{aligned} e^{t L_0}g(I, \vartheta ) = g(I,\vartheta +t \omega ). \end{aligned}$$
(24)

The initial function \(f(I, \vartheta , 0)\) was chosen in the form

$$\begin{aligned} g(I, \vartheta ) = -\frac{1}{2}\sum _{k=1}^{n}\big (I_k-I_{k0}\big )^2+\sum _{k=1}^{n}\cos \big (\vartheta ^i-\vartheta ^i_0\big ). \end{aligned}$$
(25)

Then the evolution of the systems by means of the described procedure is obtained, respectively,

$$\begin{aligned} f_1(I,\vartheta ,t)= & {} -\frac{1}{2}\Big ((I_1-I_{10})^2+(I_2-I_{20})^2\Big )\nonumber \\&+\,\cos (\vartheta _1-\vartheta _{10}+t \omega _1)+\cos (\vartheta _2-\vartheta _{20}+t \omega _2)\nonumber \\&+\,\omega _2^{-1}\Big (\beta (I_1 (I_2-I_{20}) (\cos (\vartheta _2+t \omega _2)-\cos \vartheta _2)\nonumber \\&+\,(\sin \vartheta _2-\sin (\vartheta _2+t \omega _2)) \sin (\vartheta _1-\vartheta _{10}+t \omega _1))\Big ),\nonumber \\ \end{aligned}$$
(26)
$$\begin{aligned}&f_2(I,\vartheta ,t)= (2\omega _1\omega _2)^{-1} \bigg [2\beta \omega _1\Big ((\cos (\vartheta _2 + t \omega _2)-\cos \vartheta _2)\nonumber \\&\times \,\sin (\vartheta _1 - \vartheta _{10} + t\omega _1) + I_1 (I_2 - I_{20}) \nonumber \\&\,\times (\sin (\vartheta _2 + t\omega _2) - \sin \vartheta _2)\Big ) \nonumber \\&-\,\omega _2\Big (2\beta \Big ((I_1-I_{10})I_2(\cos \vartheta _1-\cos (\vartheta _1 + t\omega _1))\nonumber \\&+ (\sin (\vartheta _1 + t\omega _1)-\sin \vartheta _1) \sin (\vartheta _2 - \vartheta _{20} + t \omega _2)\Big ) \nonumber \\&+ \omega _1\Big ((I_1-I_{10})^2 + (I_2-I_{20})^2 \nonumber \\&-\,2\cos (\vartheta _1 - \vartheta _{10} + t \omega _1) - 2\cos (\vartheta _2 - \vartheta _{20} + t \omega _2)\Big )\Big )\bigg ].\nonumber \\ \end{aligned}$$
(27)

The evolution of the surface determined by the function \(f_1(I, \vartheta , t)\), i.e. corresponding to \(V_1(I,\vartheta )\) perturbation system, at different instances of time for \(I_1=\mathrm{const}, I_2=\mathrm{const}\) is shown in Fig. 1. The surface change and therefore the trajectories are regular in view of \(t=0, 20, 50\) and \(t=10, 30\) matching. In Figs. 2 and 3 the variations of \((I,\vartheta )\) by the time for different values of \(\beta \) are shown. One can observe deviations compared with the unperturbed (integrable) system’s evolution. In Fig. 4 the contour lines are presented for the function \(f_2(I, \vartheta , t)\). The phase tori deformed at the increase of \(\beta \) in time are not destroyed, but remain only slightly deformed, as stated by KAM theory.

During computations, at the increase (decrease) of \(\beta \) by an order of magnitude, the calculation time varied with proportionality, at the accuracy \(10^{-6}\).

4 Conclusions

We described a method of numerical investigation of the evolution of dynamical systems independent on the time accuracy, i.e. not based on iterations as the typical numerical codes but based on an exact computation of the evolution function. In such a formulation the method enables the use of computer algebra.

The essential point here is that the avoidance of the Laplace transform and spatial integration eliminates the possible appearance of an imaginary component during computer algebra calculation, as could happen with the previous procedure. Then the resulting form for the evolution function is far more practical in further study and analysis. We demonstrated the method on an example of the two-dimensional Hamiltonian of two oscillators and the error-free time evolution was shown for various values of the perturbation parameter \(\beta \); the survival of the perturbed tori was shown in accordance to KAM theory.

The developed method can be applied to various physical and astrophysical many-dimensional non-linear systems, most notably, to the gravitating N-body problem, i.e. to the long-term planetary system evolution, galaxy, and galaxy cluster dynamics.

Another intriguing area of application can be the evolution of cosmological perturbations vs. the N-body formalism, particularly, for scalar perturbations within the discrete gravitating masses approach of [16] due to the possibility of adopting the modified method (dependent on the specific prospect) to dissipative systems (e.g. in quasistatic approximation or via scheme discussed in [13]). Then, after estimation of the error-free expressions, the cosmic structure formation and evolution, and back reaction effects can be revealed in more detail.