In recent decades, the numerical simulation for nonlinear oscillators has received much attention and a large number of integrators for oscillatory problems have been developed. In this chapter, based on the continuous finite element approach, we propose and analyse new energy-preserving functionally-fitted, in particular, trigonometrically-fitted methods of an arbitrarily high order for solving oscillatory nonlinear Hamiltonian systems with a fixed frequency. In order to implement these new methods in an accessable and efficient style, they are formulated as a class of continuous-stage Runge–Kutta methods. The numerical results demonstrate the remarkable accuracy and efficiency of the new methods compared with the existing high-order energy-preserving methods in the literature.

1.1 Introduction

It is known that an important area of numerical analysis and scientific computing is geometric numerical integration for differential equations. In this chapter, we consider nonlinear Hamiltonian systems:

$$\begin{aligned} \dot{y}(t)=f(y(t))=J^{-1}\nabla H(y(t)),\quad y(t_{0})=y_{0}\in \mathbb {R}^{d}, \end{aligned}$$
(1.1)

where \(y\in \mathbb {R}^d,~d=2d_{1},~ f: \mathbb {R}^{d}\rightarrow \mathbb {R}^{d}, H : \mathbb {R}^{d}\rightarrow \mathbb {R}\) are sufficiently smooth functions and

$$\begin{aligned} J=\left( \begin{array}{cc}O_{d_{1}\times d_{1}}&{}I_{d_{1}\times d_{1}}\\ -I_{d_{1}\times d_{1}}&{}O_{d_{1}\times d_{1}}\end{array}\right) \end{aligned}$$

is the canonical symplectic matrix. It is well known that the flow of (1.1) preserves the symplectic form \(\mathrm{d}y\wedge J\mathrm{d}y\) and the Hamiltonian or energy H(y(t)). In the spirit of geometric numerical integration, it is a natural idea to design schemes that preserve both the symplecticity of the flow and the energy. Unfortunately, however, a numerical scheme cannot achieve this goal unless it generates the exact solution (see, e.g. [23], p. 379). Hence, researchers face a choice between preserving symplecticity or preserving energy, and many of them have given more weight to the former in the last decades, and readers are referred to [23] and references therein. Despite insufficient work in the literature on energy-preserving (EP) methods (see, e.g. [1, 4, 6, 10, 11, 17, 19, 21, 29, 38]), EP methods compared with symplectic methods have better nonlinear stability properties, are easier to adapt the time step for, and are more suitable for the integration of chaotic systems (see, e.g. [12, 20, 35, 36]).

On the other hand, in scientific computing and modelling, the design and analysis of methods for periodic or oscillatory systems has been considered by many authors (see, e.g. [2, 18, 22, 34, 42, 46]). Generally, these methods utilize a priori information of special problems and they are more efficient than general-purpose methods. A popular approach to constructing methods suitable for oscillatory problems is using the functionally-fitted (FF) condition, namely, deriving a suitable method by requiring it to integrate members of a given finite-dimensional function space X exactly. If X incorporates trigonometrical or exponential functions, the corresponding methods are also called trigonometrically-fitted (TF) or exponentially-fitted (EF) methods (see, e.g. [15, 27, 32, 37]).

Therefore, combining the ideas of the EF/TF and structure-preserving methods is a promising approach to developing numerical methods which allow long-term computation of solutions to oscillatory Hamiltonian systems (1.1). Just as the research of symplectic and EP methods, EF/TF symplectic methods have been studied extensively by many authors (see, e.g. [7,8,9, 16, 39, 40, 43]). By contrast, as far as we know, only a few papers paid attention to the EF/TFEP methods (see, e.g. [30, 31, 41]). Usually the existing EF/TFEP methods are derived in the context of continuous-stage Runge–Kutta (RK) methods. The coefficients in these methods are determined by a system of equations resulting from EF/TF, EP and symmetry conditions. As mentioned at the end of [30], it is not easy to find such a system with a unique solution when deriving high-order methods. Furthermore, how to verify the algebraic order of such methods falls into question. A common way is to check the order conditions related to rooted trees. Again, this is inconvenient in the high-order setting since the number of trees increases extremely fast as the order grows. In this chapter, we will construct FFEP methods based on the continuous finite element method, which is inherently energy preserving (see, e.g. [1, 17, 38]). Intuitively, we expect to increase the order of the method through enlarging the finite element space. By adding trigonometrical functions to the space, the corresponding method is naturally trigonometrically fitted. Thus, we are hopeful of constructing FFEP methods, in particular TFEP methods, of arbitrarily high orders.

This chapter is organized as follows. In Sect. 1.2, we construct functionally fitted continuous finite element (FFCFE) methods and present their most important geometric properties. In Sect. 1.3, we interpret them as continuous-stage Runge–Kutta methods and analyse the algebraic order. We then discuss implementation details of these new methods in Sect. 1.4. Numerical results are shown in Sect. 1.5, including the comparison between our new TFEP methods and other prominent structure-preserving methods in the literature. The last section is concerned with the conclusion and discussion.

1.2 Functionally-Fitted Continuous Finite Element Methods for Hamiltonian Systems

Throughout this chapter, we consider the approximation of the solution of the IVP (1.1) on the time interval \(I=[t_{0},T]\). Let S be a linear space of continuous functions y(t) on the interval I. Let \(\{\varphi _{i}\}_{i=0}^{r-1}\) be a family of sufficiently smooth and linearly independent real-valued functions on I, and let Y be the subspace spanned by \(\{\varphi _{i}\}_{i=0}^{r-1}\):

$$\begin{aligned} Y=\left\{ w : w(t)=\sum _{i=0}^{r-1}W_{i}\varphi _{i}(t), W_{i}\in \mathbb {R}^{d}\right\} . \end{aligned}$$

We assume that the interval \(I=[t_0,T]\) is equally partitioned into \(t_{0}<t_{1}<\ldots <t_{N}=T\), with \(t_{n}=t_{0}+nh\) for \(n=0,1,\ldots ,N\). A function w on I is called a piecewise Y-type function if for any \(0\le n\le N-1\), there exists a function \(g\in Y\), such that

$$w|_{(t_{n},t_{n+1})}=g|_{(t_{n},t_{n+1})}.$$

It is convenient to introduce the transformation \(t=t_{0}+\tau h\) for \(\tau \in [0,1]\) in the following analysis. Accordingly, we denote

$$Y_{h}(t_{0})=\left\{ v \text { on } [0,1] : v(\tau )=w(t_{0}+\tau h),~ w\in Y\right\} .$$

Hence,

$$Y_{h}(t_{0})=\text {span}\left\{ \tilde{\varphi }_{0},\ldots ,\tilde{\varphi }_{r-1}\right\} ,$$

where \(\tilde{\varphi }_{i}(\tau )=\varphi _{i}(t_{0}+\tau h)\) for \(i=0,1,\ldots ,r-1\). In what follows, lowercase Greek letters such as \(\tau ,\sigma ,\alpha \) always indicate variables on the interval [0,1] unless confusions arise.

Given two integrable functions (scalar-valued or vector-valued) \(w_{1}\) and \(w_{2}\) on [0, 1], the inner product \(\langle \cdot ,\cdot \rangle \) is defined by

$$\begin{aligned} \langle w_{1},w_{2}\rangle =\langle w_{1}(\tau ),w_{2}(\tau )\rangle _{\tau }=\int _{0}^{1}w_{1}(\tau )\cdot w_{2}(\tau )d\tau , \end{aligned}$$

where \(\cdot \) is the entrywise multiplication operation if \(w_{1},w_{2}\) are both vector-valued functions of the same length.

Given two finite-dimensional function spaces X and Y whose members are \(\mathbb {R}^{d}\)-valued, the continuous finite element method for (1.1) is described as follows.

Find a continuous piecewise X-type function U(t) on I with \(U(t_{0})=y_{0}\), such that for any piecewise function Y-type function v(t),

$$\begin{aligned} \int _{I}v(t)\cdot (U^{\prime }(t)-f(U(t)))dt=0, \end{aligned}$$
(1.2)

where \(U(t)\approx y(t)\) on I and y(t) solves (1.1). The term ‘continuous finite element’(CFE) comes from the continuity of the finite element solution U(t). Since (1.2) deals with an initial value problem, we only need to consider it on \([t_{0},t_{0}+h]\).

Find \(u\in X_{h}(t_{0})\) with \(u(0)=y_{0}\), such that

$$\begin{aligned} \langle v,u^{\prime }\rangle =h\langle v,f\circ u\rangle , \end{aligned}$$
(1.3)

for any \(v\in Y_{h}(t_{0})\), where

$$u(\tau )=U(t_{0}+\tau h)\approx y(t_{0}+\tau h)$$

for \(\tau \in [0,1]\). Since U(t) is continuous, \(y_{1}=u(1)\) is the initial value of the local problem on the next interval \([t_{1},t_{2}]\). Thus, we can solve the global variational problem (1.2) on I step by step.

In the special case of

$$\begin{aligned} X=\text {span}\left\{ 1,t,\ldots ,t^{r}\right\} ,\quad Y=\text {span}\left\{ 1,t,\ldots ,t^{r-1}\right\} , \end{aligned}$$

Equation (1.2) reduces to the classical continuous finite element method (see, e.g. [1, 25]) denoted by CFEr in this chapter. For the purpose of deriving functionally-fitted methods, we generalise X and Y a little:

$$\begin{aligned} Y=\text {span}\left\{ \varphi _{0}(t),\ldots ,\varphi _{r-1}(t)\right\} ,\quad X=\text {span}\left\{ 1,\int _{t_{0}}^{t}\varphi _{0}(s)ds,\ldots ,\int _{t_{0}}^{t}\varphi _{r-1}(s)ds\right\} . \end{aligned}$$
(1.4)

Then it is sufficient to give X or Y since they can be determined by each other. Furthermore, Y is assumed to be invariant under translation and reflection, namely,

$$\begin{aligned} \left\{ \begin{aligned}&v(t)\in Y \Rightarrow v(t+c)\in Y \text { for any }c\in \mathbb {R},\\&v(t)\in Y \Rightarrow v(-t)\in Y.\\ \end{aligned}\right. \end{aligned}$$
(1.5)

Clearly, \(Y_{h}(t_{0})\) and \(X_{h}(t_{0})\) are irrelevant to \(t_{0}\) provided (1.5) holds. For convenience, we simplify \(Y_{h}(t_{0})\) and \(X_{h}(t_{0})\) by \(Y_{h}\) and \(X_{h}\), respectively. In the remainder of this chapter, we denote the CFE method (1.2) or (1.3) based on the general function spaces (1.4) satisfying the condition (1.5) by FFCFEr .

We note that the FFCFEr method (1.3) is defined by a variational problem, and the well-definedness of this problem has not been confirmed yet. Here we presume the existence and uniqueness of the solution to (1.3). This assumption will be proved in the next section. With this premise, we are able to present three significant properties of the FFCFEr method.

We first conclude that the FFCFEr method is functionally fitted with respect to the space X, from the definition of the variational problem (1.2).

Theorem 1.1

The FFCFEr method (1.2) solves the IVP (1.1) whose solution is a piecewise X-type function without any error.

Moreover, the FFCFEr method is an inherently energy-preserving method. The next theorem confirms this point.

Theorem 1.2

The FFCFEr method (1.3) exactly preserves the Hamiltonian H: \(H(y_{1})=H(y_{0})\).

Proof

Firstly, given a vector V, we denote its ith entry by \(V_{i}\). For each function \(w\in Y_{h}\), setting \(v(\tau )=w(\tau )\cdot e_{i}\in Y_{h}\) in (1.3) leads to

$$\begin{aligned} \int _{0}^{1}w(\tau )_{i}u^{\prime }(\tau )_{i}d\tau =h\int _{0}^{1}w(\tau )_{i}f(u(\tau ))_{i}d\tau ,\quad i=1,2,\ldots ,d, \end{aligned}$$

where \(e_{i}\) is the ith vector of units. Hence,

$$\begin{aligned} \begin{aligned} \int _{0}^{1}w(\tau )^{\intercal }u^{\prime }(\tau )d\tau&=\sum _{i=1}^{d}\int _{0}^{1}w(\tau )_{i}u^{\prime }(\tau )_{i}d\tau =\sum _{i=1}^{d}h\int _{0}^{1}w(\tau )_{i}f(u(\tau ))_{i}d\tau \\&=h\int _{0}^{1}w(\tau )^{\intercal }f(u(\tau ))d\tau .\\ \end{aligned} \end{aligned}$$
(1.6)

Since \(u(\tau )\in X_{h}\), \(u^{\prime }(\tau )\in Y_{h}\) and \(J^{-1}u^{\prime }(\tau )\in Y_{h}\), taking \(w(\tau )=J^{-1}u^{\prime }(\tau )\) in (1.6), we obtain

$$\begin{aligned} \begin{aligned} H(y_{1})-H(y_{0})&=\int _{0}^{1}\frac{d}{d\tau }H(u(\tau ))d\tau =\int _{0}^{1}u^{\prime }(\tau )^{\intercal }\nabla H(u(\tau ))d\tau \\&=\int _{0}^{1}(J^{-1}u^{\prime }(\tau ))^{\intercal }f(u(\tau ))d\tau =h^{-1}\int _{0}^{1}u^{\prime }(\tau )^{\intercal }Ju^{\prime }(\tau )d\tau =0.\\ \end{aligned} \end{aligned}$$

This completes the proof.   \(\square \)

The FFCFEr method can also be viewed as a one-step method \(\varPhi _{h}: y_{0}\rightarrow y_{1}=u(1)\). It is well known that reversible methods show a better long-term behaviour than nonsymmetric ones when applied to reversible differential systems such as (1.1) (see, e.g. [23]). This fact motivates the investigation of the symmetry of the FFCFEr method. Since the spaces X and Y satisfy the invariance (1.5), which is a kind of symmetry, the FFCFEr method is expected to be symmetric.

Theorem 1.3

The FFCFEr method (1.3) is symmetric provided (1.5) holds.

Proof

It follows from (1.5) that we have \(X_{h}=X_{-h}, Y_{h}=Y_{-h}.\) Exchanging \(y_{0}\leftrightarrow y_{1}\) and replacing h with \(-h\) in (1.3) give: \(u(0)=y_{1}\), \(y_{0}=u(1)\), where

$$\begin{aligned} \langle v(\tau ),u^{\prime }(\tau )\rangle _{\tau }=-h\langle v(\tau ),f(u(\tau ))\rangle _{\tau },\quad u(\tau )\in X_{-h}=X_{h}, \end{aligned}$$

for each \(v(\tau )\in Y_{-h}=Y_{h}\). Setting \(u_{1}(\tau )=u(1-\tau )\in X_{h}\) and \(\tau \rightarrow 1-\tau \) leads to \(u_{1}(0)=y_{0}\), \(y_{1}=u_{1}(1)\), where

$$\begin{aligned} \langle v_{1}(\tau ),u_{1}^{\prime }(\tau )\rangle _{\tau }=h\langle v_{1}(\tau ),f(u_{1}(\tau ))\rangle _{\tau }, \end{aligned}$$

for each \(v_{1}(\tau )=v(1-\tau )\in Y_{h}.\) This method is exactly the same as (1.3), which means that the FFCFEr method is symmetric.   \(\square \)

It is well known that polynomials cannot approximate oscillatory functions satisfactorily. If the problem (1.1) has a fixed frequency \(\omega \) which can be evaluated effectively in advance, then the function space containing the pair \(\left\{ \sin (\omega t), \cos (\omega t)\right\} \) seems to be a more promising candidate for X and Y than a polynomial space. For example, possible Y spaces for deriving the TFCFE method are

$$\begin{aligned} Y_{1}=\left\{ \begin{aligned}&\text {span}\left\{ \cos (\omega t),\sin (\omega t)\right\} ,r=2,\\&\text {span}\left\{ 1,t,\ldots ,t^{r-3},\cos (\omega t),\sin (\omega t)\right\} ,r\ge 3,\\ \end{aligned}\right. \end{aligned}$$
(1.7)
$$\begin{aligned} Y_{2}=\text {span}\left\{ \cos (\omega t),\sin (\omega t),\ldots ,\cos (k\omega t),\sin (k\omega t)\right\} , r=2k, \end{aligned}$$
(1.8)

and

$$\begin{aligned} Y_{3}=\text {span}\left\{ 1,t,\ldots ,t^{p},t\cos (\omega t),t\sin (\omega t),\ldots ,t^{k}\cos (\omega t),t^{k}\sin (\omega t)\right\} . \end{aligned}$$
(1.9)

Correspondingly, by equipping the FFCFE method with the space \(Y=Y_{1}, Y_{2}\) or \(Y_{3}\), we obtain three families of TFCFE methods. According to Theorems 1.2 and 1.3, all for them are symmetric energy-preserving methods. To exemplify this framework of the TFCFE method, in numerical experiments, we will test the TFCFE method denoted by TFCFEr and TF2CFEr based on the spaces (1.7) and (1.8). It is noted that TFCFE2 and TF2CFE2 coincide.

1.3 Interpretation as Continuous-Stage Runge–Kutta Methods and the Analysis on the Algebraic Order

An interesting connection between CFE methods and RK-type methods has been shown in several papers (see, e.g. [3, 25, 38]). Since the RK methods are dominant in the numerical integration of ODEs, it is meaningful and useful to transform the FFCFEr method into the corresponding RK-type method which has been widely and conventionally used in applications. After the transformation, the FFCFEr method can be analysed and implemented by standard techniques in ODEs conveniently. To this end, it is helpful to introduce the projection operation \(P_{h}\) . Given a continuous \(\mathbb {R}^{d}\)-valued function w on [0, 1], its projection onto \(Y_{h}\), denoted by \(P_{h}w\), is defined by

$$\begin{aligned} \langle v,P_{h}w\rangle =\langle v,w\rangle ,\quad \text {for any } v\in Y_{h}. \end{aligned}$$
(1.10)

Clearly, \(P_{h}w(\tau )\) can be uniquely expressed as a linear combination of \(\{\tilde{\varphi }_{i}(\tau )\}_{i=0}^{r-1}\):

$$P_{h}w(\tau )=\sum _{i=0}^{r-1}U_{i}\tilde{\varphi }_{i}(\tau ),\quad U_{i}\in \mathbb {R}^{d}.$$

Taking \(v(\tau )=\tilde{\varphi }_{i}(\tau )e_{j}\) in (1.10) for \(i=0,1,\ldots ,r-1\) and \(j=1,\ldots ,d\), we can observe that the coefficients \(U_{i}\) satisfy the equation

$$\begin{aligned} M\otimes I_{d\times d}\left( \begin{array}{c}U_{0}\\ \vdots \\ U_{r-1}\end{array}\right) = \left( \begin{array}{c}\langle \tilde{\varphi }_{0},w\rangle \\ \vdots \\ \langle \tilde{\varphi }_{r-1},w\rangle \end{array}\right) , \end{aligned}$$

where

$$\begin{aligned} M=(\langle \tilde{\varphi }_{i},\tilde{\varphi }_{j}\rangle )_{0\le i,j\le r-1}. \end{aligned}$$

Since \(\left\{ \tilde{\varphi }_{i}\right\} _{i=0}^{r-1}\) are linearly independent for \(h>0\), the stiffness matrix M is nonsingular. Consequently, the projection can be explicitly expressed by

$$\begin{aligned} P_{h}w(\tau )=\langle P_{\tau ,\sigma },w(\sigma )\rangle _{\sigma }, \end{aligned}$$

where

$$\begin{aligned} P_{\tau ,\sigma }=(\tilde{\varphi }_{0}(\tau ),\ldots ,\tilde{\varphi }_{r-1}(\tau ))M^{-1}(\tilde{\varphi }_{0}(\sigma ),\ldots ,\tilde{\varphi }_{r-1}(\sigma ))^{\intercal }. \end{aligned}$$
(1.11)

Clearly, \(P_{\tau ,\sigma }\) can be calculated by a basis other than \(\left\{ \tilde{\varphi }_{i}\right\} _{i=0}^{r-1}\) since they only differ in a linear transformation. If \(\left\{ \phi _{0},\ldots ,\phi _{r-1}\right\} \) is an orthonormal basis of \(X_{h}\) under the inner product \(\langle \cdot ,\cdot \rangle \), then \(P_{\tau ,\sigma }\) admits a simpler expression:

$$\begin{aligned} P_{\tau ,\sigma }=\sum _{i=0}^{r-1}\phi _{i}(\tau )\phi _{i}(\sigma ). \end{aligned}$$
(1.12)

Now, using (1.3) and the definition (1.10) of the operator \(P_{h}\), we obtain that \(u^{\prime }=hP_{h}(f\circ u)\) and

$$\begin{aligned} u^{\prime }(\tau )=h\langle P_{\tau ,\sigma },f(u(\sigma ))\rangle _{\sigma }. \end{aligned}$$
(1.13)

Integrating the above equation with respect to \(\tau \), we transform the FFCFEr method (1.3) into the continuous-stage RK method:

$$\begin{aligned} \left\{ \begin{aligned}&u(\tau )=y_{0}+h\int _{0}^{1}A_{\tau ,\sigma }f(u(\sigma ))d\sigma ,\\&y_{1}=u(1),\\ \end{aligned}\right. \end{aligned}$$
(1.14)

where

$$\begin{aligned} A_{\tau ,\sigma }=\int _{0}^{\tau }P_{\alpha ,\sigma }d\alpha =\sum _{i=0}^{r-1}\int _{0}^{\tau }\phi _{i}(\alpha )d\alpha \phi _{i}(\sigma ). \end{aligned}$$
(1.15)

In particular,

$$\begin{aligned} \phi _{i}(\tau )=\hat{p}_{i}(\tau ), \end{aligned}$$
(1.16)

for the CFEr method for \(i=0,1,\ldots ,r-1\), where \(\hat{p}_{i}(\tau )\) is the shifted Legendre polynomial of degree i on [0, 1], scaled in order to be orthonormal. Hence, the CFEr method in the form (1.14) is identical to the energy-preserving collocation method of order 2r (see [21]) or the Hamiltonian boundary value method HBVM\((\infty ,r)\) (see, e.g. [4]). For the FFCFEr method, since \(P_{\tau ,\sigma }, A_{\tau ,\sigma }\) are functions of variable h and \(u(\tau )\) is implicitly determined by (1.14), it is necessary to analyse their smoothness with respect to h before investigating the analytic property of the numerical solution \(u(\tau )\). First of all, it can be observed from (1.11) that \(P_{\tau ,\sigma }=P_{\tau ,\sigma }(h)\) is not defined at \(h=0\) since the matrix M is singular in this case. Fortunately, however, the following lemma shows that the singularity is removable.

Lemma 1.1

The limit, \(\lim \limits _{h\rightarrow 0}P_{\tau ,\sigma }\) exists. Furthermore, \(P_{\tau ,\sigma }\) can be smoothly extended to \(h=0\) by setting \(P_{\tau ,\sigma }(0)=\lim \limits _{h\rightarrow 0}P_{\tau ,\sigma }(h)\).

Proof

By expanding \(\{\varphi _{i}(t_{0}+\tau h)\}_{i=0}^{r-1}\) at \(t_{0}\), we obtain that

$$\begin{aligned} (\tilde{\varphi }_{0}(\tau ),\ldots ,\tilde{\varphi }_{r-1}(\tau ))=(1,\tau h,\ldots ,\frac{\tau ^{r-1}h^{r-1}}{(r-1)!})W+\mathscr {O}(h^{r}), \end{aligned}$$
(1.17)

where

$$\begin{aligned} W=\left( \begin{array}{cccc}\varphi _{0}(t_{0})&{}\varphi _{1}(t_{0})&{}\cdots &{}\varphi _{r-1}(t_{0})\\ \varphi _{0}^{(1)}(t_{0})&{}\varphi _{1}^{(1)}(t_{0})&{}\cdots &{}\varphi _{r-1}^{(1)}(t_{0})\\ \vdots &{}\vdots &{} &{}\vdots \\ \varphi _{0}^{(r-1)}(t_{0})&{}\varphi _{1}^{(r-1)}(t_{0})&{}\cdots &{}\varphi _{r-1}^{(r-1)}(t_{0})\end{array}\right) \end{aligned}$$
(1.18)

is the Wronskian of \(\{\varphi _{i}(t)\}_{i=0}^{r-1}\) at \(t_{0}\), and is nonsingular. Post-multiplying the right-hand side of (1.17) by \(W^{-1}diag(1,h^{-1},\ldots ,h^{1-r}(r-1)!)\) yields another basis of \(X_{h}\):

$$\begin{aligned} \{1+\mathscr {O}(h),\tau +\mathscr {O}(h),\ldots ,\tau ^{r-1}+\mathscr {O}(h)\}. \end{aligned}$$

Applying the Gram–Schmidt process (with respect to the inner product \(\langle \cdot ,\cdot \rangle \)) to the above basis, we obtain an orthonormal basis \(\left\{ \phi _{i}(\tau )=\hat{p}_{i}(\tau )+\mathscr {O}(h)\right\} _{i=0}^{r-1}\). Thus, by (1.12) and defining

$$\begin{aligned} P_{\tau ,\sigma }(0)=\lim _{h\rightarrow 0}\sum _{i=0}^{r-1}\phi _{i}(\tau )\phi _{i}(\sigma ) =\sum _{i=0}^{r-1}\hat{p}_{i}(\tau )\hat{p}_{i}(\sigma ), \end{aligned}$$
(1.19)

we can extend \(P_{\tau ,\sigma }\) to \(h=0\). Since each \(\phi _{i}(\tau )=\hat{p}_{i}(\tau )+\mathscr {O}(h)\) is smooth with respect to h, \(P_{\tau ,\sigma }\) is also a smooth function of h.   \(\square \)

From (1.16) and (1.19), it can be observed that the FFCFEr method (1.14) reduces to the CFEr method when \(h\rightarrow 0\), or equivalently, the energy-preserving collocation method of order 2r and HBVM\((\infty ,r)\) method mentioned above. Since \(A_{\tau ,\sigma }=\int _{0}^{\tau }P_{\alpha ,\sigma }d\alpha \) is also a smooth function of h, we can assume that

$$\begin{aligned} M_{k}=\max _{\tau ,\sigma ,h\in [0,1]}\left| \frac{\partial ^{k}A_{\tau ,\sigma }}{\partial h^{k}}\right| ,\quad k=0,1,\ldots . \end{aligned}$$
(1.20)

Furthermore, since the right function f in (1.1) maps from \(\mathbb {R}^{d}\) to \(\mathbb {R}^{d}\), the nth-order derivative of f at y denoted by \(f^{(n)}(y)\) is a multilinear map from \(\underbrace{\mathbb {R}^{d}\times \ldots \times \mathbb {R}^{d}}_{n-fold}\) to \(\mathbb {R}^{d}\) defined by

$$\begin{aligned} f^{(n)}(y)(z_{1},\ldots ,z_{n})=\sum _{1\le \alpha _{1},\ldots ,\alpha _{n}\le d}\frac{\partial ^{n}f}{\partial y_{\alpha _{1}}\cdots \partial y_{\alpha _{n}}}(y)z_{1}^{\alpha _{1}}\ldots z_{n}^{\alpha _{n}}, \end{aligned}$$

where \(y=(y_{1},\ldots ,y_{d})^{\intercal }\) and \(z_{i}=(z_{i}^{1},\ldots ,z_{i}^{d})^{\intercal }\) for \(i=1,\ldots ,n\). With this background, we now can give the existence, uniqueness, and especially the smoothness with respect to h for the continuous finite element approximation \(u(\tau )\) associated with the FFCFEr method. The proof of the following theorem is based on a fixed-point iteration which is analogous to Picard iteration.

Theorem 1.4

Given a positive constant R, let

$$B(y_{0},R)=\left\{ y\in \mathbb {R}^{d} : ||y-y_{0}||\le R\right\} $$

and

$$\begin{aligned} D_{n}=\max _{y\in B(y_{0},R)}||f^{(n)}(y)||,\quad n=0,1,\ldots , \end{aligned}$$
(1.21)

where \(||\cdot ||=||\cdot ||_{\infty }\) is the maximum norm for vectors in \(\mathbb {R}^{d}\) or the corresponding induced norm for the multilinear maps \(f^{(n)}(y), n\ge 1\). Then the FFCFEr method (1.3) or (1.14) has a unique solution \(u(\tau )\) which is smoothly dependent of h provided

$$\begin{aligned} 0\le h\le \varepsilon <\min \left\{ \frac{1}{M_{0}D_{1}},\frac{R}{M_{0}D_{0}},1\right\} . \end{aligned}$$
(1.22)

Proof

Set \(u_{0}(\tau )\equiv y_{0}\). We construct a function series \(\{u_{n}(\tau )\}_{n=0}^{\infty }\) defined by the relation

$$\begin{aligned} u_{n+1}(\tau )=y_{0}+h\int _{0}^{1}A_{\tau ,\sigma }f(u_{n}(\sigma ))d\sigma ,{\quad n=0,1,\ldots .} \end{aligned}$$
(1.23)

Obviously, \(\lim _{n\rightarrow \infty }u_{n}(\tau )\) is a solution to (1.14) provided \(\left\{ u_{n}(\tau )\right\} _{n=0}^{\infty }\) is uniformly convergent. Thus, we only need to prove the uniform convergence of the infinite series

$$\sum _{n=0}^{\infty }(u_{n+1}(\tau )-u_{n}(\tau )).$$

It follows from (1.20), (1.22), (1.23) and induction that

$$\begin{aligned} ||u_{n}(\tau )-y_{0}||\le R,\quad n=0,1,\ldots \end{aligned}$$
(1.24)

Then by using (1.21), (1.22), (1.23), (1.24) and the inequalities

$$\begin{aligned} \begin{aligned}&||\int _{0}^{1}w(\tau )d\tau ||\le \int _{0}^{1}||w(\tau )||d\tau ,\quad \text {for}\; \mathbb {R}^{d}{\text {-valued function}}\; w(\tau ),\\&{||f(y)-f(z)||\le D_{1}||y-z||,\quad \text {for}\; y,z\in B(y_{0},R),}\\ \end{aligned} \end{aligned}$$

we obtain the following inequalities

$$\begin{aligned} \begin{aligned}&||u_{n+1}(\tau )-u_{n}(\tau )||\le h\int _{0}^{1}M_{0}D_{1}||u_{n}(\sigma )-u_{n-1}(\sigma )||d\sigma \\&\le \beta ||u_{n}-u_{n-1}||_{c},\quad {\beta =\varepsilon M_{0}D_{1},}\\ \end{aligned} \end{aligned}$$

where \(||\cdot ||_{c}\) is the maximum norm for continuous functions:

$$\begin{aligned} ||w||_{c}=\max _{\tau \in [0,1]}||w(\tau )||,\quad w\;\text {is a continuous}\; \mathbb {R}^{d}\text {-valued function on}\; [0,1]. \end{aligned}$$

Therefore, we have

$$\begin{aligned} ||u_{n+1}-u_{n}||_{c}\le \beta ||u_{n}-u_{n-1}||_{c} \end{aligned}$$

and

$$\begin{aligned} ||u_{n+1}-u_{n}||_{c}\le \beta ^{n}||u_{1}-y_{0}||_{c}\le \beta ^{n}R,\quad n=0,1,\ldots . \end{aligned}$$
(1.25)

Since \(\beta <1\), according to Weierstrass M-test, \(\sum _{n=0}^{\infty }(u_{n+1}(\tau )-u_{n}(\tau ))\) is uniformly convergent, and thus, the limit of \(\{u_{n}(\tau )\}_{n=0}^{\infty }\) is a solution to (1.14). If \(v(\tau )\) is another solution, then the difference between \(u(\tau )\) and \(v(\tau )\) satisfies

$$\begin{aligned} ||u(\tau )-v(\tau )||\le h\int _{0}^{1}||A_{\tau ,\sigma }(f(u(\sigma ))-f(v(\sigma )))||d\sigma \le \beta ||u-v||_{c}, \end{aligned}$$

and

$$\begin{aligned} ||u-v||_{c}\le \beta ||u-v||_{c}. \end{aligned}$$

This means \(||u-v||_{c}=0,\) i.e., \(u(\tau )\equiv v(\tau )\). Hence, the existence and uniqueness have been proved.

As for the smooth dependence of u on h, since every \(u_{n}(\tau )\) is a smooth function of h, we only need to prove the sequence

$$\left\{ \frac{\partial ^{k}u_{n}}{\partial h^{k}}(\tau )\right\} _{n=0}^{\infty }$$

is uniformly convergent for \(k\ge 1\). Firstly, differentiating both sides of (1.23) with respect to h yields

$$\begin{aligned} \frac{\partial u_{n+1}}{\partial h}(\tau )=\int _{0}^{1}(A_{\tau ,\sigma }+h\frac{\partial A_{\tau ,\sigma }}{\partial h})f(u_{n}(\sigma ))d\sigma +h\int _{0}^{1}A_{\tau ,\sigma }f^{(1)}(u_{n}(\sigma ))\frac{\partial u_{n}}{\partial h}(\sigma )d\sigma . \end{aligned}$$
(1.26)

We then have

$$\begin{aligned} ||\frac{\partial u_{n+1}}{\partial h}||_{c}\le \alpha +\beta ||\frac{\partial u_{n}}{\partial h}||_{c},\quad \alpha =(M_{0}+\varepsilon M_{1})D_{0}. \end{aligned}$$
(1.27)

By induction, it is easy to show that \(\left\{ \frac{\partial u_{n}}{\partial h}(\tau )\right\} _{n=0}^{\infty }\) is uniformly bounded:

$$\begin{aligned} ||\frac{\partial u_{n}}{\partial h}||_{c}\le \alpha (1+\beta +\ldots +\beta ^{n-1})\le \frac{\alpha }{1-\beta }=C^{*},\quad n=0,1,\ldots . \end{aligned}$$
(1.28)

Combining (1.25), (1.26) and (1.28), we obtain

$$\begin{aligned} \begin{aligned}&||\frac{\partial u_{n+1}}{\partial h}-\frac{\partial u_{n}}{\partial h}||_{c}\\&\le \int _{0}^{1}(M_{0}+hM_{1})||f(u_{n}(\sigma ))-f(u_{n-1}(\sigma ))||d\sigma \\&+h\int _{0}^{1}M_{0}\left( ||(f^{(1)}(u_{n}(\sigma ))-f^{(1)}(u_{n-1}(\sigma )))\frac{\partial u_{n}}{\partial h}(\sigma )||\right. \\&\qquad \qquad \qquad \left. + ||f^{(1)}(u_{n-1}(\sigma ))(\frac{\partial u_{n}}{\partial h}(\sigma )-\frac{\partial u_{n-1}}{\partial h}(\sigma ))||\right) d\sigma \\&\le \gamma \beta ^{n-1}+\beta ||\frac{\partial u_{n}}{\partial h}-\frac{\partial u_{n-1}}{\partial h}||_{c},\\ \end{aligned} \end{aligned}$$

where

$$\gamma =(M_{0}D_{1}+\varepsilon M_{1}D_{1}+\varepsilon M_{0}L_{2}C^{*})R,$$

and \(L_{2}\) is a constant satisfying

$$\begin{aligned} ||f^{(1)}(y)-f^{(1)}(z)||\le L_{2}||y-z||,\quad \text {for}\; y,z\in B(y_{0},R). \end{aligned}$$

Thus, again by induction, we have

$$\begin{aligned} ||\frac{\partial u_{n+1}}{\partial h}-\frac{\partial u_{n}}{\partial h}||_{c}\le n\gamma \beta ^{n-1}+\beta ^{n}C^{*},\quad n=1,2,\ldots \end{aligned}$$

and \(\left\{ \frac{\partial u_{n}}{\partial h}(\tau )\right\} _{n=0}^{\infty }\) is uniformly convergent. By a similar argument, one can show that other function sequence \(\left\{ \frac{\partial ^{k}u_{n}}{\partial h^{k}}(\tau )\right\} _{n=0}^{\infty }\) for \(k\ge 2\) are uniformly convergent as well. Therefore, \(u(\tau )\) is smoothly dependent on h. The proof is complete.   \(\square \)

Since our analysis of the algebraic order of the FFCFEr method is mainly based on Taylor’s theorem, it is meaningful to investigate the expansion of \(P_{\tau ,\sigma }(h)\).

Proposition 1.1

Assume that the Taylor expansion of \(P_{\tau ,\sigma }(h)\) with respect to h at zero is

$$\begin{aligned} P_{\tau ,\sigma }=\sum _{n=0}^{r-1}P_{\tau ,\sigma }^{[n]}h^{n}+\mathscr {O}(h^{r}). \end{aligned}$$
(1.29)

Then the coefficients \(P_{\tau ,\sigma }^{[n]}\) satisfy

$$\begin{aligned} \langle P_{\tau ,\sigma }^{[n]},g_{m}(\sigma )\rangle _{\sigma }= \left\{ \begin{aligned}&g_{m}(\tau ) ,{\quad n=0,\quad m=r-1,}\\&0,\quad {n=1,\ldots ,r-1,\quad m=r-1-n,}\\ \end{aligned}\right. \end{aligned}$$

for any \(g_{m}\in P_{m}([0,1]),\) where \(P_{m}([0,1])\) consists of polynomials of degrees \(\le m\) on [0, 1].

Proof

It can be observed from (1.11) that

$$\begin{aligned} \langle P_{\tau ,\sigma },\varphi _{i}(t_{0}+\sigma h)\rangle _{\sigma }=\varphi _{i}(t_{0}+\tau h),\quad i=0,1,\ldots ,r-1. \end{aligned}$$
(1.30)

Meanwhile, expanding \(\varphi _{i}(t_{0}+\tau h)\) at \(t_{0}\) yields

$$\begin{aligned} \varphi _{i}(t_{0}+\tau h)=\sum _{n=0}^{r-1}\frac{\varphi _{i}^{(n)}(t_{0})}{n!}\tau ^{n}h^{n}+\mathscr {O}(h^{r}). \end{aligned}$$
(1.31)

Then by inserting (1.29) and (1.31) into the Eq. (1.30), we obtain that

$$\begin{aligned} \langle \sum _{n=0}^{r-1}P_{\tau ,\sigma }^{[n]}h^{n},\sum _{m=0}^{r-1}\frac{\varphi _{i}^{(m)}(t_{0})}{m!}\sigma ^{m}h^{m}\rangle _{\sigma } =\sum _{k=0}^{r-1}\frac{\varphi _{i}^{(k)}(t_{0})}{k!}\tau ^{k}h^{k}+\mathscr {O}(h^{r}). \end{aligned}$$

Considering the terms in \(h^{k}\) leads to

$$\begin{aligned} \begin{aligned}&\sum _{k=0}^{r-1}\left( \sum _{m+n=k}\frac{\varphi _{i}^{(m)}(t_{0})}{m!} \langle P_{\tau ,\sigma }^{[n]},\sigma ^{m}\rangle _{\sigma }-\frac{\varphi _{i}^{(k)}(t_{0})}{k!}\tau ^{k}\right) h^{k}=\mathscr {O}(h^{r}),\\&\sum _{m=0}^{k-1}\frac{\varphi _{i}^{(m)}(t_{0})}{m!} P_{m,k-m}+\frac{\varphi _{i}^{(k)}(t_{0})}{k!}(P_{k0}-\tau ^{k})=0,\quad i,\ k=0,1,\ldots ,r-1,\\ \end{aligned} \end{aligned}$$

and

$$\begin{aligned} W^{\intercal } V=0, \end{aligned}$$

where \(P_{mn}=\langle P_{\tau ,\sigma }^{[n]},\sigma ^{m}\rangle _{\sigma },\ W\) is the Wronskian (1.18), and \(V=(V_{mk})_{0\le m,k\le r-1}\) is an upper triangular matrix with the entries determined by

$$\begin{aligned} V_{mk}=\left\{ \begin{aligned}&\frac{1}{m!}P_{m,k-m},\quad m<k,\\&\frac{1}{m!}(P_{m,0}-\tau ^{m}),\quad m=k.\\ \end{aligned}\right. \end{aligned}$$

Since W is nonsingular, \(V=0\),

$$\begin{aligned} P_{mn}=\left\{ \begin{aligned}&\tau ^{m},\quad n=0,\quad m+n\le r-1,\\&0,\quad n=1, 2, \ldots , r-1,\quad m+n\le r-1.\\ \end{aligned}\right. \end{aligned}$$
(1.32)

Then the statement of the proposition directly follows from (1.32).   \(\square \)

Aside from \(P_{\tau ,\sigma }\), it is also crucial to analyse the expansion of the solution \(u(\tau )\). For convenience, we say that an h-dependent function \(w(\tau )\) is regular if it can be expanded as

$$\begin{aligned} w(\tau )=\sum _{n=0}^{r-1}w^{[n]}(\tau )h^{n}+\mathscr {O}(h^{r}), \end{aligned}$$

where

$$w^{[n]}(\tau )=\frac{1}{n!}\frac{\partial ^{n}w(\tau )}{\partial h^{n}}|_{h=0}$$

is a vector-valued function with polynomial entries of degrees \(\le n\).

Lemma 1.2

Given a regular function w and an h-independent sufficiently smooth function g, the composition (if exists) is regular. Moreover, the difference between w and its projection satisfies

$$\begin{aligned} P_{h}w(\tau )-w(\tau )=\mathscr {O}(h^{r}). \end{aligned}$$

Proof

Assume that the expansion of \(g(w(\tau ))\) with respect to h at zero is

$$\begin{aligned} g(w(\tau ))=\sum _{n=0}^{r-1}p^{[n]}(\tau )h^{n}+\mathscr {O}(h^{r}). \end{aligned}$$

Then, differentiating \(g(w(\tau ))\) with respect to h at zero iteratively and using

$$p^{[n]}(\tau )=\frac{1}{n!}\frac{\partial ^{n}g(w(\tau ))}{\partial h^{n}}|_{h=0},\quad \text {the degree of}\; \frac{\partial ^{n}w(\tau )}{\partial h^{n}}|_{h=0}\le n,\quad {n=0,1,\ldots ,r-1,}$$

we can observe that \(p^{[n]}(\tau )\) is a vector with polynomial entries of degrees \(\le n\) for \(n=0,1,\ldots ,r-1\) and the first statement is confirmed.

As for the second statement, using Proposition 1.1, we have

$$\begin{aligned} \begin{aligned}&P_{h}w(\tau )-w(\tau )\\&=\langle \sum _{n=0}^{r-1}P_{\tau ,\sigma }^{[n]}h^{n},\sum _{k=0}^{r-1}w^{[k]}(\sigma )h^{k}\rangle _{\sigma }-\sum _{m=0}^{r-1}w^{[m]}(\tau )h^{m}+\mathscr {O}(h^{r})\\&=\sum _{m=0}^{r-1}(\sum _{n+k=m}\langle P_{\tau ,\sigma }^{[n]},w^{[k]}(\sigma )\rangle _{\sigma }-w^{[m]}(\tau ))h^{m}+\mathscr {O}(h^{r})\\&=\sum _{m=0}^{r-1}(\langle P_{\tau ,\sigma }^{[0]},w^{[m]}(\sigma )\rangle _{\sigma }-w^{[m]}(\tau ))h^{m}+\mathscr {O}(h^{r})=\mathscr {O}(h^{r}).\\ \end{aligned} \end{aligned}$$

   \(\square \)

Before further discussions, it may be useful to recall some standard results in the theory of ODEs. To emphasize the dependence of the solution to \(y^{\prime }(t)=f(y(t))\) on the initial value, we assume that \(y(\cdot ,\tilde{t},\tilde{y})\) solves the IVP:

$$\begin{aligned} \frac{d}{dt}y(t,\tilde{t},\tilde{y})=f(y(t,\tilde{t},\tilde{y})),\quad y(\tilde{t},\tilde{t},\tilde{y})=\tilde{y}. \end{aligned}$$

Clearly, this problem is equivalent to the following integral equation:

$$y(t,\tilde{t},\tilde{y})=\tilde{y}+\int _{\tilde{t}}^{t}f(y(\xi ,\tilde{t},\tilde{y}))d\xi .$$

Differentiating it with respect to \(\tilde{t}\) and \(\tilde{y}\) and using the uniqueness of the solution leads to

$$\begin{aligned} \frac{\partial y}{\partial \tilde{t}}(t,\tilde{t},\tilde{y})=-\frac{\partial y}{\partial \tilde{y}}(t,\tilde{t},\tilde{y})f(\tilde{y}). \end{aligned}$$
(1.33)

With the previous analysis results, we are in a position to give the order of FFCFEr.

Theorem 1.5

The stage order and order of the FFCFEr method (1.3) or (1.14) are r and 2r, respectively. That is,

$$\begin{aligned} u(\tau )-y(t_{0}+\tau h)=\mathscr {O}(h^{r+1}), \end{aligned}$$

for \(0<\tau <1\), and

$$\begin{aligned} \quad u(1)-y(t_{0}+h)=\mathscr {O}(h^{2r+1}). \end{aligned}$$

Proof

Firstly, by Theorem 1.4 and Lemma 1.1, we can expand \(u(\tau )\) and \(A_{\tau ,\sigma }\) with respect to h at zero:

$$\begin{aligned} u(\tau )=\sum _{m=0}^{r-1}u^{[m]}(\tau )h^{m}+\mathscr {O}(h^{r}),\quad A_{\tau ,\sigma }=\sum _{m=0}^{r-1}A_{\tau ,\sigma }^{[m]}h^{m}+\mathscr {O}(h^{r}). \end{aligned}$$

Then let

$$\begin{aligned} \delta =u(\sigma )-y_{0}=\sum _{m=1}^{r-1}u^{[m]}(\sigma )h^{m}+\mathscr {O}(h^{r})=\mathscr {O}(h). \end{aligned}$$

Expanding \(f(u(\sigma ))\) at \(y_{0}\) and inserting the above equalities into the first equation of (1.14), we obtain

$$\begin{aligned} \sum _{m=0}^{r-1}u^{[m]}(\tau )h^{m}= y_{0}+h\int _{0}^{1}\sum _{k=0}^{r-1}A_{\tau ,\sigma }^{[k]}h^{k}\sum _{n=0}^{r-1}F^{(n)}(y_{0})(\underbrace{\delta ,\ldots ,\delta }_{n-fold})d\sigma +\mathscr {O}(h^{r}), \end{aligned}$$
(1.34)

where \(F^{(n)}(y_{0})=f^{(n)}(y_{0})/n!.\) We claim that \(u(\tau )\) is regular, i.e.

$$u^{[m]}(\tau )\in P_{m}^{d}=\underbrace{P_{m}([0,1])\times \ldots \times P_{m}([0,1])}_{d-fold}$$

for \(m=0,1,\ldots ,r-1.\) This fact can be confirmed by induction. Clearly, \(u^{[0]}(\tau )=y_{0}\in P_{0}^{d}\). If \(u^{[n]}(\tau )\in P_{n}^{d}\) for \(n=0,1,\ldots ,m\), then by comparing the coefficients of \(h^{m+1}\) on both sides of (1.34) and using (1.15) and Proposition 1.1, we obtain that

$$\begin{aligned} \begin{aligned}&u^{[m+1]}(\tau )= \sum _{k+n=m}\int _{0}^{1}A_{\tau ,\sigma }^{[k]}g_{n}(\sigma )d\sigma =\sum _{k+n=m}\int _{0}^{\tau }\int _{0}^{1}P_{\alpha ,\sigma }^{[k]}g_{n}(\sigma )d\sigma d\alpha \\&=\int _{0}^{\tau }\int _{0}^{1}P_{\alpha ,\sigma }^{[0]}g_{m}(\sigma )d\sigma d\alpha =\int _{0}^{\tau }g_{m}(\alpha )d\alpha \in P_{m+1}^{d},\quad g_{n}(\sigma )\in P_{n}^{d}.\\ \end{aligned} \end{aligned}$$

This completes the induction. By Lemma 1.2, \(f(u(\tau ))\) is also regular and

$$\begin{aligned} f(u(\tau ))-P_{h}(f\circ u)(\tau )=\mathscr {O}(h^{r}). \end{aligned}$$
(1.35)

Then it follows from (1.13), (1.33) and (1.35) that

$$\begin{aligned} \begin{aligned} u(\tau )-y(t_{0}+\tau h)&=y(t_{0}+\tau h,t_{0}+\tau h,u(\tau ))-y(t_{0}+\tau h,t_{0},y_{0})\\&=\int _{0}^{\tau }\frac{d}{d\alpha }y(t_{0}+\tau h,t_{0}+\alpha h,u(\alpha ))d\alpha \\&=\int _{0}^{\tau }(h\frac{\partial y}{\partial \tilde{t}}(t_{0}+\tau h,t_{0}+\alpha h,u(\alpha ))+ \frac{\partial y}{\partial \tilde{y}}(t_{0}+\tau h,t_{0}+\alpha h,u(\alpha ))u^{\prime }(\alpha ))d\alpha \\&=-h\int _{0}^{\tau }\varPhi ^{\tau }(\alpha )(f(u(\alpha ))-P_{h}(f\circ u)(\alpha ))d\alpha \\&=\mathscr {O}(h^{r+1}),\\ \end{aligned} \end{aligned}$$
(1.36)

where

$$\varPhi ^{\tau }(\alpha )=\frac{\partial y}{\partial \tilde{y}}(t_{0}+\tau h,t_{0}+\alpha h,u(\alpha )).$$

As for the algebraic order, setting \(\tau =1\) in (1.36) leads to

$$\begin{aligned} \begin{aligned}&u(1)-y(t_{0}+h)\\&=-h\int _{0}^{1}\varPhi ^{1}(\alpha )(f(u(\alpha ))-P_{h}(f\circ u)(\alpha ))d\alpha .\\ \end{aligned} \end{aligned}$$
(1.37)

Since \(\varPhi ^{1}(\alpha )\) is a matrix-valued function, we partition it as \(\varPhi ^{1}(\alpha )=(\varPhi _{1}^{1}(\alpha ),\ldots ,\varPhi _{d}^{1}(\alpha ))^{\intercal }\). Using Lemma 1.2 again leads to

$$\begin{aligned} \varPhi _{i}^{1}(\alpha )=P_{h}\varPhi _{i}^{1}(\alpha )+\mathscr {O}(h^{r}),\quad i=1,2,\ldots ,d. \end{aligned}$$
(1.38)

Meanwhile, setting \(w(\alpha )=P_{h}\varPhi _{i}(\alpha )^{\intercal }\) in (1.6) and using (1.13) yields

$$\begin{aligned} \begin{aligned}\int _{0}^{1}P_{h}\varPhi _{i}^{1}(\alpha )f(u(\alpha ))d\alpha&=h^{-1}\int _{0}^{1}P_{h}\varPhi _{i}^{1}(\alpha )u^{\prime }(\alpha )d\alpha =\int _{0}^{1}P_{h}\varPhi _{i}^{1}(\alpha )P_{h}(f\circ u)(\alpha )d\alpha ,\\&\quad i=1,2,\ldots ,d. \end{aligned}\end{aligned}$$
(1.39)

Therefore, using (1.37)–(1.39) we have

$$\begin{aligned} \begin{aligned}&u(1)-y(t_{0}+h)\\&=-h\int _{0}^{1}\left( \left( \begin{array}{c}P_{h}\varPhi _{1}^{1}(\alpha )\\ \vdots \\ P_{h}\varPhi _{d}^{1}(\alpha )\end{array}\right) +\mathscr {O}(h^{r})\right) (f(u(\alpha ))-P_{h}(f\circ u)(\alpha ))d\alpha \\&=-h\int _{0}^{1}\left( \begin{array}{c}P_{h}\varPhi _{1}^{1}(\alpha )(f(u(\alpha ))-P_{h}(f\circ u)(\alpha ))\\ \vdots \\ P_{h}\varPhi _{d}^{1}(\alpha )(f(u(\alpha ))-P_{h}(f\circ u)(\alpha ))\end{array}\right) d\alpha -h\int _{0}^{1}\mathscr {O}(h^{r})\times \mathscr {O}(h^{r})d\alpha =\mathscr {O}(h^{2r+1}).\\ \end{aligned} \end{aligned}$$

   \(\square \)

According to Theorem 1.5, the TF CFE methods based on the spaces (1.7)–(1.9) are of order 2r, 4k and \(2(k+p+1)\), respectively.

1.4 Implementation Issues

It should be noted that (1.14) is not a practical form for applications. In this section, we will detail the implementation of the FFCFEr method. Firstly, it is necessary to introduce the generalized Lagrange interpolation functions \(l_{i}(\tau )\in X_{h}\) with respect to \((r+1)\) distinct points \(\{d_{i}\}_{i=1}^{r+1}\subseteq [0,1]\):

$$\begin{aligned} (l_{1}(\tau ),\ldots ,l_{r+1}(\tau ))=(\widetilde{\varPhi }_{1}(\tau ),\widetilde{\varPhi }_{2}(\tau ),\ldots ,\widetilde{\varPhi }_{r+1}(\tau ))\varLambda ^{-1}, \end{aligned}$$
(1.40)

where \(\{\varPhi _{i}(t)\}_{i=1}^{r+1}\) is a basis of X, \(\widetilde{\varPhi }_{i}(\tau )=\varPhi _{i}(t_{0}+\tau h)\) and

$$\begin{aligned} \varLambda =\left( \begin{array}{cccc}\widetilde{\varPhi }_{1}(d_{1})&{}\widetilde{\varPhi }_{2}(d_{1})&{}\ldots &{}\widetilde{\varPhi }_{r+1}(d_{1})\\ \widetilde{\varPhi }_{1}(d_{2})&{}\widetilde{\varPhi }_{2}(d_{2})&{}\ldots &{}\widetilde{\varPhi }_{r+1}(d_{2})\\ \vdots &{}\vdots &{} &{}\vdots \\ \widetilde{\varPhi }_{1}(d_{r+1})&{}\widetilde{\varPhi }_{2}(d_{r+1})&{}\ldots &{}\widetilde{\varPhi }_{r+1}(d_{r+1})\\ \end{array}\right) . \end{aligned}$$

By means of the expansions

$$\begin{aligned} \varPhi _{i}(t_{0}+d_{j}h)=\sum _{n=0}^{r}\frac{\varPhi _{i}^{(n)}(t_{0})}{n!}d_{j}^{n}h^{n}+\mathscr {O}(h^{r+1}),\quad i,j=1,2,\ldots ,r+1, \end{aligned}$$

we have

$$\begin{aligned} \varLambda =\left( \begin{array}{cccc}1&{}d_{1}h&{}\ldots &{}\frac{d_{1}^{r}h^{r}}{r!}\\ 1&{}d_{2}h&{}\ldots &{}\frac{d_{2}^{r}h^{r}}{r!}\\ \vdots &{}\vdots &{} &{}\vdots \\ 1&{}d_{r+1}h&{}\ldots &{}\frac{d_{r+1}^{r}h^{r}}{r!}\\ \end{array}\right) \widetilde{W}+\mathscr {O}(h^{r+1}), \end{aligned}$$

where \(\widetilde{W}\) is the Wronskian of \(\{\varPhi _{i}(t)\}_{i=1}^{r+1}\) at \(t_{0}\). Since \(\widetilde{W}\) is nonsingular, \(\varLambda \) is also nonsingular for h which is sufficiently small but not zero and the Eq. (1.40) makes sense in this case. Then \(\{l_{i}(\tau )\}_{i=1}^{r+1}\) is a basis of \(X_{h}\) satisfying \(l_{i}(d_{j})=\delta _{ij}\) and \(u(\tau )\) can be expressed as

$$\begin{aligned} u(\tau )=\sum _{i=1}^{r+1}u(d_{i})l_{i}(\tau ). \end{aligned}$$

Choosing \(d_{i}=(i-1)/r\) and denoting \(y_{\sigma }=u(\sigma )\), (1.14) now reads

$$\begin{aligned} \left\{ \begin{aligned}&y_{\sigma }=\sum _{i=1}^{r+1}y_{\frac{i-1}{r}}l_{i}(\sigma ),\\&y_{\frac{i-1}{r}}=y_{0}+h\int _{0}^{1}A_{\frac{i-1}{r},\sigma }f(y_{\sigma })d\sigma ,\quad i=2,\ldots ,r+1.\\ \end{aligned}\right. \end{aligned}$$
(1.41)

When f is a polynomial and \(\{\varPhi _{i}(t)\}_{i=1}^{r+1}\) are polynomials, trigonometrical or exponential functions, the integral in (1.41) can be calculated exactly. After solving this algebraic system about variables \(y_{1/r}, y_{2/r},\ldots ,y_{1}\) by iterations, we obtain the numerical solution \(y_{1}\approx y(t_{0}+h)\). Therefore, although the FFCFEr method can be analysed in the form of continuous-stage RK method (1.14), it is indeed an r-stage method in practice. If the integral cannot be directly calculated, we approximate it by a high-order quadrature rule \((b_{k},c_{k})_{k=1}^{s}\). The corresponding fully discrete scheme for (1.41) is

$$\begin{aligned} \left\{ \begin{aligned}&y_{\sigma }=\sum _{i=1}^{r+1}y_{\frac{i-1}{r}}l_{i}(\sigma ),\\&y_{\frac{i-1}{r}}=y_{0}+h\sum _{k=1}^{s}b_{k}A_{\frac{i-1}{r},c_{k}}f(y_{c_{k}}),\quad i=2,\ldots ,r+1.\\ \end{aligned}\right. \end{aligned}$$
(1.42)

By an argument which is similar to that stated at the beginning of Sect. 1.3, (1.42) is equivalent to a discrete version of the FFCFEr method (1.3):

$$\begin{aligned} \left\{ \begin{aligned}&u(0)=y_{0},\\&\langle v,u^{\prime }\rangle _{\tau }=h[v,f\circ u],\quad u(\tau )\in X_{h},\text { for all }v(\tau )\in Y_{h},\\&y_{1}=u(1),\\ \end{aligned}\right. \end{aligned}$$

where \([\cdot ,\cdot ]\) is the discrete inner product:

$$[w_{1},w_{2}]=[w_{1}(\tau ),w_{2}(\tau )]_{\tau }=\sum _{k=1}^{s}b_{k}w_{1}(c_{k})\cdot w_{2}(c_{k}).$$

By the proof procedure of Theorem 1.3, one can show that the fully discrete scheme is still symmetric provided the quadrature rule is symmetric, i.e. \(c_{s+1-k}=1-c_{k}\) and \(b_{s+1-k}=b_{k}\) for \(k=1,2,\ldots ,s\).

Now it is clear that the practical form (1.41) or (1.42) is determined by the Lagrange interpolation functions \(l_{i}(\tau )\) and the coefficient \(A_{\tau ,\sigma }\). For the CFEr method,

$$\begin{aligned} Y_{h}=\text {span}\left\{ 1,\tau ,\ldots ,\tau ^{r-1}\right\} ,\quad X_{h}=\text {span}\left\{ 1,\tau ,\ldots ,\tau ^{r}\right\} , \end{aligned}$$

and all \(l_{i}(\tau )\) for \( i=1,2,\ldots ,r+1\) are Lagrange interpolation polynomials of degrees r. The \(A_{\tau ,\sigma }\) for \(r=2,3,4\) are given by

$$\begin{aligned} A_{\tau ,\sigma }=\left\{ \begin{aligned}&(4+6\sigma (-1+\tau )-3\tau )\tau ,\quad r=2,\\&\tau (9-18\tau +10\tau ^{2}+30\sigma ^{2}(1-3\tau +2\tau ^2)-12\sigma (3-8\tau +5\tau ^{2})),\quad r=3,\\&\tau (16-60\tau +80\tau ^{2}-35\tau ^{3}+140\sigma ^{3}(-1+6\tau -10\tau ^{2}+5\tau ^{3})\\&+60\sigma (-2+10\tau -15\tau ^{2}+7\tau ^{3})-30\sigma ^{2}(-8+45\tau -72\tau ^{2}+35\tau ^{3})),\quad r=4.\\ \end{aligned}\right. \end{aligned}$$

For the TFCFEr method,

$$\begin{aligned} Y=\text {span}\left\{ 1,t,\ldots ,t^{r-3},\cos (\omega t),\sin (\omega t)\right\} , \end{aligned}$$

then

$$\begin{aligned}\begin{aligned} Y_{h}&=\text {span}\left\{ 1,\tau ,\ldots ,\tau ^{r-3},\cos (\nu \tau ),\sin (\nu \tau )\right\} ,\\ X_{h}&=\text {span}\left\{ 1,\tau ,\ldots ,\tau ^{r-2},\cos (\nu \tau ),\sin (\nu \tau )\right\} , \end{aligned}\end{aligned}$$

where \(\nu =h\omega \). The corresponding \(A_{\tau ,\sigma }\) and \(l_{i}(\tau )\) are more complicated than those of CFEr, but one can calculate them by the formulae (1.15) and (1.40) without any difficulty before solving the IVP numerically. Consequently, the computational cost of the TFCFEr method at each step is comparable to that of the CFEr method. Besides, when \(\nu \) is small, in order to avoid unacceptable cancellation, it is recommended to calculate variable coefficients in TF methods by their Taylor expansions with respect to \(\nu \) at zero.

1.5 Numerical Experiments

In this section, we carry out four numerical experiments to test the effectiveness and efficiency of the new methods TFCFEr based on the space (1.7) for \(r=2,3,4\) and TF2CFE4 based on the space (1.8) in the long-term computation of structure preservation. These new methods are compared with standard r-stage 2rth-order EP CFEr methods for \(r=2,3,4\). Other methods such as the 2-stage 4th-order EF symplectic Gauss–Legendre collocation method (denoted by EFGL2) derived in [7] and the 2-stage 4th-order EF EP method (denoted by EFCRK2) derived in [30] are also considered. Since all of these structure-preserving methods are implicit, fixed-point iterations are needed to solve the nonlinear algebraic systems at each step. The tolerance error for the iteration solution is set to \(10^{-15}\) in the numerical simulation.

Numerical quantities with which we are mainly concerned are the Hamiltonian error

$$EH=(EH^{0},EH^{1},\ldots ),$$

with

$$EH^{n}=|H(y_{n})-H(y_{0})|,$$

and the solution error

$$ME=(ME^{0},ME^{1},\ldots ),$$

with

$$ME^{n}=||y_{n}-y(t_{n})||_{\infty }.$$

Correspondingly, the maximum global errors of Hamiltonian (GEH) and the solution (GE) are defined by:

$$GEH=\max _{n\ge 0}EH^{n},\quad GE=\max _{n\ge 0}ME^{n},$$

respectively. Here the numerical solution at the time node \(t_{n}\) is denoted by \(y_{n}\).

Fig. 1.1
figure 1

Copyright ©2016 Society for Industrial and Applied Mathematics. Reprinted with permission. All rights reserved.

a The logarithm of the maximum global error against the logarithm of the stepsize. The dashed lines have slopes four, six and eight. b The logarithm of the maximum global error against the logarithm of function evaluations. c The logarithm of the maximum global error of Hamiltonian against the logarithm of the stepsize.

Example 1.1

Consider the Perturbed Kepler problem defined by the Hamiltonian:

$$\begin{aligned} H(p,q)=\frac{1}{2}(p_{1}^{2}+p_{2}^{2})-\frac{1}{(q_{1}^{2}+q_{2}^{2})^{\frac{1}{2}}}-\frac{2\varepsilon +\varepsilon ^{2}}{3(q_{1}^{2}+q_{2}^{2})^{\frac{3}{2}}}, \end{aligned}$$

with the initial condition \(q_{1}(0)=1,q_{2}=0,p_{1}(0)=0,p_{2}=1+\varepsilon ,\) where \(\varepsilon \) is a small parameter. The exact solution of this IVP is

$$q_{1}(t)=\cos ((1+\varepsilon )t),\quad q_{2}(t)=\sin ((1+\varepsilon )t),\quad p_{i}(t)=q_{i}^{\prime }(t),\ i=1,2.$$

Taking \(\omega =1\), \(\varepsilon =0.001\) and \(h=1/2^{i}\) for \(i=-1,0,\ldots ,6,\) we integrate this problem over the interval \([0,200\pi ]\) by the TF2CFE4, TFCFEr and CFEr methods for \(r=2,3,4.\) The nonlinear integral in the r-stage method is evaluated by the \((r+1)\)-point Gauss–Legendre quadrature rule. Numerical results are presented in Fig. 1.1.

From Fig. 1.1a it can be observed that TFCFEr and TF2CFE4 methods show the expected order. Under the same stepsize, the TF method is more accurate than the non-TF method of the same order. Since the double precision provides only 16 significant digits, the numerical results are polluted significantly by rounding errors when the maximum global error attains the magnitude \(10^{-11}\). Figure 1.1b shows that the efficiency of the TF method is higher than that of the non-TF method of the same order. Besides, high-order methods are more efficient than low-order ones when the stepsize is relatively small.

In Fig. 1.1c, one can see that all of these EP methods preserve the Hamiltonian very well. The errors in the Hamiltonian are mainly contributed by the quadrature error when the stepsize h is large and the rounding error when h is small.

Fig. 1.2
figure 2

Copyright ©2016 Society for Industrial and Applied Mathematics. Reprinted with permission. All rights reserved.

a The logarithm of the maximum global error against the logarithm of the stepsize. The dashed lines have slopes four and six. b The logarithm of the maximum global error against the logarithm of iteration times. c The logarithm of the maximum global error of Hamiltonian against the logarithm of the stepsize.

Example 1.2

Consider the Duffing equation defined by the Hamiltonian:

$$\begin{aligned} H(p,q)=\frac{1}{2}p^{2}+\frac{1}{2}(\omega ^{2}+k^{2})q^{2}-\frac{k^{2}}{2}q^{4} \end{aligned}$$

with the initial value \(q(0)=0, p(0)=\omega \). The exact solution of this IVP is

$$q(t)=sn(\omega t;k/\omega ),\quad p(t)=cn(\omega t;k/\omega )dn(\omega t;k/\omega ).$$

where sncn and dn are Jacobi elliptic functions. Taking \(k=0.07, \omega =5\) and \(h=1/5\times 1/2^{i}\) for \(i=0,1,\ldots ,5,\) we integrate this problem over the interval [0, 100] by TFCFE2, TFCFE3, CFE2, CFE3 and EFCRK2 methods. Since the nonlinear term f is polynomial, we can calculate the integrals involved in these methods exactly by Mathematica at the beginning of the computation. Numerical results are shown in Fig. 1.2.

In Fig. 1.2a, one can see that the TF method is more accurate than the non-TF method of the same order under the same stepsize. For both as 2-stage 4th-order methods, TFCFE2 method is more accurate than EFCRK2 method for this problem. Again, it can be observed from Fig. 1.2b that the efficiency of the CFEr method is lower than that of the EF/TF method of the same order. Although the nonlinear integrals are exactly calculated in theory, Fig. 1.2c shows that all of these methods only approximately preserve the Hamiltonian. It seems that the rounding error increases as \(h\rightarrow 0\).

Example 1.3

Consider the Fermi–Pasta–Ulam problem studied by Hairer et al. in [22, 23], which is defined by the Hamiltonian

$$\begin{aligned} H(p,q)=\frac{1}{2}p^{\intercal }p+\frac{1}{2}q^{\intercal }Mq+U(q), \end{aligned}$$

where

$$\begin{aligned} \begin{array}{c} M=\left( \begin{array}[c]{cc} O_{m\times m} &{} O_{m\times m}\\ O_{m\times m} &{} \omega ^{2}I_{m\times m} \end{array} \right) ,\\ U(q)=\dfrac{1}{4}\left( (q_{1}-q_{m+1})^{4}+\textstyle \sum \limits _{i=1} ^{m-1}(q_{i+1}-q_{m+i+1}-q_{i}-q_{m+i})^{4}+(q_{m}+q_{2m})^{4}\right) . \end{array} \end{aligned}$$

In this problem, we choose \(m=2, q_{1}(0)=1, p_{1}(0)=1, q_{3}(0)=1/\omega , p_{3}(0)=1,\) and zero for the remaining initial values. Setting \(\omega =50, h=1/50\) and \(\omega =100, h=1/100\), we integrate this problem over the interval [0, 100] by CFE2, CFE3, TFCFE2, TFCFE3 and EFCRK2 methods. The nonlinear integrals are calculated exactly by Mathematica at the beginning of the computation. We choose the numerical solution obtained by a high-order method with a sufficiently small stepsize as the ‘reference solution’ in the FPU problem. Numerical results are plotted in Fig. 1.3.

In Fig. 1.3a, c, one can see that the TF methods are more accurate than non-TF ones. Unlike the previous problem, the EFCRK2 method wins slightly over TFCFE2 method in this case. The Fig. 1.3b, d also show that all of these methods display promising EP property, which is especially important in the FPU problem.

Fig. 1.3
figure 3

Copyright ©2016 Society for Industrial and Applied Mathematics. Reprinted with permission. All rights reserved.

a, c The logarithm of the solution error against time t. b, d The logarithm of the Hamiltonian error against time t.

Example 1.4

Consider the IVP defined by the nonlinear Schrödinger equation

$$\begin{aligned} \left\{ \begin{aligned}&iu_{t}+u_{xx}+2|u|^{2}u=0,\\&u(x,0)=\varphi (x),\\ \end{aligned}\right. \end{aligned}$$
(1.43)

where u is a complex function of xt, and i is the imaginary unit. Taking the periodic boundary condition \(u(x_{0},t)=u(x_{0}+L,t)\) and discretizing the spatial derivative \(\partial _{xx}\) by the pseudospectral method (see e.g. [13]), this problem is converted into a complex system of ODEs:

$$\begin{aligned} \left\{ \begin{aligned}&i\frac{d}{dt}U+D^{2}U+2|U|^{2}\cdot U=0,\\&U(0)=(\varphi (x_{0}),\varphi (x_{1}),\ldots ,\varphi (x_{d-1}))^{\intercal },\\ \end{aligned}\right. \end{aligned}$$

or an equivalent Hamiltonian system:

$$\begin{aligned} \left\{ \begin{aligned}&\frac{d}{dt}P=-D^{2}Q-2(P^{2}+Q^{2})\cdot Q,\\&\frac{d}{dt}Q=D^{2}P+2(P^{2}+Q^{2})\cdot P,\\&P(0)=real(U(0)),\quad Q(0)=imag(U(0)),\\ \end{aligned}\right. \end{aligned}$$
(1.44)

where the superscript ‘2’ is the entrywise square multiplication operation for vectors, \(x_{n}=x_{0}+n\varDelta x/d\) for \(n=0,1,\ldots ,d-1\), \(U=(U_{0}(t),U_{1}(t),\ldots ,U_{d-1}(t))^{\intercal }, P(t)=real(U(t)), Q(t)=imag(U(t))\) and \(D=(D_{jk})_{0\le j,k\le d-1}\) is the pseudospectral differential matrix defined by:

$$\begin{aligned} D_{jk}=\left\{ \begin{array}{ll} \frac{\pi }{L}(-1)^{j+k}\mathrm{cot}(\pi \frac{x_{j}-x_{k}}{L}),\ &{}\;\;\; j\ne k,\\ 0,&{} j=k. \end{array}\right. \end{aligned}$$

The Hamiltonian or the total energy of (1.44) is

$$\begin{aligned} H(P,Q)=\frac{1}{2}P^{\intercal }D^{2}P+\frac{1}{2}Q^{\intercal }D^{2}Q+{\frac{1}{2}\sum _{i=0}^{d-1}(P_{i}^{2}+Q_{i}^{2})^{2}.} \end{aligned}$$

In [33], the author constructed a periodic bi-soliton solution of (1.43):

$$\begin{aligned} u(x,t)=\frac{\varPhi }{\varPsi }, \end{aligned}$$
(1.45)

where

$$\begin{aligned}\begin{aligned}\varPhi&=(\exp (iM^{2}t)M\cosh ^{-1}(M(x-A))-\exp (iN^{2}t)N\cosh ^{-1}(N(x+A))),\\ \varPsi&=(\cosh (J)-\sinh (J)(\tanh (M(x-A))\tanh (N(x+A))\\ {}&+\cos ((M^{2}-N^{2})t)\cosh ^{-1}(M(x-A))\cosh ^{-1}(N(x+A)))) \end{aligned} \end{aligned}$$

with

$$\begin{aligned} J=\tanh ^{-1}(\frac{2MN}{M^{2}+N^{2}}). \end{aligned}$$

This solution can be viewed approximately as the superposition of two single solitons located at \(x=A\) and \(x=-A\) respectively. Since it decays exponentially when \(x\rightarrow \infty \), we can take the periodic boundary condition for sufficiently small \(x_{0}\) and large L with little loss of accuracy. Aside from the total energy, it is well known that the semi-discrete NLS (1.44) has another invariant, the total charge

$$C(P,Q)=\sum _{i=0}^{d-1}(P_{i}^{2}+Q_{i}^{2}).$$

Thus, we also calculate the error in the charge (EC):

$$EC=(EC^{0},EC^{1},\ldots )$$

with

$$EC^{n}=|C^{n}-C^{0}|,\quad C^{n}=C(P^{n},Q^{n})$$

where \(P^{n}\approx P(t_{n}), Q^{n}\approx Q(t_{n})\) is the numerical solution at the time node \(t_{n}\). Taking \(x_{0}=-50, L=100, A=10, M=1, N=2^{\frac{1}{2}}, d=450, h=0.2, \omega =2, \) we integrate the semi-discrete problem (1.44) by the TFCFE2, CFE2 and EFGL2 methods over the time interval [0, 100]. The nonlinear integrals are calculated exactly by Mathematica at the beginning of the computation. Numerical results are presented in Fig. 1.4.

It is noted that the exact solution (1.45) has two approximate frequency \(M^{2}\) and \(N^{2}\). By choosing the larger frequency \(N^{2}=2\) as the fitting frequency \(\omega \), the EF/TF methods still reach higher accuracy than the general-purpose method CFE2, see Fig. 1.4a. Among three EF/TF methods, TFCFE2 is the most accurate. Figure 1.4b shows that three EP methods CFE2, TFCFE2 and EFCRK2 preserve the Hamiltonian (apart from the rounding error). Since EFGL2 is a symplectic method, it preserves the discrete charge, which is a quadratic invariant, see Fig. 1.4c. Although TFCFE2 method cannot preserve the discrete charge, its error in the charge is smaller than the charge errors of CFE2 and EFCRK2.

Fig. 1.4
figure 4

Copyright ©2016 Society for Industrial and Applied Mathematics. Reprinted with permission. All rights reserved.

a The logarithm of the solution error against time t (left). b The logarithm of the Hamiltonian error against time t (middle). c The logarithm of the charge error against time t (right).

1.6 Conclusions and Discussions

Highly oscillatory systems constitute an important category of differential equations in applied sciences. The numerical treatment of oscillatory systems is full of challenges. Readers are referred to Hairer et al. [23], Iserles [26], Petzold et al. [14], Cohen et al. [34], Wu et al. [44, 45], and references contained therein. This chapter is mainly concerned with the establishment of high-order functionally-fitted energy-preserving methods for solving oscillatory nonlinear Hamiltonian systems. We have derived new FFCFEr methods based on the analysis of continuous finite element methods. The FFCFEr methods can be thought of as a continuous-stage Runge–Kutta methods, and hence it can be used conveniently in applications. The geometric properties and algebraic orders of the method have been analysed in detail. By equipping FFCFEr with the spaces (1.7) and (1.8), we have developed the TFEP methods denoted by TFCFEr and TF2CFEr which are suitable for solving oscillatory Hamiltonian systems with a fixed frequency \(\omega \). Evaluating the nonlinear integrals in the EP methods exactly or approximately, we have compared TFCFEr for \(r=2,3,4\) and TF2CFE4 with other structure-preserving methods such as EP methods CFEr for \(r=2,3,4\), the EP method EFCRK2 and the symplectic method EFGL2. The numerical results show that the newly derived TFEP methods exhibit definitely a high accuracy, an excellent invariant-preserving property and a prominent long-term behaviour.

In numerical experiments, we are mainly concerned with the TFCFEr methods when applied to oscillatory Hamiltonian systems. However, the FFCFEr methods, by nature, are symmetric and of order 2r for the general autonomous system \(y^{\prime }(t)=f(y(t))\). By choosing appropriate function spaces, the FFCFEr methods can be applied to solve a much wider class of dynamic systems in applications. For example, the application of the FF Runge–Kutta method to the stiff system has been shown in [32]. Consequently, we conclude that FFCFEr methods are likely to be a class of highly flexible methods with many potential applications.

In conclusion, in this chapter, from the perspective of the continuous finite element method, we have presented and analysed energy-preserving functionally fitted methods, in particular, trigonometrically fitted methods of an arbitrarily high order for solving oscillatory nonlinear Hamiltonian systems with a fixed frequency. In the next chapters, we will consider multi-frequency highly oscillatory systems.

This chapter is based on the work of Li and Wu [28].