#### Abstract

Two new Runge-Kutta-Nyström (RKN) methods are constructed for solving second-order differential equations with oscillatory solutions. These two new methods are constructed based on two existing RKN methods. Firstly, a three-stage fourth-order Garcia’s RKN method. Another method is Hairer’s RKN method of four-stage fifth-order. Both new derived methods have two variable coefficients with phase-lag of order infinity and zero amplification error (zero dissipative). Numerical tests are performed and the results show that the new methods are more accurate than the other methods in the literature.

#### 1. Introduction

Throughout this paper, we are dealing with the initial value problems (IVP) related to second-order ODEs in the form: where is independent of explicitly and it is known that their solutions are periodic. This kind of problems often arise in many fields of applied sciences such as astronomy, quantum mechanics, physical chemistry, structural mechanics, and electronics.

Over the last three decades, there are a number of numerical methods that have been derived by several authors based on different approaches such as minimal phase-lag, phase-fitted, and exponential-fitted for solving second-order oscillatory IVPs. See van der Houwen and Sommeijer [1], Senu et al. [2], van de Vyver [3], Vigo-Aguiar and Ramos [4], Ramos and Vigo-Aguiar [5], and Ismail [6]. The term phase-lag was first introduced by Brusa and Nigro [7] in 1980. In 1993, Simos derived a Runge-Kutta-Fehlberg method based on the idea of phase-lag of order infinity [8]. Recently, the idea of phase-lag of order infinity has been used to developed new numerical methods. Simos and Vigo-Aguiar presented in [9] a modified Runge-Kutta-Nyström method with phase-lag of order infinity for solving the Schrödinger equation and related problems. Papadopoulos et al. [10] presented a new phase-fitted RKN method for solving IVP with oscillating solutions.

In this paper, we will combine the idea of phase-lag of order infinity and zero amplification error together. First, we will construct a three-stage phase-fitted and amplification-fitted RKN method which is based on Garcia's method of algebraic order four [11]. Then, we will construct a four-stage phase-fitted and amplification-fitted RKN method based on the coefficients of Hairer's method of algebraic order five [12].

#### 2. Analysis Phase-Lag of the Methods

The general -stage RKN method for (1) is of the form where

In the investigation of phase-lag error of the method, we will use the test equation in the following: By applying method (2) to test equation (4), it yields where , and are polynomial in term of and are totally determined by the parameters of method (2).

It is given that the exact solution of (4) is where By substituting (7) into (6), it yields Then, we assume that the eigenvalues of are , , and they will be called as the amplification factors of the RKN method. The consequent eigenvectors are , , where , . The numerical solution of (4) is where If and are complex conjugate, then and . By substituting both into (9), we have From the exact solution (8) and the numerical solution (11), we can forward to the following definition.

*Definition 1 (phase-lag, see [1]). *Apply RKN method (2) to test equation (4). Then we define the phase-lag . If , then the RKN method is said to have phase-lag order .

*Definition 2 (amplification error, see [1]). *Apply RKN method (2) to test equation (4). Then we define the quantity is the amplification error. If , then the RKN method is said to have dissipation order .

Let us denote that From Definition 1 it follows that From (13), we have the following definition for the case of phase-lag of order infinity.

*Definition 3 (phase-lag of order infinity, see [10]). *To obtain phase-lag of order infinity the relation must hold.

When at a point , where , the method is said to have zero amplification error (zero-dissipative), and we have From the condition above, we have the following remark.

*Remark 4 (see [13]). *To achieve phase-lag of order infinity and zero amplification error, the relations below must hold

#### 3. Construction of the New Methods

In this section, we will present the construction of two new RKN methods. The first method is based on a three-stage RKN method with algebraic order four (see [11]). The second method is based on a four-stage RKN method with algebraic order five (see [12]).

##### 3.1. New Fourth Order RKN Method

In this section, we want to derive an RKN method with phase-lag of order infinity and zero amplification error which is based on Garcia's RKN method of three-stage and algebraic order four as follows

First of all, we have to compute the polynomials , , , and and substitute all of them into (12). Hence, we have and in terms of parameters of RKN method. In order to construct the new method with phase-lag of order infinity and zero amplification error, we set and as free parameters but leave the rest of the coefficients. Then we substitute the value of the coefficients above into and yielding As mentioned in Remark 4, in order to achieve phase-lag of order infinity and zero amplification error, conditions (15) must be satisfied. Therefore, we substitute and from (17) into (15) and solve the equations yielding

For small value of , we use the Taylor series expansion as follows: Hence, a new method is derived and we denote it by PFAFRKN4. This method has two variable coefficients and that depend on the product of the step-length and the frequency of the method .

##### 3.2. New Fifth Order RKN Method

In this section, we want to derive a new RKN method which is based on Hairer's RKN method of four-stage and algebraic order five as follows:

By using the same strategy, we can obtain a new fifth-order RKN method with phase-lag of order infinity and zero amplification error. In this case, we set and as free parameters and we found that and are Then we substitute (21) into (15) and solve the equations yielding For small value of , we use the Taylor series expansion as follows:

Thus, we have obtained a new method which has two variable coefficients, and , that depend on the product of the step-size and the frequency of the method . We denote this method as PFAFRKN5. For linear problems, the frequency of the method is the same as the frequency of the exact solution. For nonlinear problems, however, the frequency of the method is usually different from the frequency of the exact solution but depends on the method itself (see [14]). For each specific product of , it helps to nullify the phase-lag error and the amplification error. For solving oscillatory problems, reducing the phase-lag error of the method is far more important than decreasing its algebraic error.

#### 4. Algebraic Order and Error Analysis

In this section, we will compute the local truncation error (LTE) of the new methods and verify the algebraic order of the methods.

Firstly, we compute the Taylor expansions of the exact solution , the first derivative of the exact solution , the numerical solution , and the first derivative of the numerical solution . Then, we compute the LTE of and its first derivative as follows:

The LTE and of method PFAFRKN4 are From (25), we can verify that the algebraic order of PFAFRKN4 is 4 since all of the coefficients up to vanished, whereas the LTE and of method PFAFRKN5 are From (26), method PFAFRKN5 is said to have algebraic order 5 since all of the coefficients up to vanished. Table 1 shows a comparison of the properties of the methods derived.

#### 5. Problems Tested and Numerical Results

In this section, we will apply the new methods to some second-order differential equation problems. The following explicit RKN methods are selected for the numerical comparisons.

Fourth-order:(i)PFAFRKN4: the new derived fourth-order RKN method; (ii)RKN4G: the three-stage fourth-order RKN method derived by García et al. [11]; (iii)SRKN3V: the third-order symplectic RKN method with minimal phase-lag derived by van de Vyver [3]; (iv)PFERKN4P: the fourth-order RKN method with phase-lag of order infinity derived by Papadopoulos et al. [10]; (v)OPTRKN4P: the fourth-order optimized RKN method derived by Papadopoulos and Simos [13].

Fifth-order:(i)PFAFRKN5: the new derived fifth-order RKN method; (ii)RKN5H: the four-stage fifth-order RKN method derived by Hairer et al. [12]; (iii)OPTRKN5K1: the fifth-order optimized RKN method with zero first derivative of phase-lag derived by Kosti et al. [15]; (iv)OPTRKN5K2: the fifth-order optimized RKN method with zero first derivative of amplification factor derived by Kosti et al. [16].

Those methods are categorized into two categories according to algebraic order of each method for comparison purposes. The accuracy criteria taken is calculating the of the maximum absolute error, where , . We test the problems in the following for the interval of with the step-size , .

*Problem 1 (non-linear, two body problem). *
where and is the eccentricity.

Exact solution: , , where can be found by solving the equation .

Estimated frequency: .

Source: Kosti et al. [15].

*Problem 2 (homogeneous). *

Exact solution: .

Estimated frequency: .

*Problem 3 (inhomogeneous). *

This case is using .

Exact solution: .

Estimated frequency: .

Source: van der Houwen and Sommeijer [1].

*Problem 4 (inhomogeneous). *

Exact solution: .

Estimated frequency: .

Source: Allen, Jr. and Wing [17].

*Problem 5 (inhomogeneous system). *

Exact solution: , , and parameters and are 20 and 0.1, respectively.

Estimated frequency: .

Source: Lambert and Watson [18].

The numerical results are plotted in Figures 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, and 16. Figures 1–4 and Figures 9–12 display the efficiency curves where the common logarithm of the maximum global absolute error throughout the integration versus computational cost measured by number of function evaluations. Figures 5–8 and Figures 13–16 display the efficiency curves where the common logarithm of the maximum global absolute error throughout the integration versus computational cost measured by time used by each method in the same computation machine. Figures 1–8 show the efficiency curves of the methods in the first category that consist of PFAFRKN4, RKN4G, SRKN3V, PFERKN4P, and OPTRKN4P, whereas Figures 9–16 show the efficiency curves of the fifth-order methods consist of PFAFRKN5, RKN5H, OPTRKN5K1, and OPTRKN5K2. These efficiency curves display a clear comparison among those methods.

From Figures 1–8, we found that the new method PFAFRKN4 is the most accurate and efficient for solving Problems 1–5, followed by OPTRKN4P, SRKN3V, PFERKN4P, and the corresponding original method RKN4G, whereas for the fifth-order methods, from Figures 9–16, we observed that the new method PFAFRKN5 is the most efficient method, followed by optimized RKN methods OPTRKN5K1 and OPTRKN5K2 and the corresponding original method RKN5H. In addition, we can observe that the new methods are having the same computational cost with the corresponding original methods.

#### 6. Conclusion

In this paper, we have derived two new phase-fitted and amplification-fitted RKN methods for solving second-order IVPs which are oscillatory in nature. First method is based on Garcia's fourth algebraic order RKN method and the second method is based on Hairer's four-stage fifth algebraic order RKN method. Numerical results show that both methods are more accurate and efficient for solving second-order differential equations with oscillating solutions.