#### Abstract

A numerical method for finding the solution of Duffing-harmonic oscillator is proposed. The approach is based on hybrid functions approximation. The properties of hybrid functions that consist of block-pulse and Chebyshev cardinal functions are discussed. The associated operational matrices of integration and product are then utilized to reduce the solution of a strongly nonlinear oscillator to the solution of a system of algebraic equations. The method is easy to implement and computationally very attractive. The results are compared with the exact solution and results from several recently published methods, and the comparisons showed proper accuracy of this method.

#### 1. Introduction

Most phenomena in our world are essentially nonlinear and are described by nonlinear ordinary differential equations. Nonlinear oscillation in mechanics, physics, and applied mathematics has been a topic of intensive research for many years. Difficulty of solving the nonlinear problems or getting an analytic solution leads one to use numerical methods. Several methods have been used to find approximate solutions to these nonlinear problems. Some of these well-known methods are harmonic balance method [1], multiple scales method [2], Krylov-Bogoliubov-Mitropolsky method [3, 4], modified Lindstedt-Poincare method [5], linearized perturbation method [6], energy balance method [7], iteration perturbation method [8], bookkeeping parameter perturbation method [9], amplitude frequency formulation [10], maximum approach [11], Mickens iteration procedure [12], rational harmonic balance method [13], Adomian decomposition method [14], variational iteration method [15], modified variational iteration method [16, 17], homotopy perturbation method [18], modified differential transform method [19], and modified homotopy perturbation method [20].

Recently, hybrid functions have been applied extensively for solving differential equations or systems and proved to be a useful mathematical tool. The pioneering work in the solution of linear systems with inequality constraints via hybrid of block-pulse functions and Legendre polynomials was led in [21] that first derived an operational matrix for the integrals of the hybrid function vector. Razzaghi and Marzban in [22] the variational problems are solved using hybrid of block-pulse and Chebyshev functions. Razzaghi and Marzban [23] applied the hybrid of block-pulse and Chebyshev functions to find approximate solution of systems with delays in state and control. Solution of time-varying delay systems is approximated using hybrid of block-pulse functions and Legendre polynomials in [24]. Maleknejad and Tavassoli Kajani in [25] introduced a Galerkin method based on hybrid Legendre and block-pulse functions on interval to solve the linear integrodifferential equation system. Razzaghi and Marzban in [26], a direct method for solving multidelay systems using hybrid of block-pulse functions and Taylor series is presented. Marzban et al. [27] implemented hybrid of block-pulse functions and Lagrange-interpolating polynomials to find approximate solution of Volterra’s population model. The Lane-Emden type equations are solved in [28] using hybrid functions of block-pulse and Lagrange-interpolating polynomials. The hybrid of block-pulse functions and Taylor series is employed in [29] to solve the linear quadratic optimal control with delay systems. Application of hybrid of block-pulse functions and Lagrange polynomials for solving the nonlinear mixed Volterra-Fredholm-Hammerstein integral equations is investigated in [30].

In this study, we consider the following nonlinear Duffing-harmonic oscillation [31–35]: where is an example of conservative nonlinear oscillatory systems having a rational form for the restoring force. Note that, for small values of , (1) is that of a Duffing-type nonlinear oscillator; that is, while for large values of the equation approximates that of a linear harmonic oscillator; that is, Hence, (1) is called the Duffing-harmonic oscillator [31]. The system will oscillate between symmetric bounds , and the frequency and corresponding periodic solution of the nonlinear oscillator are dependent on the amplitude [33].

In this paper, we introduce an alternative numerical method to solve Duffing-harmonic oscillator. The method consists of reducing this equation to a set of algebraic equations by first expanding the candidate function as a hybrid function with unknown coefficients. These hybrid functions, which consist of block-pulse functions plus Chebyshev cardinal functions, are first introduced. The operational matrices of integration and product are given. These matrices are then used to evaluate the coefficients of the hybrid function for the solution of strongly nonlinear oscillators.

The outline of this paper is as follows. In Section 2, the basic properties of hybrid block-pulse functions and Chebyshev cardinal functions required for subsequent development are described. In Section 3, we apply the proposed numerical method to the Duffing-harmonic oscillation. Results and comparisons with existing methods in the literature are presented in Section 4 and finally conclusions are drawn in Section 5.

#### 2. Properties of Hybrid Functions

Marzban et al. in [27, 29, 30] used the hybrid of block-pulse functions and Lagrange-interpolating polynomials based on zeros of the Legendre polynomials. But no explicit formulas are known for the zeros of the Legendre polynomials. In this study we used Chebyshev cardinal functions which are special cases of Lagrange-interpolating polynomials based on zeros of the Chebyshev polynomials of the first kind to overcome this problem. In this paper, we present the properties of hybrid functions which consist of block-pulse functions plus Chebyshev cardinal functions similar to [27, 29, 30]. The hybrid functions are first introduced, and the operational matrices of integration and product are then derived.

##### 2.1. Hybrid Functions of Block-Pulse and Chebyshev Cardinal Functions

Hybrid functions , , , are defined on the interval as where and are the order of block-pulse functions and Chebyshev cardinal functions, respectively. Here, are defined as [36–38] where is the first kind Chebyshev polynomial of order in defined by subscript denotes -differentiation, and , , are the zeros of defined by , , with the Kronecker property where is the Kronecker delta function.

##### 2.2. Function Approximation

A function , defined over the interval , may be expanded as If the infinite series in (8) is truncated, then (8) can be expressed as where In (10) and (11), , , , are the expansion coefficients of the function in the th subinterval and , , , are defined as in (4). With the aid of (7), the coefficients can be obtained as

##### 2.3. The Operational Matrix of Integration

In this section, the operational matrix of integration is derived. The integration of the vector defined in (11) can be approximated as where is the operational matrix of integration for Chebyshev cardinal functions. The matrix can be obtained by the following process. Let

Using (9), any function , , , can be approximated as From (12) we can get With the aid of (4), we consider the following cases.

*Case 1. *If , then and we obtain .

*Case 2. *If , then and we obtain

*Case 3. *If , then and we obtain
Comparing (13), (14), and (15), we obtain
where and are matrices that can be obtained as follows.

Let
then, for , we have
where , , are the zeros of the first kind Chebyshev polynomial of order . It is noted that is the operational matrix of integration for Chebyshev cardinal functions over interval .

*Remark 1. *To calculate the entries and , , we have
where is the coefficient of in the Chebyshev polynomial function . Using (22) we get
for .

##### 2.4. The Operational Matrix of Product

The following property of the product of two hybrid function vectors will also be used. Let where and is an product operational matrix. To find , we apply the following procedure. First, by using (11) and (25) we obtain Using (9), any function , , , can be approximated as where So, from (26) and (28), we have therefore, we find the matrix as

Lemma 2. *The functions , , are orthogonal with respect to on and satisfy the orthogonality condition
**The proof of this lemma is presented in [39].*

*Remark 3. *Since consists of block-pulse functions and Chebyshev cardinal functions, which are both complete and orthogonal, the set of hybrid of block-pulse functions and Chebyshev cardinal functions is a complete orthogonal set in the Hilbert space .

Lemma 4. *Let MN vectors and be hybrid functions coefficients of and , respectively. If
**
then
**
where is a positive integer.*

*Proof. *When , (33) follows at once from . Suppose that (33) holds for ; we will deduce it for . Since , from (24) and (30) we have:
where can be calculated in a similar way to matrix in (24). Now, using (33) we obtain

Therefore, (33) holds for , and the lemma is established.

#### 3. Hybrid Functions Method to Solve Duffing-Harmonic Oscillator

In this section, by using the results obtained in the previous section about hybrid functions, an effective and accurate method for solving Duffing-harmonic oscillator (1) is presented.

Consider the following nonlinear Duffing-harmonic oscillator: with the initial conditions

At first, we write (36) in the following form:

Let where is defined in (11) and is a vector with unknowns as follows: By expanding and in terms of hybrid functions we get where and . Integrating (39) from to and using (41), we obtain where and is the operational matrix of integration given in (13). Using Lemma 4 the functions and can be expanded as Therefore, by using (39) and (42)–(45), the right side of (38) can be approximated as where can be calculated in a similar way to matrix in (24). Since the above equation is satisfied for every , we can get This is a system of algebraic equations with equations and unknowns, which can be solved by Newton’s iteration method to obtain the unknown vector .

*Remark 5. *The approximate period and frequency of the hybrid functions method (HFM) can be obtained as follows:
where is the first positive root of equation . Here, we use the famous Newton’s iteration method for finding a proper approximation of nonlinear equation , in the following form:
where and is initial approximation.

#### 4. Results and Discussions

In this section, we illustrate the accuracy of the hybrid functions method (HFM) by comparing the approximate solutions previously obtained with the exact angular frequency . All the results obtained here are computed using the Intel Pentium 5, 2.2 GHz processor and using Maple 17 with 64-digit precision.

The exact angular frequency, , of the Duffing-harmonic oscillator was found by Lim and Wu in [32] as By using alternative form (38) and applying the harmonic balance method (HBM) [13], Mickens [31] obtained the first approximate angular frequency Ozis and Yildirim [35] obtained the angular frequency using the energy balance method (EBM) in the following form: Ganji et al. in [34] obtained the same approximation as that in (52). Using a single-term approximate solution to (36) and the Ritz procedure [40], Tiwari et al. [41] obtained an approximate angular frequency as follows:

The computed results for the HFM frequency with exact frequency [32], HBM frequency [31], EBM frequency [35], and Tiwari’s frequency [41] are listed in Tables 1 and 2. Table 2 shows that the maximum percentage error between and exact frequency is 0.118%. Comparison of the exact frequency obtained by (50) with , , , and is shown in Figure 1 for , , , and .

From Figure 1 and Tables 1 and 2, it can be observed that the hybrid functions method (HFM) yields excellent approximate frequencies for both small and large amplitudes.

Figures 2 and 3 give a comparison between the present HFM results and the numerical results obtained by using the 4th order Runge-Kutta method (RK4) with time step , where , , and . It can be seen from these figures that the solutions obtained by the proposed procedure are in good agreement with the RK4 based solutions.

#### 5. Conclusion

In this paper, we presented a numerical scheme based on hybrid block-pulse functions and Chebyshev cardinal functions for solving Duffing-harmonic oscillator. This algorithm reduces the solution of Duffing-harmonic oscillator differential equation to the solution of a system of algebraic equations in matrix form. The merit of this method is that the system of equations obtained for the solution does not need to consider collocation points; this means that the system of equations is obtained directly. A comparative study between HBM [31], EBM [35], Tiwari’s method [41], and the proposed method was discussed in Section 4. The obtained results showed that the HFM is accurate, capable, and effective technique for the solution of the Duffing-harmonic oscillator. Further research can concentrate on other strongly nonlinear oscillators and more complicated cases.

#### Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

#### Acknowledgment

The authors are very grateful to both reviewers for carefully reading the paper and for their comments and suggestions which have improved the paper.