1 Introduction

This article is devoted to the numerical solution of highly-oscillatory problems (HOPs) by multiscale methods. We consider the situation where a finite -strictly more than one- number \(d>1\) of constant frequencies \(\omega _ 1< \cdots < \omega _d=1\), occur in the problem, and assume that these frequencies are scaled with the inverse of a small parameter \({\varepsilon }\) and are not all rational, thus introducing simultaneous high-oscillations in the equations. More specifically, we shall consider evolution equations of the form (with \(d \ge 2\))

$$\begin{aligned} \dot{u}(t) = \frac{1}{{\varepsilon }} \left( \sum _{i=1}^{d} \omega _i A_i \right) u(t) + g(u(t)), \quad u(0) = u_0 \in X, \quad t \in [0,1], \end{aligned}$$
(1)

where the linear operators \(A_i\), \(i=1, \ldots ,d\), commute with each other and generate \(2 \pi \)-periodic propagators \(\tau \mapsto e^{\tau A_i}\), and where the function g is either a linear or a nonlinear map from X to itself. Since we wish to focus on the obstacles induced by the presence of several frequencies, we shall content ourselves here with ordinary differential equations posed in \(X=\mathbb {R}^n\), though more general evolution equations could also be consideredFootnote 1 and will be indeed used as test case in the numerical experiment Sect. 5. A fundamental assumption throughout the paper is that the scaled vector of frequencies \(\omega =(\omega _1, \ldots , \omega _{d-1},1)\) has not all its components in \(\mathbb {Q}\) , that is to say that \(\omega \notin \mathbb {Q}_+^d\). In the sequel, we shall assume in addition the following

Assumption 1

Equation (1) admits a uniquely defined solution for all \(0< |{\varepsilon }| < {\varepsilon }_0 \le 1\) and this solution remains in an open bounded set \({\mathcal {K}} \subset X\) for all \((t,|{\varepsilon }|) \in [0,1] \times ]0,{\varepsilon }_0[\).

Problem (1) is notoriously difficult to solve numerically: in order to achieve some accuracy, usual numerical schemes are forced to follow more and more oscillations as \({\varepsilon }\) becomes smaller and smaller, whereas the averaged dynamics is often what only matters in applications. Standard methods such as Lie-Trotter and Strang splittings, or compositions thereof, suffer from severe step size restrictions, rendering them useless in practice for very small values of \({\varepsilon }\). More elaborate schemes of Gautschi type overcome some of the limitations of splitting techniques, but certainly not all of them (see [13], Chapter XII) and in particular are subject to resonances. It is thus of paramount importance to design effective methods.

The mono-frequency problem (i.e. Eq. (1) with only one operator) has drawn much attention in recent years and one has witnessed the introduction of several multiscale methods able to produce outputs with equal accuracy and cost [4,5,6,7, 9], irrespect of the stiffness parameter \(1/{\varepsilon }\). For instance, two-scale methods (TSMs) [5], on the one hand, and multi-revolution composition methods (MRCMs) [6], on the other hand, both permit to filter out the oscillations in the solution and to capture the behavior of the underlying smooth equation. These methods have been applied successfully in various contexts (ODEs but also PDEs such as kinetic equations and Schrödinger equations) and have demonstrated their ability to deliver uniformly good results in a wide range of \({\varepsilon }\)-values, a property referred to as uniform accuracy. In this work, our goal is to rewrite the original equation (1), which is multi-frequency in essence, in such a way that the two aforementioned methods can be employed. To this aim, we shall approximate all the frequencies simultaneously by rational numbers with the same denominator. This strategy has already been successfully used in the context of homogenisation methods by several authors [1, 18] and control of PDEs [12]. In our context, it is fundamental for the diophantine approximation error to remain small -as compared to the parameter \({\varepsilon }\)- and simultaneously that this common denominator also remains small. The strategy we use to balance these contradictory requirements is rather simple and will be described in Sect. 2. However, it requires an ad-hoc estimate which falls within number theory: its proof indeed requires continued fractions approximation for \(d=2\) and more elaborate results from [16, 17] for \(d > 2\). At this point, let us emphasize that the error estimates we establish here are obviously not claimed to be a major breakthrough in the field of best diophantine approximations. Nevertheless, they appear to be novel as drawn by the specific point of view adopted here. This new formulation of the problem is then amenable to mono-frequency averaging techniques and associated numerical methods.

In Sect. 2, we shall present the rationale of our technique and state an averaging result in Sect. 3, which allows to consider problem (1) as a mono-frequency problem with a rescaled parameter \({\varepsilon }^{\beta }\) for someFootnote 2 \(0< \beta <1\). Strikingly, the estimates obtained in this non-fully-resonant scenario are qualitatively similar to those obtained by standard techniques (e.g. by filtering with the flow of the harmonic oscillators, and applying the averaging estimates of C. Simo [19]). Section 4 will deal with the required error estimates for the simultaneous approximation of the frequencies \(\omega _i\). Special attention will be paid to the dimension \(d=2\), as larger values of \(\beta \) can be obtained for specific values of \(\omega _1\) (namely those which can be written as a continued fraction with a bounded sequence of coefficients). The general situation with \(d > 2\) frequencies will also be explored in this section. Finally, Sect. 5 will present numerical experiments for both MRCMs and TSMs. Their use in the present context will also be explained. Note that we have added an Appendix which recalls the results of [8, 11] used in this paper.

2 Motivations and method rationale

Since efficient numerical methods for mono-frequency HOPs are close at hand, the idea at the core of this work consists in reformulating equation (1) as a one-frequency HOP. Note that approximating simultaneously real numbers by rational ones with a common denominator in highly-oscillatory problems is reminiscent of previous works in the literature on homogenisation methods [1, 18] and on control of PDEs [12]. Moreover, simultaneous diophantine approximation is per se a thoroughly studied problem and one may find in the literature several famous related statements. However and up to our knowledge, none of them perfectly meets our requirements. In this section, we expose how this can be done appropriately in our situation and then examine the overall expected computational gain, before further commenting on existing classical results from the literature.

2.1 Rewriting the d-frequency system as a one-frequency system

We first notice that by rescaling the time (or equivalently \({\varepsilon }\)), we may suppose that \(\omega _d=1\). Anticipating its proof in next section, we now use the following statement: for almost all \(\omega \in ]0,1]^d\) with \(\omega _d=1\) and all \(0<\alpha <1/(d-1)\), there exists a positive constant \(C_\omega ^\alpha \) such that

$$\begin{aligned} \forall P\in & {} [1,+\infty [, \exists \mathbf{p}\in \mathbb {N}^{d}, \; \text{ s.t. } p_d \le P, \; p_1 \wedge \cdots \wedge p_d =1 \text{ and } \nonumber \\&\max _{i=1,\ldots ,d} \left| \omega _i-\frac{p_i}{p_d}\right| \le \frac{C_\omega ^\alpha }{P^{1+\alpha }} \end{aligned}$$
(2)

where we have denoted \(\mathbf{p}=(p_1,\ldots ,p_d)\). The main idea of this work now consists in replacing the frequencies \(\omega _i\), \(i=1, \ldots , d\) by approximations

$$\begin{aligned} \omega _i \approx \frac{p_i}{p_d}, \quad i=1, \ldots , d, \end{aligned}$$

with the same denominator \(p_d\) as in (2). Equation (1) can then be written in a -strictly- equivalent form

$$\begin{aligned} \dot{u}(t) = \frac{1}{{\varepsilon }p_d } \left( \sum _{i=1}^d p_i A_i \right) u(t) + \frac{1}{{\varepsilon }} \sum _{i=1}^d \left( \omega _i - \frac{p_i}{p_d}\right) A_i u(t) + g\left( u(t)\right) \end{aligned}$$

with

$$\begin{aligned} \left\| \frac{1}{{\varepsilon }} \sum _{i=1}^d \left( \omega _i - \frac{p_i}{p_d}\right) A_i u \right\| _X\le & {} \frac{C_\omega ^\alpha }{{\varepsilon }P^{1+\alpha }} \left( \sum _{i=1}^d \Vert A_i\Vert _{{\mathcal {L}}(X)} \right) \Vert u\Vert _X. \end{aligned}$$
(3)

In order to get a mono-frequency highly-oscillatory problem of the form considered in [5, 6], namely

$$\begin{aligned} \dot{u}(t) = \frac{1}{\mu } A u(t) + \tilde{g}(u(t)), \quad t \in [0,1], \end{aligned}$$
(4)

where \(t \mapsto e^{tA}\) is \(2 \pi \)-periodic and \(\tilde{g}\) is uniformly bounded for all sufficiently small \({\varepsilon }\), it thus suffices to consider the rational approximations provided by (2) for \(P={\varepsilon }^{-\beta }\) with \(\beta :=\frac{1}{1+\alpha }\), so that

$$\begin{aligned} A=\sum _{i=1}^d p_i A_i, \qquad \tilde{g}(u) = g(u) + \frac{1}{{\varepsilon }} \sum _{i=1}^d \left( \omega _i - \frac{p_i}{p_d}\right) A_i u \quad \text{ and } \quad \mu ={\varepsilon }p_d. \end{aligned}$$

We thus proceed as follows: given \({\varepsilon }> 0\), define \(P=P^{\varepsilon }={\varepsilon }^{-\beta }\) and choose an integer \(p_d=p_d^{\varepsilon }\le P\) and \(d-1\) integers \(p_i=p_i^{\varepsilon }\) satisfying estimate (2) and such that \(p_d\) is minimum. The parameter \(\mu =\mu ^{\varepsilon }={\varepsilon }p_d^{\varepsilon }\) is then bounded by \({\varepsilon }P^{\varepsilon }= {\varepsilon }^{1-\beta }\) which is small as soon as \({\varepsilon }\) is (given that \(0< \beta < 1\)). It is then straightforward that (using that \(\bar{\mathcal {K}} \subset X\) is compact, see Assumption 1)

$$\begin{aligned} \sup _{u \in \bar{ \mathcal {K}}} \Vert \tilde{g}\Vert \le \sup _{u \in \bar{\mathcal {K}}} \Vert g\Vert + C_\omega ^\alpha \left( \sum _{i=1}^d \Vert A_i\Vert _{{\mathcal {L}}(X)} \right) \sup _{u \in \bar{\mathcal {K}}} \Vert u\Vert = {\mathcal {O}}({\varepsilon }^0). \end{aligned}$$

2.2 Expected computational speed-up

The “price to be paid”, in going from Eqs. (1) to (4), stems from the fact that the averaging parameter \({\varepsilon }\), intended to be small as it appears in (1), has been multiplied by \(p_d\) in (4). In the worst case, \(p_d\) can be of size P, so that \({\varepsilon }p_d\) is then of size \({\varepsilon }^{\frac{\alpha }{1+\alpha }}\). So to say, in passing from (1) to (4), the highly-oscillatory character of the problem has slightly faded away and the potential gain expected from multiscale methods has been reduced accordingly. However, it appears that the use of MRCMs or TSMs still allows for a significant overall gain. This can be seen as follows:

  1. (i)

    on the one hand, if one solves the original equation (1)

    $$\begin{aligned} \dot{u}(t) = \frac{1}{{\varepsilon }} \sum _{i=1}^d \omega _i A_i u(t) + g(u(t)),\quad t \in [0,1], \end{aligned}$$

    by a direct method (say for instance a splitting method), then the smallest period of intrinsic oscillations (that is to say \(2 \pi {\varepsilon }\), the period of \(e^{\frac{t}{{\varepsilon }} A_d}\) given that \(\omega _d=1\) and \(\omega _i < 1\), \(i=1,\ldots ,d-1\)) needs to be meshed with a fixed number of steps (independent of \({\varepsilon }\)), say m. Altogether, the integration of (1) over the interval [0, 1] thus requires \(m/(2 \pi {\varepsilon })\) steps.

  2. (ii)

    on the other hand, if one first reformulates equation (1) as

    $$\begin{aligned} \dot{u}(t) = \frac{1}{\mu } \sum _{i=1}^d p_i A_i u(t) + \tilde{g}(u(t)) =\frac{1}{\mu } A u(t) + \tilde{g}(u(t)) ,\quad t \in [0,1], \end{aligned}$$

    and then solves it by MRCMs or TSMs, then the solution has to be computed over a fixed number, say M (independent of \(\mu \) owing to the design of these methods), of intervals of length \(2 \pi \mu \) (the period of \(e^{\frac{t}{\mu } A}\)). The integration over one period uses \(p_d \times m\) steps for the \(p_d\) oscillations to be resolved as accurately as in the first case, so that computing the solution requires \(M \, p_d \, m\) steps.

The computational gain is thus the ratio

$$\begin{aligned} \frac{m/(2\pi {\varepsilon })}{M \; p_d \; m} = \text{ Const }/( {\varepsilon }p_d)) \ge \text{ Const } \; {\varepsilon }^{-\frac{\alpha }{1+\alpha }}. \end{aligned}$$

Since \(0< \alpha < 1/(d-1)\), it clearly depends on the number d of frequencies. The expected gain is essentially of size \(\text{ Const }/\sqrt{{\varepsilon }}\) for two frequencies and deteriorates with increasing d.

2.3 Further comments on diophantine estimates from the literature

The famous Dirichlet’s theorem on Diophantine approximation states that, given any vector \(\omega \in ]0,1]^d\) with \(\omega _d=1\), as in Sect. 2.1, and any natural number \(P \ge 1\), there exists \(\mathbf p \in \mathbb {N}^d\) with \(p_d \le P\) such that

$$\begin{aligned} \max _{i=1,\ldots ,d} \left| \omega _i-\frac{p_i}{p_d}\right| \le \frac{1}{p_d P^{\alpha }} \end{aligned}$$
(5)

with \(\alpha =1/(d-1)\). Its proof is a consequence of the pigeonhole principle and may be found in textbooks on arithmetic [3, 15]. However, estimate (5) is not sufficient for our purpose: as a matter of fact, the upper bound (3) is then weakened to

$$\begin{aligned} \left\| \frac{1}{{\varepsilon }} \sum _{i=1}^d \left( \omega _i - \frac{p_i}{p_d}\right) A_i u \right\| _X\le & {} \frac{1}{{\varepsilon }p_d P^{\alpha }} \left( \sum _{i=1}^d \Vert A_i\Vert _{{\mathcal {L}}(X)} \right) \Vert u\Vert _X, \end{aligned}$$

and thus requires in essence that (i) \({\varepsilon }p_d P^{\alpha } \ge 1\) while (ii) keeping \(\mu = {\varepsilon }p_d\) small w.r.t. \({\varepsilon }\), say of size \({\varepsilon }^\beta \) for some \(0<\beta <1\). In order to ensure the second condition, one has no option but to choose \({\varepsilon }P = {\varepsilon }^\beta \), since no information is provided by Dirichlet’s theorem on the actual size of \(p_d\), which may be close to 1 or quite the opposite, close to P. The inequality \({\varepsilon }p_d P^{\alpha } \ge 1\) then becomes \(p_d \ge {\varepsilon }^{\alpha \beta -1}\), a condition impossible to guarantee given that \(\alpha \beta - 1<0\).

Another well-known result for the \(d=2\) case, namely the Borel-Hurwitz theorem (see for instance [15] or [18]), states that, given the irrationality of \(\omega _1\), there exists an sequence of fractions \((p_{n,1}/p_{n,2})_{n \in \mathbb {N}}\) with increasing denominators such that

$$\begin{aligned} \left| \omega _1-\frac{p_{n,1}}{p_{2,n}}\right| \le \frac{1}{\sqrt{5} p_{2,n}^2}. \end{aligned}$$

At first glance, it appears to refine estimate (5) in this case. However, it does not provide estimates on the growth of \(p_{2,n}\) with n. In particular, it may happen that the sequence \((p_{2,n+1}-p_{2,n})_{n \in \mathbb {N}}\) be unbounded, a scenario in which conditions (i) \({\varepsilon }p_{2,n}^2 \ge 1\) and (ii) \(\mu ={\varepsilon }\, p_{2,n}\) small may be impossible to satisfy simultaneously.

The necessity of controlling the difference between consecutive common denominators was precisely the driving motivation for using and deriving estimate (2), whose proof follows mostly from standard results in arithmetic (see Sect. 4.2).

3 An averaging result for multi-frequency HOPs

In this subsection, we now establish an averaging result similar to the early paper [19] or to [11] which uses B-series.

3.1 Statement of the result

According to the discussion of Sect. 2.1, we henceforth explicitly indicate the dependence on \({\varepsilon }\) of \(\mathbf{p}^{\varepsilon }=(p^{\varepsilon }_1,\ldots ,p^{\varepsilon }_d)\), \(P^{\varepsilon }\) and \(\mu ^{\varepsilon }={\varepsilon }\, p_d^{\varepsilon }\), by upper indices and consider the change of variables from X to itself

$$\begin{aligned} u \mapsto \chi _\theta (u) = \exp \Big (\sum _{i=1}^{d} \theta _i A_i \Big ) u, \end{aligned}$$

parametrized by \(\theta =(\theta _1,\ldots ,\theta _{d}) \in \mathbb {T}^{d} \equiv [0,2 \pi ]^{d}\). Introducing

$$\begin{aligned} G_\theta (v) = \chi _{-\theta } \Big (g\left( \chi _\theta (v) \right) \Big ) \end{aligned}$$

and performing the change of variables \(u=\chi _{\frac{t}{\mu ^{\varepsilon }} \mathbf{p}^{\varepsilon }}(v)\), the differential equation for v can be written

$$\begin{aligned} \dot{v} (t)= G_{\frac{t}{\mu ^{\varepsilon }} \mathbf{p}^{\varepsilon }}\left( v(t)\right) + \frac{1}{{\varepsilon }}\sum _{i=1}^{d} \left( \omega _i-\frac{p_i^{\varepsilon }}{p_d^{\varepsilon }}\right) A_i \; v(t) := f^{\varepsilon }_{\frac{t}{\mu ^{\varepsilon }}} (v(t)), \quad v(0)=v_0, \end{aligned}$$
(6)

where we have used the commutation of \(\chi _\theta \) and the \(A_i\)’s, and denoted

$$\begin{aligned} f^{\varepsilon }_{\tau } (v) = G_{\tau \mathbf{p}^{\varepsilon }} (v)+ \frac{1}{{\varepsilon }}\sum _{i=1}^{d} \left( \omega _i-\frac{p_i^{\varepsilon }}{p_d^{\varepsilon }}\right) A_i \; v. \end{aligned}$$

Note that since 1 is the greatest common divisor of \(p_1^{\varepsilon }, \ldots ,p_d^{\varepsilon }\), \(2 \pi \) is the smallest period of the function \(\tau \mapsto G_{\tau \mathbf{p}^{\varepsilon }}\).

We wish to study the differential equation (1) in the open bounded \({\mathcal {K}} \subset \mathbb {R}^n\), as defined in Introduction. Since the derivation of exponentially small error estimates in the averaging procedure requires some analyticity assumptions, we further introduce, for \(\rho \ge 0\), the extended set

$$\begin{aligned} {\mathcal {K}}_\rho = \{v+w \in \mathbb {C}^n: v \in \bar{\mathcal {K}}, \; \Vert w\Vert \le \rho \} \end{aligned}$$

where \(\Vert \cdot \Vert \) denotes the euclidean norm on \(\mathbb {C}^n\) as well as the induced subordinated norm for matrices of \({\mathcal {M}}_n(\mathbb {C})\). Finally, we denote by \(\Vert f\Vert _\rho =\sup _{u \in {\mathcal {K}}_\rho } \Vert f(u)\Vert \) the maximum norm on the compact set \({\mathcal {K}}_\rho \). We are now ready to state the main hypothesis on the map \((\theta ,v) \mapsto G_\theta (v)\):

Assumption 2

There exist \(R>0\) and an open set \(\mathcal {U}\) containing \({\mathcal {K}}_R\) such that, for all \(\theta \in \mathbb {T}^{d}\) the function \(v \mapsto G_\theta (v)\) can be extended to a map from \(\mathcal {U}\) to \(\mathbb {C}^n\) which is analytic at each point \(v \in {\mathcal {K}}_R\). Furthermore, the sum of the norms of the Fourier coefficients \(\hat{G}_\mathbf{k}\), \(\mathbf{k}\in \mathbb {Z}^{d}\), of G, is bounded, i.e.

$$\begin{aligned} M:= \sum _{\mathbf{k}\in \mathbb {Z}^{d}} \Vert \hat{G}_\mathbf{k}\Vert _R < +\infty . \end{aligned}$$

Note that we have

$$\begin{aligned} G_{\tau \mathbf{p}^{\varepsilon }}(v) = \sum _{l \in \mathbb {Z}} e^{i l \tau } \left( \sum _{\mathbf{k}\in \mathbb {Z}^{d}, \; \mathbf{k}\cdot \mathbf{p}^{\varepsilon }= l} \hat{G}_{\mathbf{k}}(v) \right) \end{aligned}$$
(7)

where the multi-indices \(\mathbf{k}\in \mathbb {Z}^{d}\) in the inner-sum can be expressed under the form

$$\begin{aligned} \mathbf{k}= {\mathbf{x}} + S {\mathbf{y}}, \quad {\mathbf{x}} \in \mathbb {Z}^{d}, \quad S \in {\mathcal {M}}_{d,d-1}(\mathbb {Z}), \quad {\mathbf{y}} \in \mathbb {Z}^{d-1}, \end{aligned}$$

\(\mathbf{x}\) and S being fixed values depending on l and \(\mathbf{p}^{\varepsilon }\), while \(\mathbf{y}\) takes all values in \(\mathbb {Z}^{d-1}\). The series \((\Vert \hat{G}_\mathbf{k}\Vert _R)_{\mathbf{k}\in \mathbb {Z}^{d}}\) being summable, the inner series in \(G_{\tau \mathbf{p}^{\varepsilon }}(v)\) are also convergent so that the Fourier coefficients of \(G_{\tau \mathbf{p}^{\varepsilon }}(v)\) can be expanded as the inner series in (7). To sum up, we have

$$\begin{aligned} G_{\tau \mathbf{p}^{\varepsilon }}(v) = \sum _{l \in \mathbb {Z}} e^{i l \tau } \hat{G}^{\varepsilon }_l(v) \quad \text{ where } \quad \hat{G}^{\varepsilon }_l(v) = \sum _{\mathbf{k}\in \mathbb {Z}^{d}, \; \mathbf{k}\cdot \mathbf{p}^{\varepsilon }= l} \hat{G}_{k}(v). \end{aligned}$$
(8)

Remark 3.1

For instance, for \(d=2\), we have

$$\begin{aligned} G_{\tau \mathbf{p}^{\varepsilon }}(v) = \sum _{l \in \mathbb {Z}} e^{i l \tau } \left( \sum _{m \in \mathbb {Z}} \hat{G}_{(l a^{\varepsilon }+ m p_2^{\varepsilon }, l b^{\varepsilon }-m p_1^{\varepsilon })}(v) \right) \end{aligned}$$

where \(a^{\varepsilon }\) and \(b^{\varepsilon }\) are two integers such that \(a^{\varepsilon }p_1^{\varepsilon }+ b^{\varepsilon }p_2^{\varepsilon }=p_1^{\varepsilon }\wedge p_2^{\varepsilon }=1\). All Fourier coefficients \(\hat{G}_\mathbf{k}\), \(\mathbf{k}\in \mathbb {Z}^2\), of \(G_\theta (v)\) appear in this sum, but are gathered by blocks to form the Fourier coefficients of \(G_{\tau \mathbf{p}^{\varepsilon }}(v)\).

Theorem 3.2

Consider \(\omega \in ]0,1]^d\) with \(\omega _d=1\), \(\omega _i<1\) for \(i=1,\ldots ,d-1\) and \(0<\alpha <1/(d-1)\) such that (2) holds for some constant \(C_\omega ^\alpha \). Suppose that G satisfies Assumption 2 and denote

$$\begin{aligned} \tilde{M} := M + C_\omega ^\alpha \sum _{i=1}^{d-1} \Vert A_i\Vert R. \end{aligned}$$

Then, for any \(0< {\varepsilon }< {\varepsilon }_0\) and for any \(N \in \mathbb {N}^*\) such that

$$\begin{aligned} {\varepsilon }^{\frac{\alpha }{1+\alpha }} N \le \tilde{c}:=\frac{R}{8 \tilde{M}}, \end{aligned}$$

there exists a near-identity (and periodic) change of variables

$$\begin{aligned} v=\Phi ^{[{\varepsilon },N]}_{t/\mu ^{\varepsilon }}(V) \quad \text{ with } \quad \Phi ^{[{\varepsilon },N]}: \mathbb {T}\times {\mathcal {K}}_{R/2} \rightarrow {\mathcal {K}}_{R}, \qquad \mu ^{\varepsilon }={\varepsilon }\, p_d^{\varepsilon }, \end{aligned}$$

transforming equation (6) into the equation

$$\begin{aligned} \dot{V} = F^{[{\varepsilon },N]}(V) + R^{[{\varepsilon },N]}_{t/\mu ^{\varepsilon }}(V), \quad V(0)=v_0, \end{aligned}$$

with averaged vector field \(F^{[{\varepsilon },N]}: {\mathcal {K}}_{R/2} \rightarrow \mathbb {C}^n\) and remainder \(R^{[{\varepsilon },N]}: \mathbb {T}\times {\mathcal {K}}_{R/2} \rightarrow \mathbb {C}^n\) satisfying the following bounds

$$\begin{aligned} \Vert F^{[{\varepsilon },N]} - \hat{f}_0^{\varepsilon }\Vert _{R/2} \le \frac{\tilde{M}}{2} {\varepsilon }^{\frac{\alpha }{1+\alpha }} \quad \text{ and } \quad \forall \tau \in \mathbb {T}, \quad \Vert R^{[{\varepsilon },N]}_\tau \Vert _{R/2} \le \frac{5 \left( \frac{{\varepsilon }^{\frac{\alpha }{1+\alpha }}N}{\tilde{c}}\right) ^N}{1-\frac{{\varepsilon }^{\frac{\alpha }{1+\alpha }}N}{\tilde{c}}} \; \tilde{M}.\nonumber \\ \end{aligned}$$
(9)

In particular, taking \(N=N^{\varepsilon }\) as the integer part of \(\tilde{c}/(e{\varepsilon }^{\frac{\alpha }{1+\alpha }}) \ge 1\), one has

$$\begin{aligned} \forall \theta \in \mathbb {T}, \quad \Vert R^{[{\varepsilon },N^{\varepsilon }]}_\theta \Vert _{R/2} \le \frac{5 e^2}{e-1} \tilde{M} \exp \Big (-\frac{\tilde{c}}{e } {\varepsilon }^{\frac{-\alpha }{1+\alpha }}\Big ). \end{aligned}$$
(10)

Proof

Let \(0< {\varepsilon }< {\varepsilon }_0\) and consider \(\mathbf{p}^{\varepsilon }\) satisfying (2) for \(P^{\varepsilon }= {\varepsilon }^{-\frac{1}{1+\alpha }}\). We start from Eq. (6)

$$\begin{aligned} \dot{v}(t) = G_{\frac{t}{\mu ^{\varepsilon }} \mathbf{p}^{\varepsilon }}\left( v(t)\right) + \frac{1}{{\varepsilon }}\sum _{i=1}^{d} \left( \omega _i-\frac{p_i^{\varepsilon }}{p_d^{\varepsilon }}\right) A_i \; v(t), \quad v(0)=v_0, \end{aligned}$$

and consider for the time being \(\mu =\mu ^{\varepsilon }\) as a small parameter varying independently of \({\varepsilon }\), while keeping \({\varepsilon }\) fixed, i.e.

$$\begin{aligned} \dot{v}(t) = f^{\varepsilon }_{t/\mu }(v(t)), \quad v(0)=v_0, \quad t \in [0,1], \end{aligned}$$
(11)

where

$$\begin{aligned} f^{\varepsilon }_\tau (v) =G_{\tau \mathbf{p}^{\varepsilon }}\left( v\right) + \frac{1}{{\varepsilon }}\sum _{i=1}^{d} \left( \omega _i-\frac{p_i^{\varepsilon }}{p_d^{\varepsilon }}\right) A_i \; v \end{aligned}$$

is \(2 \pi \)-periodic owing to the choice of \(\mathbf{p}^{\varepsilon }\). In virtue of Assumption 2, the function \(f^{\varepsilon }_\tau \) has Fourier coefficients

$$\begin{aligned} \hat{f}^{\varepsilon }_l(v)= & {} \sum _{\mathbf{k}\cdot \mathbf{p}^{\varepsilon }= l} \hat{G}_{k}(v) \quad \text{ for } l \ne 0 \quad \text{ and } \quad \hat{f}^{\varepsilon }_0 (v)= \sum _{\mathbf{k}\cdot \mathbf{p}^{\varepsilon }= 0} \hat{G}_{k}(v) \\&+ \frac{1}{{\varepsilon }}\sum _{i=1}^{d} \left( \omega _i-\frac{p_i^{\varepsilon }}{p_d^{\varepsilon }}\right) A_i \; v \end{aligned}$$

where \(\mathbf{k}\) runs in \(\mathbb {Z}^{d}\), so that

$$\begin{aligned} \sum _{l \in \mathbb {Z}} \Vert \hat{f}^{\varepsilon }_l\Vert _R \le C_\omega ^\alpha \sum _{i=1}^{d-1} \Vert A_i\Vert \, R + \sum _{l \in \mathbb {Z}} \sum _{\mathbf{k}\cdot \mathbf{p}^{\varepsilon }=l} \Vert \hat{G}_\mathbf{k}\Vert _R \le \tilde{M} \end{aligned}$$

where \(\tilde{M}\) is independent of \({\varepsilon }\). Theorem 5.1 thus applies: For any \(N \in \mathbb {N}^*\) and any \(\mu \in \mathbb {C}\) such that \(|\mu | N \le \tilde{c}:= \frac{R}{8 \tilde{M}}\), there exist a vector field \(V \in {\mathcal {K}}_{R/2} \mapsto F^{[{\varepsilon },\mu , N]}(V)\), a \(2\pi \)-periodic-in-time change of variables \((\tau ,V) \in \mathbb {T}\times {\mathcal {K}}_{R/2} \mapsto \Phi ^{[{\varepsilon },\mu , N]}_\tau (V)\), and a \(2 \pi \)-periodic-in-time remainder \((\tau ,V) \in \mathbb {T}\times {\mathcal {K}}_{R/2} \mapsto R_\tau ^{[{\varepsilon },\mu , N]}(V)\), such that the solution of (6) reads

$$\begin{aligned} v(t) = \Phi ^{[{\varepsilon },\mu , N]}_{t/\mu } \left( V(t) \right) \end{aligned}$$

where V satisfies a differential equation of the form

$$\begin{aligned} \dot{V}(t) = F^{[{\varepsilon },\mu , N]}(V(t)) + R_{t/\mu }^{[{\varepsilon },\mu ,N]}(V(t)), \quad V(0)=v_0, \end{aligned}$$

with the following bounds

$$\begin{aligned} \Vert F^{[{\varepsilon },\mu ,N]} - \hat{f}_0^{\varepsilon }\Vert _{R/2} \le \frac{\tilde{M}}{2} \mu , \quad \Vert R^{[{\varepsilon },\mu ,N]}_\tau \Vert _{R/2} \le \frac{5 (\mu N/\tilde{c})^N}{1-(\mu N /\tilde{c} )} \tilde{M}. \end{aligned}$$

This result holds for all \(\mu \) such that \(|\mu | N \le \tilde{c}\), so in particular for \(\mu =\mu ^{\varepsilon }= {\varepsilon }p_d^{\varepsilon }\) provided \({\varepsilon }P^{\varepsilon }N = {\varepsilon }^{\frac{\alpha }{1+\alpha }} N \le \tilde{c}\), thus leading to the bounds given in (9). Estimate (10) is then obtained as in Theorem 5.1. \(\square \)

3.2 Conserved quantities in autonomous Hamitonian systems

In this section, we consider the situation of Sect. 3 in [11], that is to say the case of Hamiltonian systems

$$\begin{aligned} \dot{u} = J^{-1} \nabla _u {\mathcal {H}}^{\varepsilon }(u) \end{aligned}$$
(12)

where J is the canonical matrix

$$\begin{aligned} J = \left( \begin{array}{cc} 0 &{} {\mathrm {Id}} \\ -{\mathrm {Id}} &{}0 \end{array} \right) , \quad {\mathrm {Id}} \in {\mathcal {M}}(\mathbb {R}^m), \end{aligned}$$

and where the Hamiltonian is of the form

$$\begin{aligned} {\mathcal {H}}^{{\varepsilon }}(u) = \frac{1}{{\varepsilon }} \Big ( \sum _{j=1}^d \omega _j I_j(u) \Big ) + K(u) \end{aligned}$$
(13)

with \(\omega \) a vector of frequencies as considered in this paper. Furthermore, the following assumptions are satisfied:

  1. (i)

    The functions \(I_j\) are in involution, i.e. for all \(i,j=1,\ldots ,d\), one has \(\{I_i,I_j\}=0\) where the bracket used here is the Poisson bracket (see for instance [11]).

  2. (ii)

    For all \(j=1,\ldots ,d\), the flow \(\chi ^{[j]}_{\tau }\) of the differential system

    $$\begin{aligned} \frac{d}{d \tau } \chi ^{[j]}_{\tau }(u) = J^{-1} \nabla _{u} I_j(\chi ^{[j]}_{\tau }(u)) \end{aligned}$$

    is \(2 \pi \)-periodic.

We then denote, for \(\theta \in \mathbb {T}^d\)

$$\begin{aligned} \chi _\theta = \chi ^{[1]}_{\theta _1} \circ \chi ^{[2]}_{\theta _2} \circ \cdots \circ \chi ^{[d]}_{\theta _d} \end{aligned}$$

where the composition is commutative by virtue of the first assumption (i). In accordance with [11] again, we shall work under the following hypothesis:

Assumption 3

There exist \(R>0\) and an open set \({\mathcal {U}}\) containing \({\mathcal {K}}_R\) such that:

  1. (i)

    for all \(j=1, \ldots ,d\), \(I_j\) can be extended to an analytic map on \({\mathcal {U}}\);

  2. (ii)

    for each \(\theta \in \mathbb {T}^d\), \(K \circ \chi _\theta \) can be extended to a map from \({\mathcal {U}}\) to \(\mathbb {C}\) which is analytic at each point in \({\mathcal {K}}_R\).

Furthermore, the Fourier coefficients \(\hat{H}_\mathbf{k}\), \(\mathbf{k}\in \mathbb {Z}^d\), of \(K \circ \chi _\theta \) satisfy the following bound

$$\begin{aligned} M:=\sum _{\mathbf{k}\in \mathbb {Z}^d} \Vert \hat{H}_\mathbf{k}\Vert _R < +\infty . \end{aligned}$$

We can now decompose the Hamiltonian just as we did for the vector field in previous section and write

$$\begin{aligned} {\mathcal {H}}^{\varepsilon }(u) = \frac{1}{{\varepsilon }p^{\varepsilon }_d} \Big (\sum _{j=1}^d p^{\varepsilon }_j I_j(u) \Big ) + K(u) + \sum _{j=1}^d \frac{1}{{\varepsilon }}\left( \omega _j - \frac{p^{\varepsilon }_j}{p_d^{\varepsilon }}\right) I_j(u) = \frac{1}{\mu ^{\varepsilon }} I^{\varepsilon }(u) + K^{\varepsilon }(u) \end{aligned}$$

with

$$\begin{aligned} I^{\varepsilon }:= \sum _{j=1}^d p^{\varepsilon }_j I_j, \quad \quad K^{\varepsilon }:= K + \sum _{j=1}^d \frac{1}{{\varepsilon }}\left( \omega _j - \frac{p^{\varepsilon }_j}{p_d^{\varepsilon }}\right) I_j, \end{aligned}$$

and where \(\mathbf{p}^{\varepsilon }\) is chosen so as to satisfy (2) with \(P^{\varepsilon }= {\varepsilon }^{-\frac{1}{1+\alpha }}\). Noticing that

$$\begin{aligned} K^{\varepsilon }\circ \chi _\theta = K \circ \chi _\theta + \sum _{j=1}^d \frac{1}{{\varepsilon }}\left( \omega _j - \frac{p^{\varepsilon }_j}{p_d^{\varepsilon }}\right) I_j \end{aligned}$$

owing to assumption (i), it is clear that the Fourier coefficients \(\hat{H}_l^{\varepsilon }\) of \(K^{\varepsilon }_\tau := K^{\varepsilon }\circ \chi _{\tau \mathbf{p}^{\varepsilon }}\) can be written as follows

$$\begin{aligned} \hat{H}_l^{\varepsilon }= \sum _{\mathbf{k}\cdot \mathbf{p}^{\varepsilon }=l} \hat{H}_\mathbf{k}\quad \text{ for } l \ne 0 \quad \text{ and } \quad \hat{H}^{\varepsilon }_0= \sum _{\mathbf{k}\cdot \mathbf{p}^{\varepsilon }=0} \hat{H}_\mathbf{k}+ \sum _{j=1}^d \frac{1}{{\varepsilon }}\left( \omega _j - \frac{p^{\varepsilon }_j}{p_d^{\varepsilon }}\right) I_j \end{aligned}$$

where \(\mathbf{k}\) runs in \(\mathbb {Z}^d\). Under Assumption 3, we thus have

$$\begin{aligned} \sum _{l \in \mathbb {Z}} \Vert \hat{H}_l^{\varepsilon }\Vert _R \le C_\omega ^\alpha \sum _{j=1}^{d-1} \Vert I_j\Vert _R + M:=\tilde{M} \end{aligned}$$

where \(\tilde{M}\) is independent of \({\varepsilon }\). We can thus state the following theorem:

Theorem 3.3

Consider \(\omega \in [0,1]^d\) with \(\omega _d=1\), \(\omega _i<1\) for \(i=1,\ldots ,d-1\) and \(0<\alpha <1/(d-1)\) such that (2) holds for some constant \(C_\omega ^\alpha \). Suppose that \(K \circ \chi _\theta \) satisfies Assumption 3 and let \(\tilde{M}\) denote the quantity \(\tilde{M} := M + C_\omega ^\alpha \sum _{j=1}^{d-1} \Vert I_j\Vert _R\). Then for any \(({\varepsilon },N) \in ]-{\varepsilon }_0,{\varepsilon }_0[ \times \mathbb {N}^*\) such that \(0 < {\varepsilon }^{\frac{\alpha }{1+\alpha }} (N+1) \le \frac{1}{\tilde{L}}:=\frac{R^2}{8e\tilde{M}}\), the vector field \(F^{[{\varepsilon },N]}\) of Theorem 3.2 is Hamiltonian with Hamiltonian \(\tilde{K}^{[{\varepsilon },N]}\) and there exists a modified invariant \(\tilde{I}^{[{\varepsilon },N]}\) such

$$\begin{aligned} {\mathcal {H}}^{{\varepsilon }}=\frac{1}{{\varepsilon }p^{\varepsilon }_d} \tilde{I}^{[{\varepsilon },N]} + \tilde{K}^{[{\varepsilon },N]} \end{aligned}$$

where the three terms are “almost in involution” in the sense that

  1. 1.

    For all \(u \in {\mathcal {K}}\),

    $$\begin{aligned} |\{ {\mathcal {H}}^{{\varepsilon }}(u), \tilde{I}^{[{\varepsilon },N]}(u) \}| \le \left( \frac{R}{8 e} \right) ^2 \Big ( \tilde{L} \, \, {\varepsilon }^{\frac{\alpha }{1+\alpha }} (N+1)\Big )^{(N+1)}. \end{aligned}$$
    (14)
  2. 2.

    Assume that \(\tilde{L} {\varepsilon }^{\frac{\alpha }{1+\alpha }} \le 1/(2e)\) and choose \(N=N^{[{\varepsilon }]}\) as the integer part of \(\tilde{L}^{-1}{\varepsilon }^{-\frac{\alpha }{1+\alpha }}e^{-1}-1\). Then for all \(u \in {\mathcal {K}}\),

    $$\begin{aligned} |\{ {\mathcal {H}}^{{\varepsilon }}(u), \tilde{I}^{[{\varepsilon },N^{[{\varepsilon }]}]}(u) \}| \le \frac{\tilde{M}}{8 \tilde{L}} \exp \left( - \frac{1}{e \tilde{L} {\varepsilon }^{\frac{\alpha }{1+\alpha }}} \right) . \end{aligned}$$
    (15)

3.3 An illustrative example

As illustration, we consider the version of Fermi–Pasta–Ulam problem discussed in [13] and used as a test problem in [10], which is of the form (12) considered in Sect. 3.2. It concerns a 10-dimensional Hamiltonian system with Hamiltonian function

$$\begin{aligned} {\mathcal {H}}^{\varepsilon }(u) = \frac{\lambda }{{\varepsilon }} I_1(u)+\frac{1}{{\varepsilon }} I_2(u) + K(u) \end{aligned}$$

where \(\lambda =\sqrt{2}\) and with

$$\begin{aligned} I_{1}(u)= & {} \frac{1}{2}\left( \frac{u_4^2}{\lambda }+\lambda \; u_9^2\right) , \\ I_2(u)= & {} \frac{1}{2}(u_1^2+u_6^2) + \frac{1}{2}(u_2^2+u_7^2) + \frac{1}{2}(u_3^2+4 u_8^2), \\ K(u)= & {} \frac{1}{2} (u_5^2+u_{10}^2) + \frac{1}{560} u_6^2 u_{10}^2 + \frac{1}{4900} \left( \frac{\sqrt{70}}{20} + u_6+u_7+\frac{5}{2} u_8 + u_9\right) ^4. \end{aligned}$$

Note that \(\lambda \) appearing in \(I_1\) is considered later on as a fixed value: it will not be replaced in \(I_1\) by its approximation \(p_1/p_2\). As a result, the resulting Hamiltonian system is clearly also of the form (1) as can be seen by writing

$$\begin{aligned} \dot{u} = \frac{\lambda }{{\varepsilon }} A_1 u + \frac{1}{{\varepsilon }} A_2 u + J^{-1} \nabla _u K, \quad A_1= J^{-1} \nabla _u^2 I_1, \quad A_2= J^{-1} \nabla _u^2 I_2 \end{aligned}$$

where the maps \(t \mapsto e^{t A_1}\) and \(t \mapsto e^{t A_2}\) are \(2 \pi \)-periodic. According to previous section, we then split \({\mathcal {H}}^{\varepsilon }\) into two parts

$$\begin{aligned} {\mathcal {H}}^{\varepsilon }(u)= & {} \frac{1}{\mu ^{\varepsilon }} \Big (p_1^{\varepsilon }I_1(u) + p_2^{\varepsilon }I_2(u)\Big ) + \Big ( K(u) + \frac{(\lambda -p_1^{\varepsilon }/p_2^{\varepsilon })}{{\varepsilon }} I_1(u)\Big ), \\= & {} \frac{1}{\mu ^{\varepsilon }} I^{\varepsilon }(u) + K^{\varepsilon }(u), \end{aligned}$$

with \(\mu ^{\varepsilon }= {\varepsilon }p_2^{\varepsilon }\). The change of coordinates \(u=\chi _{\frac{t \mathbf{p^{\varepsilon }}}{\mu ^{\varepsilon }}} (v)\) leads to the new Hamiltonian system

$$\begin{aligned} \dot{v} = \frac{(\lambda -p_1^{\varepsilon }/p_2^{\varepsilon })}{{\varepsilon }} J^{-1} \nabla _v I_1(v) + J^{-1} \nabla _v K_{\frac{t \mathbf{p^{\varepsilon }}}{\mu ^{\varepsilon }}} (v) \quad \text{ where } \quad K_\theta = K \circ \chi _\theta . \end{aligned}$$

Since the solution of an elementary 2-dimensional Hamiltonian system with Hamiltonian \(\frac{1}{2} (\frac{x^2}{\nu }+\nu y^2)\) is given by \(x(t)=\cos (t) \; x_0 -\nu \sin ( t) \; y_0\) and \(y(t)=(\sin ( t)/\nu ) \; x_0 + \cos (t) \; y_0\), the expression of \(K_{(\theta _1,\theta _2)}(v)\) is obtained by replacing in K(v), the coordinates as follows

$$\begin{aligned} \begin{array}{lllllll} v_6 &{} \mapsto &{} \sin (\theta _1) \; v_1 + \cos (\theta _1) \; v_6 &{} \quad &{} v_7 &{} \mapsto &{}\sin (\theta _1) \; v_2 + \cos (\theta _1) \; v_7 \\ v_8 &{} \mapsto &{} (\sin (2\theta _1)/2) \; v_3 + \cos (2\theta _1) \; v_8 &{} \quad &{} v_9 &{} \mapsto &{} (\sin ( \theta _2)/\sqrt{2}) \; v_4 + \cos (\theta _2) \; v_9 \end{array} \end{aligned}$$

leading to

$$\begin{aligned}&K_\theta (v) = \frac{1}{2} (v_5^2+v_{10}^2) + \frac{1}{560} (\sin (\theta _1) \; v_1 + \cos (\theta _1) \; v_6)^2 v_{10}^2 + \frac{1}{4900} \\&\quad \times \left( \frac{\sqrt{70}}{20} + \sin (\theta _1) \; v_1 + \cos (\theta _1) \; v_6+ \sin (\theta _1) \; v_2 + \cos (\theta _1) \; v_7\right. \\&\quad \left. +\frac{5}{2} (\sin (2\theta _1)/2 \; v_3 + \cos (2\theta _1) \; v_8) \right. \left. + (\sin ( \theta _2)/\sqrt{2}) \; v_4 + \cos (\theta _2) \; v_9\right) ^4. \end{aligned}$$

Now, let us note that, according to Proposition 4.1 of Sect. 4 below, estimate (2) holds with \(\alpha =1\). Given that \({\varepsilon }=1/70\), we can approximate \(\sqrt{2}\) by \(17/12=\frac{p_1^{\varepsilon }}{p_2^{\varepsilon }}\) as inferred from the sequence of so-called convergents

$$\begin{aligned} 1,\frac{3}{2}, \frac{7}{5}, \frac{17}{12}, \frac{41}{29},\frac{99}{70},\frac{239}{169},\ldots \end{aligned}$$

for \(\sqrt{2}\). We have indeed \(5< P^{\varepsilon }=1/\sqrt{{\varepsilon }} \approx 8.366 < 12\). Regarding the error

$$\begin{aligned} \left| \sqrt{2}-\frac{7}{5}\right| \approx 0.0142 < 0.0143 \approx \frac{1}{70} = {\varepsilon }, \end{aligned}$$

resulting from the rational approximation we picked up, it is clearly less than \({\varepsilon }C_{\sqrt{2}}^1\) (indeed, \(C_{\sqrt{2}}^1 \le \frac{5}{2}\), see below).

4 Some useful error estimates on diophantine approximation

4.1 The case \(d=2\): rational approximation of a single irrational

We start by showing that, for some irrationals \(\omega \), there exists \(\mathbf{p}=(p_1,p_2) \in (\mathbb {N}^*)^2\) with \(p_2 \le P\), such that an estimate of the following form

$$\begin{aligned} \left| \omega -\frac{p_1}{p_2} \right| \le \frac{C_{\omega }^1}{P^2} \end{aligned}$$
(16)

holds true for some positive constant \(C_{\omega }^1\) depending on \(\omega \) but not on P. If we consider the continued fraction representations \([a_0;a_1,a_2,\ldots ,a_n]\) of a real \(\omega \) for \(n=0,1,\ldots \), two situations occur:

  1. 1.

    if \(\omega \in \mathbb {Q}\), then there exists a finite representation, i.e.

    $$\begin{aligned} \omega =[a_0;a_1,a_2,\ldots ,a_j] \end{aligned}$$

    for some \(j \in \mathbb {N}\). Note that if \(j>0\) then for all \(1 \le i \le j\), \(a_i \ge 1\). Conversely, it is clear that any finite continued fraction is rational.

  2. 2.

    if \(\omega \in \mathbb {R}\backslash \mathbb {Q}\), then \(\omega \) is obtained as the limit

    $$\begin{aligned} \omega =\lim _{n \rightarrow \infty } [a_0;a_1,a_2,\ldots ,a_n] \end{aligned}$$

    and for all \(i \ge 1\), \(a_i \ge 1\). Conversely, any infinite sequence \((a_n)_{n\in \mathbb {N}}\) with \(a_i \ge 1\) for all \(i \ge 1\), defines an element of \(\mathbb {R}\backslash \mathbb {Q}\).

The bound (16) holds true either if \(\omega \in \mathbb {Q}\) or if \(\omega \in \mathbb {R}\backslash \mathbb {Q}\) and \((a_n)_{n \in \mathbb {N}}\) is bounded.

Proposition 4.1

If either \(\omega \in \mathbb {Q}_+\) or \(\omega \in \mathbb {R}_+ \backslash \mathbb {Q}_+\) and \((a_n)_{n \in \mathbb {N}}\) is bounded, then there exists a positive constant \(C_{\omega }^1\) such that

$$\begin{aligned} \forall P \in \mathbb {N}^*, \; \exists \mathbf{p}\in \mathbb {N}^2, \text{ s.t. } p_2 \le P, \, p_1 \wedge p_2 = 1 \quad \text{ and } \quad \left| \omega -\frac{p_1}{p_2}\right| \le \frac{C_{\omega }^1}{P^2}. \end{aligned}$$

Proof

If \(\omega \in \mathbb {Q}_+\) then the estimate is trivially satisfied for a sufficiently large constant \(C_{\omega }^1\). Otherwise, the continued fraction \([a_0;a_1,a_2,\ldots ,]\) defines for all \(n \in \mathbb {N}\) two sequences of positive integers \((h_n)_{n \in \mathbb {N}}\) and \((k_n)_{n \in \mathbb {N}}\) such that

$$\begin{aligned} \forall n \in \mathbb {N}^*, \quad [a_0;a_1,a_2,\ldots ,a_n] = \frac{h_n}{k_n} \text{ with } h_n \wedge k_n = 1. \end{aligned}$$
(17)

It is known that \((h_n)_{n \in \mathbb {N}}\) and \((k_n)_{n \in \mathbb {N}}\) satisfy the recurrence relations (see for instance [15])

$$\begin{aligned} h_{{n}}= & {} a_{n}h_{{n-1}}+h_{{n-2}}, \quad h_{{-1}}=1,\quad h_{{-2}}=0, \\ k_{{n}}= & {} a_{n}k_{{n-1}}+k_{{n-2}}, \quad k_{{-1}}=0, \quad k_{{-2}}=1, \end{aligned}$$

and the error estimates

$$\begin{aligned} \frac{1}{k_n (k_n+k_{n+1})}< \left| \omega - \frac{h_n}{k_n} \right| < \frac{1}{k_n k_{n+1}}. \end{aligned}$$
(18)

Since \(\omega \in \mathbb {R}_+ \backslash \mathbb {Q}_+\), then \((k_n)_{n \in \mathbb {N}}\) is strictly increasing (owing to \(a_n \ge 1\)) and for all \(P \in \mathbb {N}^*\), there exists \(k_n\) such that \(k_n \le P < k_{n+1}\). For this value of P, we have on the one hand

$$\begin{aligned} \frac{1}{k_n k_{n+1}} \le \frac{1}{P^2} \frac{k_{n+1}}{k_n}, \end{aligned}$$

and on the other hand

$$\begin{aligned} \frac{k_1}{k_0}=a_1 \le C_{max} \quad \text{ and } \quad \frac{k_{n+1}}{k_n} \le a_{n+1} + \frac{1}{a_n} \le C_{max} + 1/C_{min} \quad \text{ for } \quad n \ge 1, \end{aligned}$$

so that one can take \(C_{\omega }^1=C_{max} + 1/C_{min}\) where \(C_{max}\) and \(C_{min} \ge 1\) are upper and lower bounds of \((a_n)_{n \in \mathbb {N}^*}\). \(\square \)

Since for irrational solutions of quadratic polynomials with rational coefficients, the sequence \((a_n)_{n \in \mathbb {N}^*}\) is periodic, it is in particular bounded and (16) holds. For instance, we have \(C_{\sqrt{2}}^1 \le 2+1/2=5/2\) and \(C_{\frac{1+\sqrt{5}}{2}}^1 \le 1+1=2\). In contrast, e has a continued fraction with coefficients \(a_{2+3n}=2n+2\), so that we cannot establish the existence of \(C_e^1\) with this technique. Moreover, the existence of \(C_\omega ^1\) can not be assumed for all reals \(\omega \), as the following proposition shows:

Proposition 4.2

For any \(0 < \alpha \le 1\), there exist real numbers \(\omega \in \mathbb {R}_+/\mathbb {Q}_+\) such that

$$\begin{aligned} \limsup _{P \rightarrow +\infty } \left( P^{1+\alpha } \min _{\begin{array}{c}(p_1,p_2) \in (\mathbb {N}^*)^2 \\ p_2 \le P \end{array}} \left| \omega -\frac{p_1}{p_2}\right| \right) = + \infty \end{aligned}$$

Proof

Let \((a_n)_{n \in \mathbb {N}}\) be a sequence of integers satisfying \(a_n \ge 2\) for all \(n \in \mathbb {N}^*\), define \((h_n)_{n \in \mathbb {N}}\) and \((k_n)_{n \in \mathbb {N}}\) by the recurrence relations

$$\begin{aligned} h_{{n}}=a_{n}h_{{n-1}}+h_{{n-2}},&h_{{-1}}=1,&h_{{-2}}=0, \\ k_{{n}}=a_{n}k_{{n-1}}+k_{{n-2}},&k_{{-1}}=0,&k_{{-2}}=1, \end{aligned}$$

and consider the corresponding irrational defined by the continued fraction

$$\begin{aligned} \omega = \lim _{n \rightarrow + \infty } [a_0;a_1,a_2,a_3,\ldots ,a_n] = \lim _{n \rightarrow + \infty } \frac{h_n}{k_n}. \end{aligned}$$

Since \((k_n)_{n \in \mathbb {N}}\) is strictly increasing, for any \(P \in \mathbb {N}^*\), there exists n such that \(k_{n} \le P < k_{n+1}\). It is known that the best rational approximation of \(\omega \) with a denominator less or equal to P is either \(h_n/k_n\) or a rational of the form

$$\begin{aligned} \frac{h_{n-1} + a h_n}{k_{n-1} + a k_n} \end{aligned}$$

with a satisfying \(a_{n+1} \ge a \ge \lfloor a_{n+1}/2 \rfloor \) and \(k_{n-1} + a k_n \le P\). If \(r_{n+1}=\lfloor a_{n+1}/2 \rfloor \ge 1\) and \(P=k_{n-1} + r_{n+1} k_n - 1 \ge k_n\), then the best rational approximation \(p_1/p_2\) with \(p_2 \le P\) is \(\frac{h_{n}}{k_{n}}\). For this value of P, we thus have

$$\begin{aligned} P^{1+\alpha }\left| \omega -\frac{h_{n}}{k_{n}}\right| > \frac{P^{1+\alpha }}{k_n(k_n+ k_{n+1})} = \frac{(k_{n-1} + r_{n+1} k_n - 1)^{1+\alpha }}{k_n(k_n+ k_{n+1})} \end{aligned}$$

and

$$\begin{aligned} \frac{(k_{n-1} + r_{n+1} k_n - 1)^{1+\alpha }}{k_n(k_n+ k_{n+1})}= & {} \frac{(k_{n-1} + r_{n+1} k_n - 1)^{1+\alpha }}{k_n(k_{n-1}+(a_{n+1}+1)k_n)} \ge c a_{n+1}^\alpha k_n^{\alpha -1} \end{aligned}$$

for some \(c>0\) and for sufficiently large n. Taking \(\delta +1=\lfloor 1/\alpha \rfloor +1 > 1/\alpha \) and \(a_{n+1}=k_n^{\delta }\), this gives

$$\begin{aligned} a_{n+1}^\alpha k_n^{\alpha -1} =k_n^{\alpha (\delta +1)-1}, \end{aligned}$$

a sequence that tends to infinity when n tends to infinity. This completes the proof. \(\square \)

Now, since inequality (16) is not satisfied for all reals, the question arises whether it is true for almost all reals. Again, the answer is negative and one can additionally assert that for almost every real, (16) is not satisfied.Footnote 3 However, the following proposition holds true:

Proposition 4.3

Let \(0< \alpha < 1\) be given. For almost every real \(\omega \in [0,1]\), there exists a positive constant \(C_\omega ^\alpha \), such that

$$\begin{aligned} \forall P \in [0,+\infty [, \, \exists \mathbf{p}\in \mathbb {N}^2, \, p_2 \le P, \, p_1 \wedge p_2 = 1 \; \text{ and } \; \left| \omega - \frac{p_1}{p_2} \right| \le \frac{C_\omega ^\alpha }{P^{1+\alpha }}. \end{aligned}$$
(19)

Proof

Consider \((h_n(\omega )/k_n(\omega ))_{n \in \mathbb {N}}\) the series of convergents associated with \(\omega \in (\mathbb {R}_+ \backslash \mathbb {Q}_+) \cap [0,1]\), i.e. \(h_n(\omega )/k_n(\omega )=[0;a_1(\omega ),\ldots ,a_n(\omega )]\) with

$$\begin{aligned} \omega = \lim _{n \rightarrow \infty } [0;a_1(\omega ),\ldots ,a_n(\omega )]. \end{aligned}$$

Given \(\eta =\frac{1-\alpha }{\alpha }>0\), define the sets \((S_n)_{n \in \mathbb {N}^*}\) by

$$\begin{aligned} S_n = \{\omega \in ]0,1[, \; k_{n+1}(\omega ) > k_n(\omega )^{1+\eta } \}. \end{aligned}$$

If \(\omega \) belongs to \(S_n\), then there exists \(p_1\) (\(=h_n(\omega )\)) such that \(1 \le p_1 \le k_n(\omega )\) and satisfying

$$\begin{aligned} \left| \omega -\frac{p_1}{k_n(\omega )} \right|< \frac{1}{k_n(\omega ) k_{n+1}(\omega )} < \frac{1}{k_n(\omega )^{2+\eta }}, \end{aligned}$$

so that

$$\begin{aligned} \mu (S_n) \le \sum _{p_2 \ge \delta r^n} \; \sum _{1 \le p_1 \le p_2} \frac{2}{p_2^{2+\eta }} \le 2 \sum _{p_2 \ge \delta r^n} \; \frac{1}{p_2^{1+\eta }} \end{aligned}$$

where \(\mu \) is the Lebesgue measure on \(\mathbb {R}\). As a matter of fact, for \(\omega \in S_n\), the strict inequality \(k_{n+1}(\omega ) > k_n(\omega )\) implies that \(a_{n+1}(\omega ) \ge 1\), so that for all \(1 \le j \le n\), \(a_j(\omega ) \ge 1\) and \(k_n(\omega ) \ge \delta r^n\) with \(\delta = \frac{1}{\sqrt{5}}\) and \(r=\frac{\sqrt{5}+1}{2}>1\). Now, since \(\eta >0\), we thus have

$$\begin{aligned} \sum _{n \ge 1} \mu (S_n) < + \infty , \end{aligned}$$

and owing to Borel-Cantelli’s theorem

$$\begin{aligned} \mu (\limsup _n S_n) = 0. \end{aligned}$$

As a consequence, for almost every \(\omega \in [0,1]\), \(\omega \notin \limsup _n S_n\), that is to say, for almost every \(\omega \in ]0,1[\), there is only a finite number of indices \(n \in \mathbb {N}^*\) such that \(\omega \in S_n\). In other terms, for almost every \(\omega \in ]0,1[\), there exists \(j(\omega ) \in \mathbb {N}^*\) such that

$$\begin{aligned} \forall n \ge j(\omega ), \quad k_{n+1}(\omega ) \le k_n(\omega )^{1+\eta }. \end{aligned}$$
(20)

Eventually, given \(\omega \) satisfying (20), and \(P \ge k_{j(\omega )}\), consider \(n \ge j(\omega )\) such that \(k_n(\omega ) \le P < k_{n+1}(\omega )\). Then we have

$$\begin{aligned} \left| \omega -\frac{h_n(\omega )}{k_n(\omega )} \right| < \frac{1}{k_n(\omega ) k_{n+1}(\omega )} \le \frac{1}{P^{1+\frac{1}{1+\eta }}} = \frac{1}{P^{1+\alpha }}. \end{aligned}$$

\(\square \)

4.2 Simultaneous approximation of a vector of irrationals

Whenever more than one frequency have to be approximated, the situation is getting more involved. The so-called problem of simultaneous rational approximation is notoriously more difficult in dimension \(d \ge 3\) for essentially one key-aspect, namely the absence of a continued fraction algorithm and of its associated relations. However, the result obtained in previous proposition can be generalized without too much difficulty if we content ourselves with a non-constructive sequence of best approximations, defined as follows (in the sequel, we write \(r=d-1 > 1\) and \(\tilde{\omega }=(\omega _1,\ldots , \omega _{d-1})\) for a better readability):

Definition 4.4

Let \(\tilde{\omega } \in [0,1]^r\). The strictly positive integer q is said to be a best approximation of \(\tilde{\omega }\) if and only if

$$\begin{aligned} \forall 0< k< q, \quad \min _{\mathbf{p} \in \mathbb {Z}^{r}} \Vert q \, \tilde{\omega }-\mathbf{p}\Vert _\infty < \min _{\mathbf{p} \in \mathbb {Z}^{r}} \Vert k \, \tilde{\omega }-\mathbf{p}\Vert _\infty \end{aligned}$$

where \(\mathbf{p}=(p_1, \ldots ,p_r)\).

The proof of Proposition 4.5 uses three results that we now quote separately in anticipation:

  • The so-called fundamental inequality, obtained by several authors (see for instance [16, 17] for a slightly more general version than the one exposed here), which generalizes the error estimate (18) for \(k_n\), states that, for \(\tilde{\omega } \notin \mathbb {Q}_+^r\), there exists a strictly growing sequence of integers \((q_n)_{n \in \mathbb {N}}\) (the sequence of best approximations) such that

    $$\begin{aligned} \min _{\mathbf{p} \in \mathbb {Z}^r} \Vert q_n \tilde{\omega }-\mathbf{p}\Vert ^r_\infty \le \frac{1}{q_{n+1}}. \end{aligned}$$
  • For any \(\tilde{\omega } \notin \mathbb {Q}_+^r\), there exists a constant \(\lambda >1\) such that

    $$\begin{aligned} \forall n \ge 0, q_n \ge \lambda ^n. \end{aligned}$$
    (21)

    This result is a consequence of the stronger estimate derived in [16]: For any \(\tilde{\omega } \notin \mathbb {Q}_+^r\),

    $$\begin{aligned} \lim _{n \rightarrow +\infty } \inf (q_n)^{1/n} \ge 1+\frac{1}{2^{r+1}}. \end{aligned}$$
  • The Borel-Cantelli’s theorem which states that for any sequence of sets \(A_n \subset \mathbb {R}^d\) such that

    $$\begin{aligned} \sum _{n \ge 0} \mu (A_n) < +\infty \end{aligned}$$

    one has \(\mu (\limsup _{n \rightarrow +\infty } A_n)=0\) where \(\mu \) denotes here the Lebesgue measure on \(\mathbb {R}^d\).

Proposition 4.5

Let \(0< \alpha < 1/r\) be given. For almost every real \(\tilde{\omega }\) in \(]0,1]^r\), there exists a positive constant \(C_{\tilde{\omega }}^\alpha \), such that

$$\begin{aligned}&\forall Q \in [1,+\infty [, \, \exists q \le Q, \, \exists \mathbf{p} \in \mathbb {N}^r \; s.t. \; p_1 \wedge \cdots \wedge p_r \wedge q=1, \; \\&\quad \max _{i=1,\ldots ,r} \left| \tilde{\omega }_i- \frac{p_i}{q} \right| \le \frac{C_{\tilde{\omega }}^\alpha }{Q^{1+\alpha }}. \end{aligned}$$

Proof

For \(\tilde{\omega } \notin \mathbb {Q}_+^r\), consider the sequence \((q_n(\tilde{\omega }))_{n \in \mathbb {N}}\) of best approximations and define for \(\eta =\frac{1/r-\alpha }{1-1/r+\alpha }>0\), the sets \((A_n)_{n \in \mathbb {N}}\) by

$$\begin{aligned} A_n = \{\tilde{\omega } \in [0,1]^r, \; \tilde{\omega } \notin \mathbb {Q}_+^r, \; q_{n+1}(\tilde{\omega }) > q_n(\tilde{\omega })^{1+\eta } \}. \end{aligned}$$

If \(\tilde{\omega }\) belongs to \(A_n\), then there exists \(\mathbf{p}=(p_1,\ldots ,p_r) \in \mathbb {N}^r\) such that for all \(i=1,\ldots ,r\), \(0 \le p_i \le q_n(\tilde{\omega })-1\) and satisfying

$$\begin{aligned} \min _{i=1,\ldots ,r} \left| \tilde{\omega }_i-\frac{p_i}{q_n(\tilde{\omega })} \right| \le \frac{1}{q_n(\tilde{\omega }) q^{1/r}_{n+1}(\tilde{\omega })} < \frac{1}{q_n(\tilde{\omega })^{\frac{r+1+\eta }{r}}}. \end{aligned}$$

Any such \(\tilde{\omega }\) belongs to a ball (w.r.t. to the \(\Vert \cdot \Vert _\infty \)-norm) \(B(\mathbf{p}/q,\rho )\) with radius \(\rho \le 1/q_n(\tilde{\omega })^{\frac{r+1+\eta }{r}}\) and center \(\mathbf{p}/q\) such that \(\mathbf{p}=(p_1,\ldots ,p_r)\), \(1 \le p_i \le q\) (\(i=1,\ldots ,r\)), and, owing to (21), \(q \ge \lambda ^n\). Hence, we have

$$\begin{aligned} \mu (A_n) \!\le \!\sum _{q \ge \lambda ^n} \; \sum _{1 \le p_1 \le q} \ldots \sum _{1 \le p_r \le q} \left( \frac{2}{q^{\frac{r+1+\eta }{r}}}\right) ^r \le \sum _{q \ge \lambda ^n} \; q^r \left( \frac{2}{q^{\frac{r+1+\eta }{r}}}\right) ^r \\!leq \!2^r \sum _{q \ge \lambda ^n} \; \frac{1}{q^{1+\eta }} \end{aligned}$$

where \(\mu \) is the Lebesgue measure on \(\mathbb {R}^r\). Now, since \(\eta >0\) and \(\lambda >1\), we have

$$\begin{aligned} \sum _{n \ge 0} \mu (A_n) < + \infty , \end{aligned}$$

and by Borel-Cantelli’s theorem

$$\begin{aligned} \mu (\limsup _n A_n) = 0. \end{aligned}$$

As in Proposition 4.3, for almost every \(\tilde{\omega } \in ]0,1]^r\), there exists \(j(\tilde{\omega }) \in \mathbb {N}\) such that

$$\begin{aligned} \forall n \ge j(\tilde{\omega }), \quad q_{n+1}(\tilde{\omega }) \le q_n(\tilde{\omega })^{1+\eta }. \end{aligned}$$
(22)

Eventually, given \(\tilde{\omega }\) satisfying (22), and \(Q \ge q_{j(\tilde{\omega })}\), consider \(n \ge j(\tilde{\omega })\) such that \(q_n(\tilde{\omega }) \le Q < q_{n+1}(\tilde{\omega })\). Then we have

$$\begin{aligned} \min _{\mathbf{p} \in \mathbb {N}^r} \left\| \tilde{\omega }-\frac{\mathbf{p}}{q_n(\tilde{\omega })} \right\| _\infty {<} \frac{1}{q_n(\tilde{\omega }) q^{1/r}_{n+1}(\tilde{\omega })} \le \frac{1}{Q^{\frac{1}{r}+\frac{1}{1+\eta }}} = \frac{1}{Q^{1+\alpha }}. \end{aligned}$$

\(\square \)

Taking into account the shift \(r=d-1\) and the fact that \(\omega _d\) is assumed to be 1, this proposition proves our estimate (2).

5 Numerical experiments

In this section, we present some numerical experiments that show the efficiency of our strategy. We shall consider two different problems and two different methods. The problems are, on the one hand, the Fermi–Pasta–Ulam described in [13] and exposed in Section 5.1, and on the other hand, a multi-component Schrödinger equation. As for the methods, we shall use, on the one hand, the multi-revolution composition method (MRCM), introduced in [6], and on the other hand, the two-scale method (TSM) introduced in [5]. Both methods have been originally designed for mono-frequency problems and, in order to handle the two aforementioned test-cases, we apply the strategy exposed in this paper. Let us briefly present the main ideas underlying the two techniques:

  1. (i)

    MCRMs: the flow corresponding to the integration over one period of time of a differential equation of the form \(\dot{u}^{\varepsilon }= f_{t/{\varepsilon }}(u^{\varepsilon })\) (with f periodic in \(t/{\varepsilon }\)) is a near-identity map \(\varphi _{\varepsilon }: \mathbb {R}^m \rightarrow \mathbb {R}^m\). Computing the exact solution over N periods thus amounts to computing the Nth iterate \(\varphi _{\varepsilon }^N\) of \(\varphi _{\varepsilon }\). The idea of MRCMs consists in approximating \(\varphi _{\varepsilon }^N\) by a composition of the form

    $$\begin{aligned} \varphi _{\varepsilon }^N = \varphi _{\alpha _1 H} \circ \varphi ^*_{\beta _1 H} \circ \cdots \circ \varphi _{\alpha _s H} \circ \varphi ^*_{\beta _s H} +{\mathcal {O}}({\varepsilon }^{p+1}), \qquad H=N {\varepsilon }, \end{aligned}$$

    where \(\varphi _{\varepsilon }^* := (\varphi _{-{\varepsilon }})^{-1}\) and where p is made as high as possible by choosing appropriate coefficients \(\alpha \)’s and \(\beta \)’s (and letting them depend on N). Whenever \(s \ll N\), the computational effort is considerably reduced. In fact, a careful analysis shows that for \({\varepsilon }\) small enough, the overall cost is independent of \({\varepsilon }\), whereas it typically grows like \(1/{\varepsilon }\) for standard integration methods. Here, we shall use the fourth-order (\(p=4\)) MRCM of [6], where \(\varphi _{\varepsilon }\) itself is approximated by a Strang splitting method.

  2. (ii)

    TSMs: in two-scale methods for \(\dot{u}^{\varepsilon }= f_{t/{\varepsilon }}(u^{\varepsilon })\), the solution is sought as the diagonal \(\tau =t/{\varepsilon }\) of an approximation of \(U^{\varepsilon }(t,\tau )\) satisfying the transport equation

    $$\begin{aligned} \partial _t U^{\varepsilon }(t,\tau ) +\frac{1}{{\varepsilon }} \partial _\tau U^{\varepsilon }(t,\tau ) = f_\tau (U^{\varepsilon }(t,\tau )). \end{aligned}$$

    The main idea is then that the initial condition \(U^{\varepsilon }(0,\tau )\) can be chosen in such a way that all derivatives of \(U^{\varepsilon }(t,\tau )\) remain bounded w.r.t. to \({\varepsilon }\) up to some arbitrary order p, thus allowing for the construction of uniformly accurate methods of order \(p-1\). In this section, we shall consider the uniformly second-order method obtained in [5].

Both techniques have been designed for mono-frequency highly-oscillatory problems, the first one (MRCM) in the context of ordinary differential equations and the second one (TSM) originally for kinetic equations and later on for the Schrödinger equation. In the aforementioned situations, they are capable of delivering numerical approximations with constant accuracy and constant cost w.r.t. \({\varepsilon }\) in the limit where \({\varepsilon }\) tends to zero. MRCMs are in addition provably geometric, while TSMs are not, even though they often behave likewise. The situation is reversed as far as uniform accuracy is concerned: MRCMs are strictly speaking not uniformly accurate, while TSMs are. It is thus enlightening to study whether MRCMs preserve, as predicted in this paper, the energy of Hamiltonian systems, and similarly to test whether TCMs behave correctly. The other part of our tests aims at assessing the extent to which TCMs remain uniformly accurate. The Strang method with tiny step-sizes is used here to obtain a very accurate reference solution in all experiments. In comparison, both MRCMs and TSMs become competitive for \({\varepsilon }\le 10^{-4}\) with the FPU problem and \({\varepsilon }\le 10^{-3}\) with the system of coupled Schrödinger equations.

5.1 A Fermi–Pasta–Ulam system with two frequencies

In this subsection, we consider the Hamiltonian system with a finite degrees of freedom \(q\in \mathbb {R}^5\), \(p\in \mathbb {R}^5\), borrowed from [13] and used in [10]:

$$\begin{aligned} H(p,q)= & {} \lambda _1\left( \frac{p_1^2}{2}+\frac{q_1^2}{2}\right) +\sum _{j=2}^5\left( \frac{p_j^2}{2{\varepsilon }}+\frac{\lambda _j^2 q_j^2}{2{\varepsilon }}\right) + U(q),\\ U(q)= & {} \frac{\delta ^2}{8}q_1^2q_2^2+\delta ^4\left( \frac{\sqrt{70}}{20}+q_2+q_3+\frac{5}{2}q_4+q_5\right) ^4, \end{aligned}$$

with

$$\begin{aligned} \lambda _1=1,\qquad \lambda _2=\lambda _3=1,\qquad \lambda _4=2,\qquad \lambda _5=\sqrt{2} \end{aligned}$$

and

$$\begin{aligned} \delta= & {} 1/70,\quad q(0)=(1,0.3\delta ,0.8\delta ,0.7\delta ,-1.1\delta ),\\ p(0)= & {} (-0.2,0.6\delta ,0.7\delta ,0.8\delta ,-0.9\delta ). \end{aligned}$$

5.1.1 Energy exchanges

We observe the evolution over a long time of the quantities

$$\begin{aligned} I_1=\lambda _1\left( \frac{p_1^2}{2}+\frac{q_1^2}{2}\right) ,\qquad I_j=\frac{p_1^2}{2}+\frac{\lambda _j^2 q_1^2}{2},\quad j=2,\ldots ,5, \end{aligned}$$

computed with three methods:

  • the Strang splitting method (Fig. 1) with the time-step \(\Delta t=\frac{2\pi }{16}{\varepsilon }\); such a step makes the approximation accurate enough to regard the solution as ’exact’. This is indeed our reference solution.

  • the MCRM [6] of order 4, with \(N=60\) and with the micro time-step \(\Delta t=\frac{2\pi }{16}q\) for the micro-integrator over one period \([0,2\pi ]\), which represents a computational gain of a factor 10 compared to the direct Strang splitting method (Fig. 2);

  • the TSM [5] of second-order, implemented with the implicit mid-point scheme (Fig. 3), with the time-step \(\Delta t=\frac{2\pi }{16}\) and 32 discretization points in the variable \(\tau \).

Fig. 1
figure 1

(FPU, \(d=1\)) energy exchanges, Strang splitting method

Fig. 2
figure 2

(FPU, \(d=1\)) energy exchanges, multirevolution composition method

Fig. 3
figure 3

(FPU, \(d=1\)) energy exchanges, two-scale method

We take \({\varepsilon }=10^{-3}\) and, for the two latter methods, \(p=41\) and \(q=29\). It is apparent from Figs. 2 and 3 that the energy exchanges are well reproduced by both the MRCM and the TSM. In next section, we now investigate the accuracy of both methods.

5.1.2 Accuracy of the MRCM

On Fig. 4, we plot the error for the MRCMs of order 1, 2 and 4 of [6], as a function of the macrostep \(H=q{\varepsilon }N\) for two values of \({\varepsilon }\) (\({\varepsilon }=4\times 10^{-5}\) and \({\varepsilon }=10^{-5}\)). For varying \({\varepsilon }\), note that \(q{\varepsilon }\approx \sqrt{{\varepsilon }}\) and that by choosing \(N \approx 1/\sqrt{{\varepsilon }}\) the error remains essentially constant while the computational cost grows like \(1/\sqrt{{\varepsilon }}\). This, of course, compares favorably with the \(1/{\varepsilon }\) increase observed for standard methods such as Strang.

Fig. 4
figure 4

(FPU, \(d=1\)) error versus macrostep for \(\epsilon =4\times 10^{-5}\) (left) and \(\epsilon =10^{-5}\) (right)

5.1.3 Uniform accuracy of the two-scale method

The goal is here to observe the uniform second order accuracy of the TSM. The final time is taken equal to \(2\pi \) and the number of discretization points for the \(\tau \)-variable is \(\max (64,16p)\). The values of p and q in the approximation \(\frac{p}{q}\) of \(\lambda _5=\sqrt{2}\),as well as the value of the remainder \(Err:=\frac{1}{{\varepsilon }}|\sqrt{2}-\frac{p}{q}|\), are given in the following table: they are obtained by a continued fraction algorithm.

\({\varepsilon }\)

0.64

0.32

0.16

0.08

0.04

0.02

0.01

0.005

0.0025

0.00125

0.000625

p

1

1

3

3

7

7

7

17

17

17

41

q

1

1

2

2

5

5

5

12

12

12

29

Err

0.64

1.29

0.54

1.07

0.36

0.71

1.42

0.49

0.98

1.96

0.67

\({\varepsilon }\)

\(3.12* 10^{-4}\)

\(1.56* 10^{-4}\)

\(7.81* 10^{-5}\)

\(3.91* 10^{-5}\)

\(1.95* 10^{-5}\)

\(9.77* 10^{-6}\)

p

41

99

99

99

239

239

q

29

70

70

70

169

169

Err

1.34

0.46

0.92

1.85

0.63

1.27

On the left picture of Fig. 5, we plot the error as a function of the time-step \(\Delta t\), for different values of \({\varepsilon }\) and on right picture of Fig. 5, the error as a function of \({\varepsilon }\), for different values of the time-step \(\Delta t\). This is in perfect agreement with the predicted uniform accuracy of the method. Note that the small peaks correspond to the highest values of the remainder \(\frac{1}{{\varepsilon }}|\sqrt{2}-\frac{p}{q}|\).

Fig. 5
figure 5

(FPU, \(d=1\)) left error as a function of \(\Delta t\) for \({\varepsilon }=2^N\times 10^{-2}\), with \(N\in \{6,\ldots ,1,0,-1,\ldots ,-10\}\). Right error as a function of \({\varepsilon }\) for \(\Delta t=2\pi /2^N\) with \(N\in \{6,\ldots ,16\}\)

5.2 A Fermi–Pasta–Ulam system with three frequencies

In this subsection, we consider the same FPU system as in the above Sect. 5.1, but with the frequencies

$$\begin{aligned} \lambda _1=1,\qquad \lambda _2=\lambda _3=1,\qquad \lambda _4=\frac{\pi }{2},\qquad \lambda _5=\sqrt{2}. \end{aligned}$$
Fig. 6
figure 6

(FPU, \(d=2\)) energy exchanges, Strang splitting method

5.2.1 Energy exchanges

We observe the evolution over a long time of the quantities

$$\begin{aligned} I_1=\lambda _1\left( \frac{p_1^2}{2}+\frac{q_1^2}{2}\right) ,\qquad I_j=\frac{p_1^2}{2}+\frac{\lambda _j^2 q_1^2}{2},\quad j=2,\ldots ,5, \end{aligned}$$

computed with again the three methods:

  • the Strang splitting method (Fig. 6) with the time-step \(\Delta t=\frac{2\pi }{16}{\varepsilon }\);

  • the MCRM [6] of order 4, with \(N=60\) and with the micro time-step \(\Delta t=\frac{2\pi }{16q}\) for the micro-integrator over one period \([0,2\pi ]\), which represents again a computational speed-up of 10 compared to the direct Strang splitting method (Fig. 7);

  • the TSM [5], implemented with the implicit second-order mid-point scheme (Fig. 8), with time-step \(\Delta t=\frac{2\pi }{16}\) and 64 discretization points in the variable \(\tau \). We observe a computational speed-up of 2.5 compared to the Strang splitting method.

For these simulations, we have taken \({\varepsilon }=10^{-3}\), and the rational approximations \(\lambda _4=\frac{\pi }{2}\approx \frac{110}{70}\) and \(\lambda _5=\sqrt{2}\approx \frac{99}{70}\), which give

$$\begin{aligned} \frac{1}{{\varepsilon }}\left| \lambda _4-\frac{p_4}{q}\right| \approx 0.63,\qquad \frac{1}{{\varepsilon }}\left| \lambda _5-\frac{p_5}{q}\right| \approx 0.07. \end{aligned}$$
Fig. 7
figure 7

(FPU, \(d=2\)) energy exchanges, multirevolution composition method

Fig. 8
figure 8

(FPU, \(d=2\)) energy exchanges, two-scale method

5.2.2 Uniform accuracy of the two-scale method

Again, we wish here to observe the uniform accuracy of the two-scale method. The final time is \(2\pi \), the number of discretization points for the \(\tau \) variable is \(\max (64,16q)\). The values of \(p_4\) \(p_5\) and q in the approximations \(\frac{p_4}{q}\) and \(\frac{p_5}{q}\) of \(\lambda _4=\frac{\pi }{2}\) and \(\lambda _5=\sqrt{2}\), as well as the remainder \(\frac{1}{{\varepsilon }}|\lambda _4-\frac{p_4}{q}|+\frac{1}{{\varepsilon }}|\lambda _5-\frac{p_5}{q}|\) are given in the following table. These values are those which minimize this remainder under the constraint \({\varepsilon }q^{3/2} \le 1\).

\({\varepsilon }\)

0.64

0.32

0.16

0.08

0.04

0.02

0.01

\(5\times 10^{-3}\)

\(2.5\times 10^{-3}\)

\(1.25\times 10^{-3}\)

\(p_4\)

2

3

3

8

11

11

11

53

80

110

\(p_5\)

1

3

3

7

10

10

10

48

72

99

q

1

2

2

5

7

7

7

34

51

70

remainder

1.32

0.49

0.98

0.54

0.37

0.75

1.5

2.88

1.85

0.56

\({\varepsilon }\)

\(6.25\times 10^{-4}\)

\(3.12\times 10^{-4}\)

\(1.56\times 10^{-4}\)

\(7.81\times 10^{-5}\)

\(3.91\times 10^{-5}\)

\(p_4\)

201

311

421

732

732

\(p_5\)

181

280

379

659

659

q

128

198

268

466

466

remainder

1.02

0.52

0.86

0.89

1.78

On the left of Fig. 9, we plot the error as a function of the time-step \(\Delta t\), for different values of \({\varepsilon }\) and on the right of Fig. 9, the error as a function of \({\varepsilon }\), for different values of the time-step \(\Delta t\).

Fig. 9
figure 9

(FPU, \(d=1\)) Left error as a function of \(\Delta t\) for \({\varepsilon }=2^N\times 10^{-2}\), with \(N\in \{6,\ldots ,1,0,-1,\ldots ,-10\}\). Right error as a function of \({\varepsilon }\) for \(\Delta t=2\pi /2^N\) with \(N\in \{6,\ldots ,16\}\)

Fig. 10
figure 10

Energy exchanges for \({\varepsilon }=0.0001\), computed with the Strang splitting method (plain lines) and the MRCM (circles) with \(N=60\)

5.3 Three coupled nonlinear Schrödinger equations

In this section, we consider a multi-component non-linear Schrödinger system posed in infinite dimension, which models multi-component Bose-Einstein condensates. Roughly speaking, harmonic oscillators are here replaced by Laplacian operators with periodic boundary conditions. The interested reader may find more details on the physical aspects of the model under consideration in references [2] and [14]. The important point therein is that different components may have different “trapping” potentials and thus oscillate with different frequencies. In this section, we shall use as test problem the following coupled system of three non-linear Schrödinger equations, where the components \(u_1\), \(u_2\) and \(u_3\) are discretized in x by trigonometric polynomials (accordingly Fast Fourier Transform (FFT) is used in our numerical experiments):

$$\begin{aligned}&i\partial _t u_1(t,x)=-\frac{\omega _1}{{\varepsilon }}\Delta u_1(t,x)\\&\quad +\left( \alpha _{11}(x)|u_1(t,x)|^2+\alpha _{12}(x)|u_2(t,x)|^2+\alpha _{13}(x)|u_3(t,x)|^2\right) u_1(t,x)\\&i\partial _t u_2(t,x)=-\frac{\omega _2}{{\varepsilon }}\Delta u_2(t,x)\\&\quad +\left( \alpha _{12}(x)|u_1(t,x)|^2+\alpha _{22}(x)|u_2(t,x)|^2+\alpha _{23}(x)|u_3(t,x)|^2\right) u_2(t,x)\\&i\partial _t u_3(t,x)=-\frac{\omega _3}{{\varepsilon }}\Delta u_3(t,x)\\&\quad +\left( \alpha _{13}(x)|u_1(t,x)|^2+\alpha _{23}(x)|u_2(t,x)|^2+\alpha _{33}(x)|u_3(t,x)|^2\right) u_3(t,x) \end{aligned}$$

on the interval \([0,2\pi ]\), with periodic boundary conditions and the following set of coefficients:

$$\begin{aligned} \omega _1=\omega _2=1,\quad \omega _3=\sqrt{2},\quad \alpha _{11}(x)=2\cos (2x),\quad \alpha _{12}=\alpha _{13}=\alpha _{22}=\alpha _{23} \equiv 1, \end{aligned}$$

and with initial data

$$\begin{aligned} u_1(0,x)=\frac{1}{2}+\frac{4}{10}e^{-ix},\quad u_2(0,x)=\frac{1}{4}+\frac{4}{10}e^{ix},\quad u_3(0,x)=\frac{1}{4}+\frac{6}{10}e^{ix}. \end{aligned}$$
Fig. 11
figure 11

Energy exchanges for \({\varepsilon }=0.0001\), computed with the two-scale method

Fig. 12
figure 12

Left \(L^2\) error versus \(\Delta t\) for \({\varepsilon }=2^N\times 10^{-2}\), with \(N\in \{6,\ldots ,1,0,-1,\ldots ,-6\}\). Right \(L^2\) error versus \({\varepsilon }\) for \(\Delta t=2\pi /2^N\) with \(N\in \{9,\ldots ,16\}\)

5.3.1 Energy exchanges

We observe on Figs. 10 and 11 the evolution of the total energy and of

$$\begin{aligned} I_j=\omega _j\int _0^{2\pi } |\nabla u_j|^2dx, \end{aligned}$$

computed by three methods, for \({\varepsilon }=10^{-4}\):

  • the Strang splitting method with the time-step \(\Delta t=\frac{2\pi }{32}{\varepsilon }\);

  • the MCRM [6] of order 4, with \(N=60\) and with the micro time-step \(\Delta t=\frac{2\pi }{32q}\) for the micro-integrator over one period \([0,2\pi /q]\), which represents a computational gain of a factor 10 compared to the direct Strang splitting method;

  • the TSM [5], with micro time step T / 128 and 2048 discretization points in \(\tau \). We observe a computational gain of a factor 5 compared to the Strang splitting method.

For the three methods, we take 32 discretization points for the x variable.

5.3.2 Uniform accuracy the two-scale method

Finally, we check here the uniform accuracy of the two-scale method. The final time is 0.2, the number of discretization points is 32 in x and 4096 in \(\tau \). The values of p and q in the approximation \(\frac{p}{q}\) of \(\sqrt{2}\) are the same as given in table of Sect. 5.1 (Fig. 12).