1 Introduction

We are interested in the numerical solution of initial value problems for ODEs exhibiting oscillatory solution. Classical numerical integrators could require a very small stepsize to follow the oscillations, expecially when the frequency increases. To develop efficient and accurate numerical methods, we propose an adapted numerical integration based on exploiting a-priori known information about the behavior of the exact solution, by means of exponential fitting strategy (Ixaru and Vanden Berghe 2004). We combine this feature with the usage of peer methods, which represent a highly structured subclass of General Linear Methods (Jackiewicz 2009) and are identified with several distinct stages, such as Runge–Kutta methods.

Peer methods have been introduced in linearly implicit form in Schmitt and Weiner (2004). Explicit peer methods have been derived in Kulikov and Weiner (2010), Schmitt and Weiner (2010), Schmitt et al. (2009) and Weiner et al. (2008), while implicit peer methods are described in Beck et al. (2012), Podhaisky et al. (2005), Schmitt et al. (2013, 2005a, b) and Soleimani and Weiner (2017). The attribute “peer” means that all s stages have the same good accuracy properties and a linearly implicit implementation using only one Newton-step is possible for implicit methods since accurate predictors are easily available (Schmitt and Weiner 2004). Moreover, as the internal stages are also external variables, the stage order is equal to the order. Therefore, implicit peer methods are quite efficient for stiff problems since they do not show order reduction like one-step methods but still allow easy stepsize control due to the two-step structure (Schmitt and Weiner 2017; Schmitt et al. 2005b; Soleimani and Weiner 2017). Furthermore, they have good stability properties in comparison with other multistep methods. In other words, peer methods combine the benefits of the Runge–Kutta and multi-step approach, thus obtaining good stability characteristics without reducing orders for very stiff systems (Schmitt et al. 2005a). Moreover, for suitable choice of the parameters, these methods have an inherent parallelism across the method (Schmitt and Weiner 2004; Schmitt et al. 2005b). This feature may be very useful in the discretization of PDEs when the number of spatial points increases (see Gerisch et al. 2009 for applications of peer methods to large-scale problems).

We combine peer methods with exponential fitting strategy (Ixaru and Vanden Berghe 2004), to obtain more convenient formulae for solving oscillatory problems. As a matter of fact, classical peer methods are developed to be exact (within round-off error) on polynomials up to a certain degree. We propose Exponentially Fitted (EF) peer methods, which are constructed to be exact on functions other than polynomials. The basis functions are normally supposed to belong to a finite-dimensional space \({\mathcal {F}}_q=\left\{ \phi _0(t),\phi _1(t),\dots ,\phi _q(t) \right\} \) called fitting space and are selected according to the a-priori known information concerning the behaviour of the exact solution. As a result, the coefficients of the corresponding methods are no longer constant as in the classic case, but depend on parameters characterizing the exact solution (i.e. the frequency of oscillation), whose values may be unknown. Hence, the exponential fitting technique requires the choice of a suitable fitting space and the estimate or the computation of the afore-mentioned parameters.

By following Ixaru and Vanden Berghe (2004), the exponential fitting strategy has led to EF methods for a wide range of problems such as interpolation, numerical differentiation and quadrature (Conte et al. 2010, 2014; Conte and Paternoster 2016; Conte et al. 2012; Ixaru 1997; Ixaru and Paternoster 2001; Kim et al. 2002, 2003; Van Daele et al. 2005), numerical solution of integral equations (Cardone et al. 2010a, b, 2012, 2015), PDEs (D’Ambrosio et al. 2017a, b; D’Ambrosio and Paternoster 2014b, 2016) and ODEs (Calvo et al. 1996; D’Ambrosio et al. 2009; D’Ambrosio and Paternoster 2014a; Simos 1998, 2001; Vanden Berghe et al. 1999, 2001). In particular, two-step hybrid exponentially fitted methods are proposed for the integration of second-order differential equations in D’Ambrosio et al. (2011a, b), while various estimates for the parameter characterizing the coefficients of the methods are presented in D’Ambrosio et al. (2012a, b, 2017a). Adapted Runge–Kutta methods are introduced in D’Ambrosio et al. (2011c, 2012a, 2014), D’Ambrosio and Paternoster (2014b), Ixaru (2012), Ixaru and Vanden Berghe (2004), Ozawa (2001), Paternoster (1998) and Simos (1998, 2001). In Ozawa (2001), it has been shown that for any fitting space \({\mathcal {F}}_q\) of smooth linearly independent real functions there exists a q-stage Runge–Kutta method fitted to \({\mathcal {F}}_q\). However, the stage order of a Runge–Kutta method extremely influences the highest dimension that can be achieved by the fitting space, especially in case of explicit Runge–Kutta methods. For instance, in Vanden Berghe et al. (1999), an explicit four stage RK method has been constructed on a fitting space having the maximum dimension equal to 3. In contrast, linear multistep methods do not impose such a strong dimensional limit, as shown in Gautschi (1961). Indeed, a k-step method can be fitted on a \(k+1\)-dimensional fitting space. EF peer methods, which can combine the advantages of Runge–Kutta and multistep methods, have been derived in Conte et al. (2019a, b), where explicit EF peer methods having order equal to the number of stages has been developed. Other families of adapted peer methods have been constructed in Calvo et al. (2015) and Montijano et al. (2014).

In this paper, we develop a general class of EF implicit peer method having order equal to the number of stages and lower triangular coefficients matrix, by employing the six-step procedure described in Ixaru and Vanden Berghe (2004).

The remainder of the paper is organized into five sections: In Sect. 2, we give a short overview to classical implicit peer methods. Section 3 outlines the construction of implicit EF peer methods adapted to a general fitting space. In Sect. 4, some examples of EF peer methods with 2 and 3 stages are shown. Experimental results are presented in Sect. 5. Section 6 summarizes the results of this work and draws conclusions.

2 Classical implicit peer methods

Consider initial value problems for ODEs of the form

$$\begin{aligned} y'(t)=f(t,y(t)), \quad y(t_0)=y_0 \in {\mathbb {R}}^{\text {d}}, \quad t\in [t_0, T], \end{aligned}$$
(2.1)

where \(f: {\mathbb {R}}\times {\mathbb {R}}^{\text {d}} \rightarrow {\mathbb {R}}^{\text {d}}\) is smooth enough to guarantee the existence and the uniqueness of the solution. We suppose that for any stepsize \(h>0\) there exists a starting procedure to approximate the solution in the internal grid points \(t_{0i}=t_0+c_i\,h, \; i=1,\dots ,s\). An s-stage two-step peer method with fixed stepsize h has the following expression:

$$\begin{aligned} \begin{aligned} Y_{ni}&=\sum _{j=1}^{s}b_{ij}\;Y_{n-1,j}+h \sum _{j=1}^{s}a_{ij}\;f(t_{n-1,j},Y_{n-1,j}) + h \sum _{j=1}^{i}r_{ij}\;f(t_{nj},Y_{nj}), \\&i=1,\dots ,s, \end{aligned} \end{aligned}$$
(2.2)

where

$$\begin{aligned} Y_{ni} \approx y(t_{ni}), \quad t_{ni}=t_n+c_i\,h, \quad i=1,\dots ,s. \end{aligned}$$

No extraordinary numerical solution with different properties is computed: we assume that \(c_s=1\), so \(Y_{ns}\) is the approximation of the solution at grid point \(t_{n+1}\). The other nodes are chosen such that \(c_i < 1\) for \(i=1,\dots ,s-1\).

2.1 Order conditions

For simplicity of notation, from now on, we assume that problem (2.1) is scalar and we employ the following notation:

$$\begin{aligned} \begin{aligned} Y_n&= \left[ Y_{ni} \right] _{i=1}^{s}, F(Y_n)= \left[ f(t_{ni},Y_{ni}) \right] _{i=1}^{s},\\ A&=\left[ a_{ij} \right] _{i,j=1}^{s}, B=\left[ b_{ij} \right] _{i,j=1}^{s}, R=\left[ r_{ij} \right] _{i,j=1}^{s}, \end{aligned} \end{aligned}$$

where A and B are full matrices and R is a lower triangular matrix. A compact representation of the method (2.2) is as follows:

$$\begin{aligned} Y_n=B\,Y_{n-1}+h\,A\,F(Y_{n-1})+h\,R\,F(Y_n). \end{aligned}$$
(2.3)

The matrices of coefficients A, B and R are constructed in order to achieve high order (uniformly for all components \(Y_{ni}\)) and good stability properties. We consider singly implicit methods, i.e. the matrix R is lower triangular with \(r_{{\mathrm{ii}}}=\gamma \ge 0\) (when \(\gamma =0\) we have an explicit method). We recall that the method (2.2) has order of consistency p if \(\varDelta _{ni}= {\mathcal {O}}(h^p)\) for \(i=1,\dots ,s\), where \(\varDelta _{ni}\) is the residual obtained by inserting the exact solution in the numerical scheme (2.2). Schmitt and Weiner (2004) have related this property to the simplifying condition

$$\begin{aligned} \begin{aligned} \mathrm {AB}(q)&= c_i^m - \sum _{j=1}^{s}b_{ij}\;(c_{j}-1)^m-m\sum _{j=1}^{s}a_{ij}\;(c_{j}-1)^{m-1}- m \sum _{j=1}^{i}r_{ij}\;c_{j}^{m-1}=0,\\&\quad m=0,\dots ,q-1,\; i=1,\dots ,s, \end{aligned} \end{aligned}$$
(2.4)

as follows:

Theorem 1

If \(\mathrm {AB}(p+1)\) is verified, the implicit s-stage peer method (2.2) has order of consistency p.

Corollary 1

The peer method (2.2) has order \(p \ge s\) if

$$\begin{aligned} B\;{\mathbf {1}}&={\mathbf {1}}, \end{aligned}$$
(2.5a)
$$\begin{aligned} A V_1 D \; \;&=C V_0 -B \, (C-{\mathbb {I}}) V_1-RV_{0}D, \end{aligned}$$
(2.5b)

where \({\mathbf {1}}=[1,1,\dots ,1]^T\), \(C=\text {diag}(c_1,\dots ,c_s)\), \( D=\text {diag}(1,\dots ,s)\) and

$$\begin{aligned} \begin{aligned}&V_0= \left[ \begin{array}{cccc} 1 &{} c_1 &{} \dots &{} c_1^{s-1} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ 1 &{} c_s &{} \dots &{} c_s^{s-1} \end{array} \right] ,\quad V_1= \left[ \begin{array}{cccc} 1 &{} (c_{1}-1) &{} \dots &{} (c_{1}-1) ^{s-1} \\ \vdots &{} \vdots &{} \vdots &{} \vdots \\ 1 &{} (c_{s}-1) &{} \dots &{} (c_{s}-1) ^{s-1} \end{array} \right] . \end{aligned} \end{aligned}$$

3 EF implicit peer methods

The procedure for the construction of EF implicit peer method follows the lines down by paper (Conte et al. 2019a) in the case of explicit methods. In this section, we underline the relevant steps of the procedure and present a new formulation of the order conditions. We first of all consider the fitting space as follows:

$$\begin{aligned} {\mathcal {F}}=\left\{ 1,t,t^2,\dots ,t^K,e^{\pm \mu t}, t \,e^{\pm \mu t}, t^2 e^{\pm \mu t},\dots , t^P e^{\pm \mu t} \right\} , \end{aligned}$$
(3.1)

where \(\mu \) is a parameter characterizing the exact solution and it is real or imaginary, if the exact solution belongs to the space spanned by hyperbolic functions or trigonometric functions, respectively. Additionally, assume that \( K = -1 \) if there are no classical components and \( P = -1 \), if there are not exponential fitting ones.

The linear operator as the residual obtained by inserting the exact solution in the method (2.2) as follows:

$$\begin{aligned} \begin{aligned} {\mathcal {L}}_i[h,{\mathbf {w}}]\; y(t)=&y(t+c_i\,h)-\sum _{j=1}^{s}b_{ij}\;y(t+(c_{j}-1)\, h)\\&- h \sum _{j=1}^{s}a_{ij}\;y'(t+(c_{j}-1)\,h)-h\sum _{j=1}^{i}r_{ij}\;y'(t+c_j\,h),\, i=1,\dots ,s, \end{aligned} \end{aligned}$$
(3.2)

where \({\mathbf {w}}\) contains the coefficients of the method. The method (2.2) is adapted to the fitting space \({\mathcal {F}}\) if the difference operator (3.2) annihilates on these basis functions. This procedure, for fixed nodes c, leads to a linear system having the coefficients of the method as unknowns, because of the dependence of the difference operator on such coefficients.

To derive the order conditions, we now present some steps of the six-step procedure introduced in Ixaru and Vanden Berghe (2004). Indeed, authors in Conte et al. (2019a) have used the same procedure for the derivation of EF explicit peer methods, but in this paper, we consider a lower triangular matrix R with \(r_{{\mathrm{ii}}}=\gamma \ge 0\) (when \(\gamma =0\) we have an explicit method). For more details, reader is referred to Conte et al. (2019a).

By performing the first five steps of the six-step procedure, and following the same steps used in Conte et al. (2019a), we obtain that \(K+1=s-1-2P\), where K and P characterize the fitting space (3.1) and s is the number of stages of the peer method. Moreover, the coefficients of implicit EF peer methods satisfy the conditions below.

  • If s is even, we take \(P= \dfrac{s}{2}-1\) and \(K=0\), with corresponding fitting space (3.1)

    $$\begin{aligned} {\mathcal {F}}=\left\{ 1, e^{\pm \mu t},t \,e^{\pm \mu t}, t^2 \, e^{\pm \mu t}, \dots , t^P \, e^{\pm \mu t} \right\} , \end{aligned}$$
    (3.3)

    and the coefficients of the method satisfy:

    $$\begin{aligned} {\mathcal {L}}_{i0}^*(h,{\mathbf {w}})&=0, \quad i=1,\dots ,s, \end{aligned}$$
    (3.4a)
    $$\begin{aligned} G_i^{\pm (m)}(Z,{\mathbf {w}})&=0, \quad i=1,\dots ,s, \quad m=0,\dots , P. \end{aligned}$$
    (3.4b)
  • If s is odd, we take \(P= \dfrac{s-1}{2}\) and \(K=-1\), with corresponding fitting space (3.1)

    $$\begin{aligned} {\mathcal {F}}=\left\{ e^{\pm \mu t}, t\, e^{\pm \mu t}, t^2 \, e^{\pm \mu t}, \dots , t^P \, e^{\pm \mu t} \right\} , \end{aligned}$$
    (3.5)

    and the coefficients of the method satisfy:

    $$\begin{aligned} G_i^{\pm (m)}(Z,{\mathbf {w}})=0, \quad i=1,\dots ,s, \quad m=0,\dots , P. \end{aligned}$$
    (3.6)

The \({\mathcal {L}}_{i0}^*(h,{\mathbf {w}})\) and \(G_i^{\pm (m)}(Z,{\mathbf {w}})=0\) functions in above conditions are derived similarly to Conte et al. (2019a) and their expression is displayed in the following theorem.

Theorem 2

The dimensionless classical moments defined as:

$$\begin{aligned} \begin{aligned} {\mathcal {L}}_{i\,m}^*(h,{\mathbf {w}})&= \dfrac{1}{h^m}{\mathcal {L}}_i[h,\mathbf{w }] t^m|_{t=0},\quad i=1,\dots ,s, \end{aligned} \end{aligned}$$
(3.7)

we have the form:

$$\begin{aligned} \begin{aligned} {\mathcal {L}}_{i\,m}^*(h,{\mathbf {w}})&=c_i^m- \sum _{j=1}^{s}b_{ij}\;(c_{j}-1)^m - m \sum _{j=1}^{s}a_{ij}\;(c_{j}-1)^{m-1} -m\sum _{j=1}^{i}r_{ij}\;c_j^{m-1},\\&\text { for } \; i=1,\dots ,s, \quad m=0,1,\dots , M-1. \end{aligned} \end{aligned}$$
(3.8)

The G-functions and their derivatives assume the following expressions for \(i=1,\dots ,s\):

$$\begin{aligned} G_i^+(Z,{\mathbf {w}}){=}&\eta _{-1}\left( c_i^2 Z \right) -\sum _{j=1}^{s}b_{ij}\;\eta _{-1}\left( (c_{j}-1)^2 Z \right) {-}Z \sum _{j=1}^{s}a_{ij}\;(c_{j}-1)\;\eta _{0} \left( (c_{j}-1)^2 Z\right) \nonumber \\&\quad -Z \sum _{j=1}^{i}r_{ij}\;c_j \; \eta _{0} \left( c_j^2 Z\right) , \nonumber \\ G_i^-(Z,{\mathbf {w}})=&c_i \;\eta _{0} \left( c_i^2 Z\right) -\sum _{j=1}^{s}b_{ij}\;(c_{j}-1)\;\eta _{0} \left( (c_{j}-1)^2 Z\right) -\sum _{j=1}^{s}a_{ij}\;\eta _{-1}\left( (c_{j}-1)^2 Z \right) \nonumber \\&\quad - \sum _{j=1}^{i}r_{ij}\;\eta _{-1}\left( c_j^2 Z \right) ,\end{aligned}$$
(3.9)
$$\begin{aligned} G_i^{+(m)}(Z,{\mathbf {w}})&= \dfrac{c_i^{2m}}{2^m} \eta _{m-1} \left( c_i^2 Z\right) -\sum _{j=1}^{s}b_{ij}\;\dfrac{(c_{j}-1)^{2m}}{2^m} \eta _{m-1} \left( (c_{j}-1)^2 Z\right) \nonumber \\&\quad -\sum _{j=1}^{s}a_{ij}\;\left[ \dfrac{m\,(c_{j}-1)^{2m-1}}{2^{m-1}}\eta _{m-1} \left( (c_{j}-1)^2 Z\right) \right. \nonumber \\&\left. \quad +\dfrac{(c_{j}-1)^{2m+1}}{2^{m}}\; Z\;\eta _{m} \left( (c_{j}-1)^2 Z\right) \Big ]\right] \nonumber \\&\quad -\sum _{j=1}^{i}r_{ij}\;\left[ \dfrac{m\,c_{j}^{2m-1}}{2^{m-1}}\eta _{m-1} \left( c_{j}^2 Z\right) +\dfrac{c_{j}^{2m+1}}{2^{m}}Z\eta _{m} \left( c_{j}^2 Z\right) \right] , \nonumber \\&\quad m=1, \dots ,P, \nonumber \\ G_i^{-(m)}(Z,{\mathbf {w}})=&\dfrac{c_i^{2m+1}}{2^m} \eta _{m} \left( c_i^2 Z\right) -\sum _{j=1}^{s}b_{ij}\;\dfrac{(c_{j}-1)^{2m+1}}{2^m} \eta _{m} \left( (c_{j}-1)^2 Z\right) \nonumber \\&\quad -\sum _{j=1}^{s}a_{ij}\;\dfrac{(c_{j}-1)^{2m}}{2^{m}}\eta _{m-1} \left( (c_{j}-1)^2 Z\right) \nonumber \\&\quad -\sum _{j=1}^{i}r_{ij}\;\dfrac{c_{j}^{2m}}{2^{m}}\eta _{m-1} \left( c_{j}^2 Z\right) , \; m=1, \dots ,P. \end{aligned}$$
(3.10)

Proof

The proof follows the lines of the proof of Theorems 2.2, 2.3 in Conte et al. (2019a). \(\square \)

We recast such systems to drive the coefficients of exponentially fitted peer methods.

Theorem 3

Assume s is even. The peer method (2.2) has order \(p = s\) and is adapted to the fitting space

$$\begin{aligned} {\mathcal {F}}=\left\{ 1,e^{\pm \mu t}, t \,e^{\pm \mu t}, t^2 e^{\pm \mu t},\dots , t^{\frac{s}{2}-1} e^{\pm \mu t} \right\} , \end{aligned}$$

if the coefficient matrices A, B and R satisfy

$$\begin{aligned} B\;{\mathbf {1}}&={\mathbf {1}}, \end{aligned}$$
(3.11a)
$$\begin{aligned} A D_3 \; \;&=D_1-B \, D_2-RD_4, \end{aligned}$$
(3.11b)

where \( {\mathbf {1}}=[1,1,\dots ,1]^T,\) and

$$\begin{aligned} D_1= & {} \small {\left[ \begin{array}{cccc} \dots &{} \dfrac{1}{2^{ i}} \,c_1^{2 i}\, \eta _{ i-1}\left( c_1^2\, Z\right) &{} \dfrac{1}{2^ i} c_1^{2 i+1}\,\eta _{ i} \left( c_1^2 \, Z\right) &{} \dots \\ &{}\vdots &{} \vdots &{} \\ \dots &{} \dfrac{1}{2^{ i}} \,c_s^{2 i}\, \eta _{ i-1}\left( c_s^2\, Z\right) &{} \dfrac{1}{2^ i} c_s^{2 i+1}\,\eta _{ i} \left( c_s^2 \, Z\right) &{} \dots \end{array} \right] ,}\nonumber \\ D_2= & {} {\left[ \begin{array}{cccc} \dots &{} \dfrac{1}{2^{ i}} \,{\hat{c}}_1^{2 i}\, \eta _{ i-1}\left( {\hat{c}}_1^2\, Z\right) &{} \dfrac{1}{2^ i} {\hat{c}}_1^{2 i+1}\,\eta _{ i} \left( {\hat{c}}_1^2 \, Z\right) &{} \dots \\ &{}\vdots &{} \vdots &{} \\ \dots &{} \dfrac{1}{2^{ i}} \,{\hat{c}}_s^{2 i}\, \eta _{ i-1}\left( {\hat{c}}_s^2\, Z\right) &{} \dfrac{1}{2^ i} {\hat{c}}_s^{2 i+1}\,\eta _{ i} \left( {\hat{c}}_s^2 \, Z\right) &{} \dots \end{array} \right] ,} \end{aligned}$$
(3.12)
$$\begin{aligned} D_3= & {} \small {\left[ \begin{array}{cc} \dots &{} \dfrac{i}{2^{ i-1}} \,{\hat{c}}_1^{2 i-1}\, \eta _{ i-1}\left( {\hat{c}}_1^2\, Z\right) + \dfrac{1}{2^{ i}} \,{\hat{c}}_1^{2 i+1}\, Z\eta _{ i}\left( {\hat{c}}_1^2\, Z\right) \quad \dfrac{1}{2^ i} {\hat{c}}_1^{2 i}\,\eta _{ i-1} \left( {\hat{c}}_1^2 \, Z\right) \quad \dots \\ &{}\vdots \\ \dots &{} \dfrac{i}{2^{ i-1}} \,{\hat{c}}_s^{2 i-1}\, \eta _{ i-1}\left( {\hat{c}}_s^2\, Z\right) +\dfrac{1}{2^{ i}} \,{\hat{c}}_s^{2 i+1}\, Z\eta _{ i}\left( {\hat{c}}_s^2\, Z\right) \quad \dfrac{1}{2^ i} {\hat{c}}_s^{2 i}\,\eta _{ i-1} \left( {\hat{c}}_s^2 \, Z\right) \quad \dots \end{array} \right] ,} \nonumber \\ D_4= & {} \small {\left[ \begin{array}{cc} \dots &{} \dfrac{i}{2^{ i-1}} \,{c}_1^{2 i-1}\, \eta _{ i-1}\left( {c}_1^2\, Z\right) + \dfrac{1}{2^{ i}} \,{c}_1^{2 i+1}\, Z\eta _{ i}\left( {c}_1^2\, Z\right) \quad \dfrac{1}{2^ i} {c}_1^{2 i}\,\eta _{ i-1} \left( {c}_1^2 \, Z\right) \quad \dots \\ &{}\vdots \\ \dots &{} \dfrac{i}{2^{ i-1}} \,{c}_s^{2 i-1}\, \eta _{ i-1}\left( {c}_s^2\, Z\right) +\dfrac{1}{2^{ i}} \,{c}_s^{2 i+1}\, Z\eta _{ i}\left( {c}_s^2\, Z\right) \quad \dfrac{1}{2^ i} {c}_s^{2 i}\,\eta _{ i-1} \left( {c}_s^2 \, Z\right) \quad \dots \end{array} \right] {,}}\nonumber \\ \end{aligned}$$
(3.13)

with \(i=0,1,\ldots ,P\) and \(P=\frac{s}{2}-1\). Moreover \(\hat{c_j}=1-c_j,\quad j=0,1,\ldots ,s\).

Proof

Annihilating the dimensionless classic moments of order \(m=0\) in (3.4a) is equivalent to solving the system

$$\begin{aligned} {\mathcal {L}}_{i0}^*(h,\mathbf{w }) = 1- \sum _{j=1}^{s}b_{ij}\;=0, \quad i=1,\dots ,s, \end{aligned}$$

which can be recasted in a matrix form as follows

$$\begin{aligned} {\mathbf {1}}-B \, {\mathbf {1}} = {\mathbf {0}}, \qquad {\mathbf {0}}=(0,0,\dots ,0)^T. \end{aligned}$$

Therefore, (3.11a) holds.

System (3.4b) for \(G_i^+\) can be written in a compact form

$$\begin{aligned} \theta _{-1,\,c} - B \, \theta _{-1,\,c-{\mathbf {1}}} - Z \, A \, (\,{\hat{C}} \, \theta _{0,\, c-{\mathbf {1}}}\,) - Z \, R \, (C \, \theta _{0,\, c})={\mathbf {0}}, \end{aligned}$$
(3.14)

where \(C=\text {diag}(c_1,\dots ,c_s)\), \({\hat{C}}=\text {diag}(c_1-1,\dots ,c_s-1)\) and the vector \(\theta _{\sigma ,v}\) associated to a vector v of dimension s, is defined as follows

$$\begin{aligned} \theta _{\sigma ,v}= \left[ \eta _{\sigma }\, (v_1^2 \, Z), \dots , \eta _{\sigma }\, (v_s^2 \, Z)\right] . \end{aligned}$$
(3.15)

On the other hand, system (3.4b) for \(G_i^-\) can be recasted in

$$\begin{aligned} C\, \theta _{0,\,c} - B \, (\, {\hat{C}} \,\theta _{0,\,c-{\mathbf {1}}} \,) - A \, \theta _{-1,\, c-{\mathbf {1}}}\, - R \,\theta _{-1,\, c}={\mathbf {0}}. \end{aligned}$$
(3.16)

In a similar way, systems (3.4b) for \(G_i^{+(m)}\) and \(G_i^{-(m)}\) with \(m=1, \dots , P\) are, respectively, equivalent to

$$\begin{aligned}&\left( \dfrac{1}{2^m}\,C^{2m}\, \theta _{m-1,\,c} \right) - B \, \left( \, \dfrac{1}{2^m}{\hat{C}}^{2m} \,\theta _{m-1,\,c-{\mathbf {1}}} \,\right) \nonumber \\&\quad - {A \left( \dfrac{m}{2^{m-1}} {\hat{C}}^{2m-1} \,\theta _{m-1,\,c-{\mathbf {1}}} + \dfrac{Z}{2^m} {\hat{C}}^{2m+1}\theta _{m,\,c-1} \right) }\nonumber \\&\quad - R \left( \dfrac{m}{2^{m-1}} C^{2m-1} \,\theta _{m-1,\,c} + \dfrac{Z}{2^m} C^{2m+1} Z \theta _{m,\,c} \right) ={\mathbf {0}}, \end{aligned}$$
(3.17a)
$$\begin{aligned}&\dfrac{1}{2^m} \left( \left( C^{2m+1}\theta _{m,c} \right) - B \left( {\hat{C}}^{2m+1} \theta _{m,c-{\mathbf {1}}} \right) - A \left( {\hat{C}}^{2m} \theta _{m-1,c-{\mathbf {1}}} \right) - R\left( \,C^{2m} \theta _{m-1,c}\right) \right) ={\mathbf {0}}. \end{aligned}$$
(3.17b)

We next construct the matrix \(D_1\) such that its first and second columns correspond to the first vectors of the systems (3.14) and (3.16), respectively. Then the other columns are the first vectors of the system (3.17a) and (3.17b), alternatively.

We construct the remaining matrices \(D_k,~~k=2,3,4\) in (3.11b) by considering them as columns the vectors multiplying B, A and R, respectively, in equations (3.14)–(3.17b). Then, system (3.14)–(3.17b) is equivalent to equation (3.11b). \(\square \)

In similar way, in case of odd number of stages, we have the following theorem:

Theorem 4

Assume s is odd. The peer method (2.2) has order \(p = s\) and is adapted to the fitting space

$$\begin{aligned} {\mathcal {F}}=\left\{ e^{\pm \mu t}, t \,e^{\pm \mu t}, t^2 e^{\pm \mu t},\dots , t^{\frac{s-1}{2}} e^{\pm \mu t} \right\} , \end{aligned}$$

if the coefficient matrices A, B and R satisfy

$$\begin{aligned} B \, \theta _{-1,\,c-{\mathbf {1}}}&=\theta _{-1,\,c}-Z \, A \, (\,{\hat{C}} \, \theta _{0,\, c-{\mathbf {1}}}\,)-Z \, R \, (C \, \theta _{0,\, c}), \end{aligned}$$
(3.18a)
$$\begin{aligned} A {F}_3 \; \;&={F}_1-B \, {F}_2-RF_4, \end{aligned}$$
(3.18b)

where \(\theta _{\sigma ,v}\) are defined in (3.15) and \({F}_k\) for \(k=1,2,3,4\) are obtained by deleting the first column to the matrices \(D_k\) defined in Theorem 3 [when s odd, \(P=\frac{s-1}{2}\) and \(D_k\) have dimensions \(s \, \times \, (s+1)\)].

Now, we compute the leading term of the local truncation error at each stage, as follows:

$$\begin{aligned} (lte_{ef})_i = (-1)^{P+1} h^{s+1} \dfrac{{\mathcal {L}}^*_{i,K+1}(h,{\mathbf {w}})}{(K+1)! \, Z^{P+1}} \; D^{K+1} (D^2-\mu ^2)^{P+1} y(t), \quad i=1,\dots ,s, \end{aligned}$$
(3.19)

where we denote D the derivative with respect to time.

As before, we choose \(K=0\) and \(K=-1\) for s even or odd, respectively. In these cases, the aforementioned leading term assumes the following expressions:

  • if s is even

    $$\begin{aligned} \begin{aligned}&(lte_{ef})_i \\&\quad =\dfrac{(-1)^{\frac{s}{2}} \; h^{s+1}}{Z^{\frac{s}{2}}} \left( c_i-\sum _{j=1}^{s}b_{ij}\;(c_{j}-1)-\sum _{j=1}^{s}a_{ij}\;-\sum _{j=1}^{i}r_{ij}\;\right) D(D^2-\mu ^2)^{\frac{s}{2}} y(t), \end{aligned} \end{aligned}$$
    (3.20)
  • if s is odd

    $$\begin{aligned} (lte_{ef})_i = \dfrac{(-1)^{\frac{s+1}{2}} \; h^{s+1}}{Z^{\frac{s+1}{2}}} \left( 1-\sum _{j=1}^{s}b_{ij}\;\right) (D^2-\mu ^2)^{\frac{s+1}{2}} y(t). \end{aligned}$$
    (3.21)

4 Derivation of EF implicit peer method

To derive EF implicit peer method which can efficiently integrate stiff problems, we will determine the coefficients \(A=A(Z), B=B(Z)\) and \(R=R(Z)\) by satisfying the order conditions of Theorems 3 and 4, and moreover we will require that, when \(Z\rightarrow 0\), they tend to classical implicit peer methods derived by Soleimani and Weiner (2017). The following theorems describe the derivation of such coefficients.

Lemma 1

Let \(u\in {\mathbb {R}}^s\) and \(H=({\mathbf {0}}\mid u)\in {\mathbb {R}}^{s\times s}\) with \({\mathbf {0}}\in {\mathbb {R}}^{s\times {s-1}}\) having all null entries. Then

$$\begin{aligned} H \theta _{-1,\,c-{\mathbf {1}}}=u, \end{aligned}$$

and

$$\begin{aligned} HF_2=0, \end{aligned}$$

where the vector \(\theta _{-1,\,c-{\mathbf {1}}}\) is defined in (3.15) and \(F_2\) is defined in Theorem 3.

Proof

From (3.15), by exploiting:

$$\begin{aligned} h_{ij} = \left\{ \begin{array}{l} 0\,\,\,\,\,\,\,\,\,\,\,\,j < s, \\ u_i \,\,\,\,\,\,\,\,\,\,j = s, \\ \end{array} \right. \end{aligned}$$

and \(c_s=1\), \(\eta _{-1}(0)=1\), we get

$$\begin{aligned} (H\theta _{ - 1,c - 1} )_i = \sum \limits _{j = 1}^s {h_{ij} \eta _{ - 1} ((c_j - 1)^2 Z)} = h_{is} \eta _{ - 1} ((c_s - 1)^2 Z) = u_i . \end{aligned}$$
(4.1)

Moreover, as the last row of matrix \(F_2\) is zero [compare (3.12) and remind that \(F_2\) is obtained from \(D_2\) by deleting the first column], we have

$$\begin{aligned} (HF_2 )_{ij} = \sum \limits _{k = 1}^s {h_{ik} (F_2 )_{kj} } = h_{is}(F_2 )_{sj} = 0, \end{aligned}$$

which completes the proof. \(\square \)

Let \({\bar{B}}\) be a constant matrix satisfying the order condition (2.5a) associated to classical peer methods.

Theorem 5

Assume s is even and the matrix \(D_3\) defined in Theorem 3 is invertible. Then, the EF peer method having coefficients

$$\begin{aligned} B&={\bar{B}}, \end{aligned}$$
(4.2a)
$$\begin{aligned} A&=(D_1-{\bar{B}} \, D_2-RD_4)D^{-1}_3, \end{aligned}$$
(4.2b)

has order \(p=s\) and is adapted to fitting space

$$\begin{aligned} {\mathcal {F}}=\left\{ 1, e^{\pm \mu t},t \,e^{\pm \mu t}, t^2 \, e^{\pm \mu t}, \dots , t^{\frac{s}{2}-1} \, e^{\pm \mu t} \right\} . \end{aligned}$$
(4.3)

Proof

It is immediate to verify the order conditions (3.11a)–(3.11b). \(\square \)

Theorem 6

Assume s is odd and the matrix \(F_3\) defined in Theorem 4 is invertible. Consider the EF peer method having coefficients

$$\begin{aligned} B&= {\bar{B}}+ H_1 -ZA \, H_2 - ZR\, H_3, \end{aligned}$$
(4.4a)
$$\begin{aligned} A&=[F_1-{\bar{B}}F_2-RF_4] F_3^{-1}, \end{aligned}$$
(4.4b)

where

$$\begin{aligned} H_1=({\mathbf {0}}\,|\,\theta _{-1,\,c}-{\bar{B}}\theta _{-1,\,c-{\mathbf {1}}}), \quad H_2=({\mathbf {0}}\,|\, {\hat{C}} \,\theta _{0,\,c-{\mathbf {1}}}), \quad H_3=({\mathbf {0}}\,|\, C \, \theta _{0,\,c}) \in {\mathbb {R}}^{s \, \times \, s}, \end{aligned}$$

and \(F_i\) are defined in Theorem 4.

The above EF peer method has order \(p=s\) and is adapted to the fitting space

$$\begin{aligned} {\mathcal {F}}=\left\{ e^{\pm \mu t},t \,e^{\pm \mu t}, t^2 \, e^{\pm \mu t}, \dots , t^{\frac{s-1}{2}} \, e^{\pm \mu t} \right\} . \end{aligned}$$
(4.5)

Proof

To verify order condition (3.18a) we compute, by exploiting Lemma 1,

$$\begin{aligned} B\theta _{ - 1,c - 1} = ({{\bar{B}}} + H_1 - ZAH_2 - ZRH_3 )\theta _{ - 1,c - 1} = \theta _{ - 1,c} - ZA{{\hat{C}}}\theta _{0,c - 1} - ZRC\theta _{0,c} , \end{aligned}$$

which corresponds to order condition (3.18a).

By substituting the matrix B (4.4a) into condition (3.18b), we find that it is equivalent to

$$\begin{aligned} A=[F_1-({\bar{B}}+H_1)F_2-R(F_4-ZH_3F_2)](F_3-ZH_2F_2)^{-1}. \end{aligned}$$
(4.6)

Then, from Lemma 1 we have \(H_1F_2=H_3F_2=H_2F_2=0\) and the proof is completed. \(\square \)

4.1 Examples of methods with \(s=2\)

By referring to Sect. 3, in this case \(K=0\) and \(P=0\). We fix \(c_1=0\), \(c_2=1\),

$$\begin{aligned} {\bar{B}}=\left[ \begin{array}{cc} 0 &{} 1 \\ 0 &{} 1 \end{array} \right] , \end{aligned}$$
(4.7)

satisfying (2.5a), R having lower triangular structure with \(r_{11}=r_{22}=\gamma \) and derive the matrices A and B according to Theorem 5.

Then, we get that the EF peer method with coefficients

$$\begin{aligned} c&=\left[ \begin{array}{c} 0 \\ 1 \end{array} \right] , \quad B=\left[ \begin{array}{cc} 0 &{} 1 \\ 0 &{} 1 \end{array} \right] , R= \left[ \begin{array}{ccc} \gamma &{} 0 \\ r_{21} &{} \gamma \\ \end{array} \right] , \end{aligned}$$
(4.8a)
$$\begin{aligned} A&{=}\left[ {{\begin{array}{*{20}c} 0 &{} { - \gamma } \\ {\frac{1- \eta _{ - 1} (Z)}{{Z\eta _0 (Z)}}{+}\gamma }\,\, &{}\,\, {\frac{{\eta _{ - 1} (Z)}}{{Z\eta _0 (Z)}}(\eta _{ 0} (Z) {-} 1 {-} r_{21}-\gamma ( Z\eta _0 (Z) - \eta _{ - 1} (Z))) {+} \eta _0 (Z) {-} 1-r_{21}} \\ \end{array}}} \right] \end{aligned}$$
(4.8b)

has order \(p = 2\) and is adapted to the fitting space

$$\begin{aligned} \left\{ 1,e^{\pm \mu t} \right\} . \end{aligned}$$

As a matter of fact B satisfies (4.2a) of Theorem 5 and from \(c_1=0\), \(c_2=1\), we have \({\hat{c}}_1=-1\), \({\hat{c}}_2=0\) and

$$\begin{aligned} D_1= & {} \left[ \begin{array}{cc} 1 &{} 0 \\ \eta _{-1}(Z) &{} \eta _{0}(Z) \end{array} \right] , \quad D_2=\left[ \begin{array}{cc} \eta _{-1}(Z) &{} -\eta _{0}(Z) \\ 1 &{} 0 \end{array} \right] ,\\ D_3= & {} \left[ \begin{array}{cc} {-Z\eta _{0}(Z)} &{} {\eta _{-1}(Z)} \\ 0 &{} 1 \end{array} \right] , \quad D_4=\left[ \begin{array}{cc} 0 &{} 1 \\ {Z\eta _{0}(Z)} &{} {\eta _{-1}(Z)} \end{array} \right] . \end{aligned}$$

If \(D_3\) is invertible, we can compute the matrix A. Now, we compute determinant of \(D_3\) in both trigonometric and hyperbolic cases.

Trigonometric case: \(Z=-{\omega }^2h^2\)

$$\begin{aligned} Det\,\,{(D_3) } = {-Z \eta _0 (Z)}=-\omega h {\text {sin}}(\omega h). \end{aligned}$$

Therefore the matrix \( {D_3 }\) is invertible, when \(h \ne \frac{k\pi }{\omega },\,k \in {\mathbf {N}}.\)

Hyperbolic case: \(Z={\mu }^2h^2,\,\,\mu \in {\mathbf {R}}\)

$$\begin{aligned} Det\,\, {(D_3)} =\mu h {\text {sin}}h(\mu h). \end{aligned}$$

Therefore, the matrix \( {D_3 }\) is invertible \(\forall h>0\).

Then, from (4.2b) of Theorem 5, the expression of A follows.

The corresponding classic peer method is obtained in the limit as \(Z\rightarrow 0\) and has coefficients:

$$\begin{aligned} c&=\left[ \begin{array}{c} 0 \\ 1 \end{array} \right] , \quad B=\left[ \begin{array}{cc} 0 &{} 1 \\ 0 &{} 1 \end{array} \right] , \quad R= \left[ \begin{array}{ccc} \gamma &{} 0 \\ r_{21} &{} \gamma \\ \end{array} \right] ,\end{aligned}$$
(4.9a)
$$\begin{aligned} A&=\left[ {\begin{array}{cc} 0 &{} -\gamma \\ \gamma \quad &{} \quad -r_{21} \end{array} } \right] . \end{aligned}$$
(4.9b)

4.2 Examples of methods with \(s=3\)

Due to Sect. 3, in this case, \(K=-1\) and \(P=1\). We set c, \({\bar{B}}\) and R from paper Soleimani and Weiner (2017) in order to have an A-stable method in the limit when \(Z\rightarrow 0\) and derive matrices B and A from Theorem 6.

Then, for example, the EF peer method with coefficients

$$\begin{aligned} {{c}}= & {} \left( \begin{array}{l} {\mathrm{8}}{\mathrm{.170765826910428900e - 01}} \\ {\mathrm{6}}{\mathrm{.112848743494372300e - 01}} \\ {\mathrm{1}}{\mathrm{.000000000000000000e + 00}} \\ \end{array} \right) , \end{aligned}$$
(4.10)
$$\begin{aligned} R= & {} \left( {\begin{array}{*{20}c} { + 3{\mathrm{.32082968680e - 01}}} &{} {\mathrm{0}} &{} 0 \\ {{\mathrm{- 4}}{\mathrm{.64383283259e - 02}}} &{} {{\mathrm{3.32082968680e - 01}}} &{} 0 \\ {{\mathrm{- 6}}{\mathrm{.03010600818e - 01}}} &{} {{\mathrm{1.08071195621e + 00}}} &{} {{\mathrm{3.32082968680e - 01}}} \\ \end{array}}\right) ,\nonumber \\ \end{aligned}$$
(4.11)
$$\begin{aligned} B= & {} [{\mathbf {0}}\,|\,{\mathbf {0}}\,|\,v_1-{\bar{B}}v_0-ZAv_2-ZRv_3],\quad A=[F_1-{\bar{B}}F_2-RF_4] F_3^{-1}, \end{aligned}$$
(4.12)

where \({\mathbf {0}}=[0,0,0]^T\),

$$\begin{aligned} {{\bar{B}}}= & {} \left( \begin{array}{*{20}c} {{\mathrm{4.49089617867e - 01,}}}&{} {{\mathrm{- 6.61026939991e - 01}}} &{} {{\mathrm{1.21193732212e + 00}}} \\ {{\mathrm{3.05103275940e - 01}}} &{} {{\mathrm{- 4.49089617867e - 01}}} &{} {{\mathrm{1.14398634192e + 00}}} \\ {\mathrm{0}} &{}{\mathrm{0}} &{} {\mathrm{1}} \\ \end{array}\right) , \nonumber \\ v_0= & {} \left[ \begin{array}{c} \eta _{-1}({\hat{c}}_1^2Z) \\ \eta _{-1}({\hat{c}}_2^2Z)\\ 1 \end{array} \right] , v_1=\left[ \begin{array}{c} \eta _{-1}({c}_1^2Z) \\ \eta _{-1}({c}_2^2Z)\\ \eta _{-1}(Z) \end{array} \right] , \nonumber \\ v_2= & {} \left[ \begin{array}{c} {\hat{c}}_1 \eta _{0}({\hat{c}}_1^2(Z)) \\ {\hat{c}}_2 \eta _{0}({\hat{c}}_2^2(Z)) \\ 0 \end{array} \right] , v_3=\left[ \begin{array}{c} c_1 \eta _{0}(c_1^2(Z)) \\ c_2 \eta _{0}(c_2^2(Z)) \\ \eta _{0}(Z) \end{array} \right] , \nonumber \\ F_1= & {} \left[ \begin{array}{ccc} c_1 \eta _{0}(c_1^2(Z)) &{} \frac{1}{2} c_1^2 \eta _{0}(c_1^2(Z)) &{} \frac{1}{2} c_1^3 \eta _{0}(c_1^2(Z)) \\ c_2 \eta _{0}(c_2^2(Z)) &{} \frac{1}{2} c_2^2 \eta _{0}(c_2^2(Z)) &{} \frac{1}{2} c_2^3 \eta _{0}(c_2^2(Z)) \\ \eta _{0}(Z) &{} \frac{1}{2}\eta _{0}(Z) &{} \frac{1}{2}\eta _{1}(Z) \end{array} \right] ,\nonumber \\ F_2= & {} \left[ \begin{array}{ccc} {\hat{c}}_1 \eta _{0}({\hat{c}}_1^2(Z)) &{} \frac{1}{2} {\hat{c}}_1^2 \eta _{0}({\hat{c}}_1^2(Z)) &{} \frac{1}{2} {\hat{c}}_1^3 \eta _{0}({\hat{c}}_1^2(Z)) \\ {\hat{c}}_2 \eta _{0}({\hat{c}}_2^2(Z)) &{} \frac{1}{2} {\hat{c}}_2^2 \eta _{0}({\hat{c}}_2^2(Z)) &{} \frac{1}{2} {\hat{c}}_2^3 \eta _{0}({\hat{c}}_2^2(Z)) \\ 0 &{} 0 &{} 0 \end{array} \right] ,\nonumber \\ F_3= & {} \left[ \begin{array}{ccc} \eta _{-1}({\hat{c}}_1^2(Z)) &{} {\hat{c}}_1^2\eta _{0}({\hat{c}}_1^2(Z))+\frac{{\hat{c}}_1^3Z}{2}\eta _{1}({\hat{c}}_1^2(Z)) &{} \frac{1}{2}{\hat{c}}_1^2\eta _{0}({\hat{c}}_1^2(Z)) \\ \eta _{-1}({\hat{c}}_2^2(Z)) &{} {\hat{c}}_2^2\eta _{0}({\hat{c}}_2^2(Z))+\frac{{\hat{c}}_2^3Z}{2}\eta _{1}({\hat{c}}_2^2(Z)) &{} \frac{1}{2}{\hat{c}}_2^2\eta _{0}({\hat{c}}_2^2(Z)) \\ 1 &{} 0 &{} 0 \end{array} \right] ,\nonumber \\ F_4= & {} \left[ \begin{array}{ccc} 1 &{} 0 &{} 0\\ \eta _{-1}({c}_2^2(Z)) &{} {c}_2^2\eta _{0}({c}_2^2(Z))+\frac{{c}_2^3Z}{2}\eta _{1}({c}_2^2(Z)) &{} \frac{1}{2}{c}_2^2\eta _{0}({c}_2^2(Z)) \\ \eta _{-1}({c}_3^2(Z)) &{} {c}_3^2\eta _{0}({c}_3^2(Z))+\frac{{c}_3^3Z}{2}\eta _{1}({c}_3^2(Z)) &{} \frac{1}{2}{c}_3^2\eta _{0}({c}_3^2(Z)) \end{array} \right] , \end{aligned}$$
(4.13)

has order \(p = 3\) and is adapted to the fitting space

$$\begin{aligned} \left\{ e^{\pm \mu t}, t e^{\pm \mu t} \right\} . \end{aligned}$$

We note that the expression of B follows from

$$\begin{aligned} H_1=[{\mathbf {0}}\,|\,{\mathbf {0}}\,|\,v_1-{\bar{B}}v_0], \quad H_2=[{\mathbf {0}}\,|\,{\mathbf {0}}\,|\,v_2],\quad H_3=[{\mathbf {0}}\,|\,{\mathbf {0}}\,|\,v_3], \end{aligned}$$

and condition (4.4a).

If \(F_3\) is invertible, we can compute the matrix A. Now, we compute determinant of \(F_3\) in both trigonometric and hyperbolic cases.

$$\begin{aligned} F_3= & {} \left[ \begin{array}{ccc} \eta _{-1}(Z) &{} -\eta _{0}(Z)-\frac{Z}{2}\eta _{1}(Z) &{} \frac{1}{2}\eta _{0}(Z) \\ \eta _{-1}(\frac{Z}{4}) &{} -\frac{1}{2}\eta _{0}(\frac{Z}{4})-\frac{Z}{16}\eta _{1}(\frac{Z}{4}) &{} \frac{1}{8}\eta _{0}(\frac{Z}{4}) \\ 1 &{} 0 &{} 0 \end{array} \right] ,\\ Det\,\, ({F_3 })= & {} \frac{1}{{32}}\left( {4\eta _0 \left( \frac{Z}{4}\right) \eta _0 (Z) - 2Z\eta _0 \left( \frac{Z}{4}\right) \eta _1 (Z) + Z\eta _1 \left( \frac{Z}{4}\right) \eta _0 (Z)} \right) . \end{aligned}$$

Trigonometric case: \(Z=-{\omega }^2h^2\)

Therefore, the matrix \( {F_3 }\) is invertible, when

$$\begin{aligned} 2\omega h\,\, \sin \left( \frac{\omega h}{2}\right) +\cos \left( \frac{\omega h}{2}\right) -\cos \left( \frac{3\omega h}{2}\right) \ne 0, \end{aligned}$$

this means that \(h\ne \frac{2\pi }{\omega }.\)

Hyperbolic case: \(Z={\mu }^2h^2\)

Therefore, the matrix \( {F_3 }\) is invertible, when

$$\begin{aligned} 2\mu h\,\, \sin h\left( \frac{\mu h}{2}\right) +\cos h\left( \frac{\mu h}{2}\right) -\cos h\left( \frac{3\mu h}{2}\right) \ne 0, \end{aligned}$$

this means that the matrix \( {F_3 }\) is invertible \(\forall h>0\).

The corresponding classic peer method is obtained in the limit as \(Z\rightarrow 0\) and has coefficients:

$$\begin{aligned} {\mathrm{A }}= \left( \begin{array}{l} {\mathrm{2.9548e -01\quad - 4}}{\mathrm{.0890e -01 \quad 4.2361e -01}} \\ {\mathrm{1.4466e -01 \quad - 1}}{\mathrm{.9826e -01 \quad 2.6048e -01}} \\ {\mathrm{1.1464e -15 \quad - 2}}{\mathrm{.5388e -16 \quad 1.9022e -01}} \\ \end{array} \right) , \quad B={\bar{B}}, \end{aligned}$$
(4.14)

and cR given by (4.10) and (4.11), respectively.

5 Numerical experiments

In this section, we present some numerical results obtained first of all by comparing the derived implicit EF peer methods with their classic counterparts. We moreover show the improvement with respect to explicit EF peer method of Conte et al. (2019a) on stiff problems. Finally we show a comparison with EF Runge–Kutta methods derived in Vanden Berghe et al. (2001) and EF linear multistep methods presented in Ixaru et al. (2002).

In the tables, we will report the error computed as the infinite norm of the difference between the numerical solution and the exact solution at the end point. Moreover, we will adopt the following notation to indicate the used numerical method:

  • CL = classic,

  • EF = exponentially fitted,

  • EX P2 = explicit peer method of order 2 from Conte et al. (2019a),

  • EX P3 = explicit peer method of order 3 from Conte et al. (2019a),

  • IM P2 = implicit peer method of order 2 from Sect. 4.1 with \(r_{21}=0\) and \(\gamma =-1\),

  • IM P3 = implicit peer method of order 3 from Sect. 4.2,

  • RK3 = Runge–Kutta method of order 3 from Vanden Berghe et al. (2001),

  • LMM3 = linear multistep method of order 3 from Ixaru et al. (2002).

Example 1

Let us consider the Prothero–Robinson problem Hairer et al. (2006)

$$\begin{aligned} \begin{aligned} y'(t)&=\lambda \,(\,y(t)-\sin (\omega \, t+t) \, )+ (\omega +1)\, \cos (\omega \, t + t), \quad t \in \left[ 0, \dfrac{\pi }{2}\right] , \\ y(0)&=0, \end{aligned} \end{aligned}$$
(5.1)

whose exact solution is

$$\begin{aligned} y(t)=\sin (\omega \, t + t) = \sin (\omega \, t)\, \cos (t) + \cos (\omega \, t)\, \sin (t). \end{aligned}$$

The oscillating behaviour of exact solution leads us to utilize the EF methods with the parameter \(\mu =\mathrm {i}\,\omega \), \(Z=-\omega ^2h^2\).

We consider two cases:

  • \(\lambda =-1\) (non stiff case)

  • \(\lambda =-10^{-6}\) (stiff case)

First of all, we consider \(\lambda =-1\). The results reported in Table 1 show that EF implicit peer methods produce smaller errors with respect to their classic counterparts and the improvement is much more visible as the frequency \(\omega \) increases. We report in Table 2 the corresponding results obtained by explicit EF peer methods of Conte et al. (2019a) and we note that for \(s=2\) the methods have the same behavior in accuracy, which for \(s=3\) implicit method is more accurate.

We report in Table 3 the estimated order of EF peer method, computed as:

$$\begin{aligned} p(h) \approx \log _2 \left( \dfrac{E(h)}{E(h/2)}\right) , \end{aligned}$$
(5.2)

where E(h) and E(h/2) are the errors with a stepsize h and h/2, respectively. We notice that for \(s=2\) the implicit EF peer method shows effective order 2, as in the explicit case (Conte et al. 2019a). As regards \(s=3\), we notice superconvergent behavior with order \(p=s+1=4\). This can be motivated because the classic coefficients (4.14) taken from Soleimani and Weiner (2017) were derived by imposing superconvergence.

Table 1 Errors of the implicit peer methods on problem (5.1) with \(\lambda =-1\), N grid points and different values for the frequency \(\omega \)
Table 2 Errors of the explicit peer methods on problem (5.1) with \(\lambda =-1\), N grid points and different values for the frequency \(\omega \)
Table 3 Estimated order of the implicit EF peer methods on problem (5.1) with \(\lambda =-1\), \(\omega =50\)

We now consider the case in which the oscillatory frequency \(\omega \) is not known exactly. Therefore, by denoting with \(\delta \) the relative error on the frequency, we employ the EF peer methods whose coefficients are computed in correspondence of a perturbed frequency \({\tilde{\omega }}= (1+\delta )\omega \). We report in Tables 4 and 5 the results obtained with implicit and explicit EF peer methods, respectively. The results shows that an accurate computation of the frequency is a crucial point. However, it is not a dramatic situation as the error of EF peer methods keeps smaller than that of the corresponding classic counterparts and, for increasing \(\delta \), it approaches the error of classic methods.

Table 4 Errors of implicit peer method of order 3 on problem (5.1) with \(\lambda =-1\) and perturbed frequency \({\tilde{\omega }}= (1+\delta )\omega \), \(\omega =50\)
Table 5 Errors of explicit peer method of order 3 Conte et al. (2019a) on problem (5.1) with \(\lambda =-1\) and perturbed frequency \({\tilde{\omega }}= (1+\delta )\omega \), \(\omega =50\)

We now consider \(\lambda = -10^{6}\). As in the non stiff case, Table 6 shows as the EF peer method produces smaller errors with respect to classic one. We do not report results for explicit methods because for \(\lambda = -10^{6}\) they are unstable. Table 7 shows the estimated order. In Table 8, we report the results obtained in correspondence of “wrong” frequency \({\tilde{\omega }}= (1+\delta )\omega \), showing a similar behavior as in the nonstiff case.

Table 6 Errors of the implicit peer methods on problem (5.1) with \(\lambda = -10^{6}\), N grid points and \(\omega =50\)
Table 7 Estimated order of implicit EF peer methods on problem (5.1) with \(\lambda = -10^{6}\), \(\omega =50\)
Table 8 Errors of implicit peer method of order 3 on problem (5.1) with \(\lambda = -10^{6}\) and perturbed frequency \({\tilde{\omega }}= (1+\delta )\omega \), \(\omega =50\)

Example 2

Let us consider the system of two equations known as Lambert equations Lambert (1991):

$$\begin{aligned} \begin{aligned} y_1^\prime&= - 2y_1 + y_2 + 2\sin (\omega t), \quad \quad \quad t \in \left[ 0, 10\right] , \\ y_2^\prime&= - (\beta + 2)y_1 + (\beta + 1)(y_2 + \sin (\omega t)- \cos (\omega t)), \end{aligned} \end{aligned}$$
(5.3)

with the initial conditions \(y_1(0)= 2\) and \(y_2(0) = 3\).

The exact solutions of this system are \( y_1 (t) = 2\exp ( - t) + \sin (\omega t)\) and \( y_2 (t) = 2\exp ( - t) + \cos (\omega t)\) and are \(\beta \)-independent.

We consider the two cases:

  • \(\beta =-3\) (non stiff case)

  • \(\beta =-1000\) (stiff case)

Lambert’s system has been employed in Ixaru et al. (2002), Lambert (1991) and Vanden Berghe et al. (2001). In Vanden Berghe et al. (2001), used EF Runge–Kutta methods for Lambert’s system. In Ixaru et al. (2002), proposed EF linear multistep algorithms for this system.

According to the exact solution, we consider EF methods with \(\mu =\mathrm {i}\,\omega \), \(Z=-\omega ^2h^2\). We report in Tables 9 and 10 the errors obtained in correspondence of \(\omega =1\) with \(\beta =-3\) and \(\beta =-1000\), respectively. In both cases, we observe that EF peer methods produce smaller errors with respect to classic ones.

Table 9 Errors of the implicit peer methods on problem (5.3) with \(\omega =1 , \beta =-3\) and stepsize h
Table 10 Errors of the implicit peer methods on problem (5.3) with \(\omega =1, \beta =-1000\) and stepsize h

In addition, for \( \beta =-1000\), Tables 11 and 12 provide a comparison between the our obtained results and those reported in Ixaru and Paternoster (2001) and Vanden Berghe et al. (2001). From these Tables, we realize that errors of implicit EF peer methods are smaller with respect to Runge–Kutta and linear multistep methods of the same order.

Table 11 Errors of Runge–Kutta methods Vanden Berghe et al. (2001) on problem (5.3) with \(\omega =1, \beta =-1000\) and stepsize h
Table 12 Errors of the linear multistep methods Ixaru et al. (2002) on problem (5.3) with \(\omega =1 , \beta =-1000\) and stepsize h

6 Conclusions

In this paper, implicit EF peer methods have been introduced for the numerical solution of ordinary differential equations exhibiting an oscillatory solution. A general class of implicit EF peer methods was derived by following the six-step procedure presented in Ixaru and Vanden Berghe (2004). The adopted strategy is based on adapting already existing methods to be exact (within round-off error) on trigonometric or hyperbolic functions. In the sixth step of the procedure, we have computed the expression of the leading term of the local truncation error, which may lead to an estimate of the parameter characterizing the basis functions, which we aim to study as future work. Numerical experiments have confirmed the effectiveness of the approach.