Journal of Difference Equations

Volume 2014, Article ID 210754, 9 pages

http://dx.doi.org/10.1155/2014/210754

## Application of Hybrid Functions for Solving Duffing-Harmonic Oscillator

^{1}Department of Mathematics, Yazd University, Yazd, Iran^{2}Department of Mathematics, Islamic Azad University, Shahrekord Branch, Shahrekord, Iran^{3}Department of Mathematics, Islamic Azad University, Yazd Branch, Yazd, Iran

Received 9 April 2014; Revised 26 July 2014; Accepted 28 July 2014; Published 14 August 2014

Academic Editor: Athanassios G. Bratsos

Copyright © 2014 Mohammad Heydari et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### 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.

#### References

- A. H. Nayfeh,
*Perturbation Methods*, John Wiley & Sons, New York, NY, USA, 1973. View at MathSciNet - A. H. Nayfeh and D. T. Mook,
*Nonlinear Oscillations*, John Wiley, New York, NY, USA, 1979. - N. Krylov and N. Bogolioubov,
*Introduction to Nonlinear Mechanics*, Princeton University Press, Princeton, NJ, USA, 1943. - N. N. Bogolioubov and Y. A. Mitropolsky,
*Asymptotic Methods in the Theory of Nonlinear Oscillations*, Gordon and Breach, New York, NY, USA, 1961. - J. He, “Modified Lindstedt–Poincare methods for some strongly non-linear oscillations: part II: a new transformation,”
*International Journal of Non-Linear Mechanics*, vol. 37, no. 2, pp. 315–320, 2002. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - J. H. He, “Modified straightforward expansion,”
*Meccanica*, vol. 34, no. 4, pp. 287–289, 1999. View at Publisher · View at Google Scholar · View at Scopus - J. He, “Preliminary report on the energy balance for nonlinear oscillations,”
*Mechanics Research Communications*, vol. 29, no. 2-3, pp. 107–111, 2002. View at Publisher · View at Google Scholar · View at Scopus - J. H. He, “Iteration perturbation method for strongly nonlinear oscillations,”
*Journal of Vibration and Control*, vol. 7, no. 5, pp. 631–642, 2001. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - J. H. He, “Bookkeeping parameter in perturbation methods,”
*International Journal of Nonlinear Sciences and Numerical Simulation*, vol. 2, no. 3, pp. 257–264, 2001. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - J. He, “Some asymptotic methods for strongly nonlinear equations,”
*International Journal of Modern Physics B*, vol. 20, no. 10, pp. 1141–1199, 2006. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - J. He, “Max-min approach to nonlinear oscillators,”
*International Journal of Nonlinear Sciences and Numerical Simulation*, vol. 9, no. 2, pp. 207–210, 2008. View at Google Scholar · View at Scopus - R. E. Mickens, “Iteration procedure for determining approximate solutions to nonlinear oscillator equations,”
*Journal of Sound and Vibration*, vol. 116, no. 1, pp. 185–187, 1987. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - R. E. Mickens,
*Oscillations in Planar Dynamics Systems*, World Scientific, Singapore, 1996. View at Publisher · View at Google Scholar · View at MathSciNet - G. Adomian,
*Solving Frontier Problems of Physics: The Composition Method*, Kluwer Academic Publishers, Boston, Mass, USA, 1994. View at Publisher · View at Google Scholar · View at MathSciNet - J. He, “Variational iteration method—a kind of non-linear analytical technique: some examples,”
*International Journal of Non-Linear Mechanics*, vol. 34, no. 4, pp. 699–708, 1999. View at Publisher · View at Google Scholar · View at Scopus - M. Heydari, S. M. Hosseini, G. B. Loghmani, and D. D. Ganji, “Solution of strongly nonlinear oscillators using modified variational iteration method,”
*International Journal of Nonlinear Dynamics in Engineering and Sciences*, vol. 3, pp. 33–45, 2011. View at Google Scholar - M. Heydari, G. B. Loghmani, and S. M. Hosseini, “An improved piecewise variational iteration method for solving strongly nonlinear oscillators,”
*Computational and Applied Mathematics*, 2014. View at Publisher · View at Google Scholar - J. He, “Homotopy perturbation technique,”
*Computer Methods in Applied Mechanics and Engineering*, vol. 178, no. 3-4, pp. 257–262, 1999. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - S. Momani and V. S. Ertürk, “Solutions of non-linear oscillators by the modified differential transform method,”
*Computers & Mathematics with Applications*, vol. 55, no. 4, pp. 833–842, 2008. View at Publisher · View at Google Scholar · View at MathSciNet - S. Momani, G. H. Erjaee, and M. H. Alnasr, “The modified homotopy perturbation method for solving strongly nonlinear oscillators,”
*Computers & Mathematics with Applications*, vol. 58, no. 11-12, pp. 2209–2220, 2009. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - M. Razzaghi, J. Nazarzadeh, and K. Y. Nikravesh, “A collocation method for optimal control of linear systems with inequality constraints,”
*Mathematical Problems in Engineering*, vol. 3, no. 6, pp. 503–515, 1998. View at Publisher · View at Google Scholar · View at Scopus - M. Razzaghi and H. Marzban, “Direct method for variational problems via hybrid of block-pulse and Chebyshev functions,”
*Mathematical Problems in Engineering*, vol. 6, no. 1, pp. 85–97, 2000. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - M. Razzaghi and H. R. Marzban, “A hybrid domain analysis for systems with delays in state and control,”
*Mathematical Problems in Engineering. Theory, Methods and Applications*, vol. 7, no. 4, pp. 337–353, 2001. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet · View at Scopus - H. R. Marzban and M. Razzaghi, “Solution of time-varying delay systems by hybrid functions,”
*Mathematics and Computers in Simulation*, vol. 64, no. 6, pp. 597–607, 2004. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet · View at Scopus - K. Maleknejad and M. Tavassoli Kajani, “Solving linear integro-differential equation system by Galerkin methods with hydrid functions,”
*Applied Mathematics and Computation*, vol. 159, no. 3, pp. 603–612, 2004. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - H. R. Marzban and M. Razzaghi, “Solution of multi-delay systems using hybrid of block-pulse functions and Taylor series,”
*Journal of Sound and Vibration*, vol. 292, no. 3–5, pp. 954–963, 2006. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - H. R. Marzban, S. M. Hoseini, and M. Razzaghi, “Solution of Volterra's population model via block-pulse functions and Lagrange-interpolating polynomials,”
*Mathematical Methods in the Applied Sciences*, vol. 32, no. 2, pp. 127–134, 2009. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet · View at Scopus - H. R. Marzban, H. R. Tabrizidooz, and M. Razzaghi, “Hybrid functions for nonlinear initial-value problems with applications to Lane-Emden type equations,”
*Physics Letters A*, vol. 372, no. 37, pp. 5883–5886, 2008. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - M. Razzaghi, “Optimization of time delay systems by hybrid functions,”
*Optimization and Engineering*, vol. 10, no. 3, pp. 363–376, 2009. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus - H. R. Marzban, H. R. Tabrizidooz, and M. Razzaghi, “A composite collocation method for the nonlinear mixed Volterra-Fredholm-Hammerstein integral equations,”
*Communications in Nonlinear Science and Numerical Simulation*, vol. 16, no. 3, pp. 1186–1194, 2011. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet · View at Scopus - R. E. Mickens, “Mathematical and numerical study of the Duffing-harmonic oscillator,”
*Journal of Sound and Vibration*, vol. 244, no. 3, pp. 563–567, 2001. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - C. W. Lim and B. S. Wu, “A new analytical approach to the Duffing-harmonic oscillator,”
*Physics Letters A*, vol. 311, no. 4-5, pp. 365–373, 2003. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - C. W. Lim, B. S. Wu, and W. P. Sun, “Higher accuracy analytical approximations to the Duffing-harmonic oscillator,”
*Journal of Sound and Vibration*, vol. 296, no. 4-5, pp. 1039–1045, 2006. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet · View at Scopus - S. S. Ganji, D. D. Ganji, Z. Z. Ganji, and S. Karimpour, “Periodic solution for strongly nonlinear vibration systems by He's energy balance method,”
*Acta Applicandae Mathematicae*, vol. 106, no. 1, pp. 79–92, 2009. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - T. Ozis and A. Yildirim, “Determination of the frequency-amplitude relation for a Duffing-harmonic oscillator by the energy balance method,”
*Computers & Mathematics with Applications*, vol. 54, no. 7-8, pp. 1184–1187, 2007. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - J. P. Boyd,
*Chebyshev and Fourier Spectral Methods*, Dover Publications, 2000. - M. Heydari, Z. Avazzadeh, and G. B. Loghmani, “Chebyshev cardinal functions for solving Volterra-Fredholm integro-differential equations using operational matrices,”
*Iranian Journal of Science and Technology A*, vol. 36, no. 1, pp. 13–24, 2012. View at Google Scholar · View at MathSciNet · View at Scopus - M. Heydari, G. B. Loghmani, and S. M. Hosseini, “Operational matrices of Chebyshev cardinal functions and their application for solving delay differential equations arising in electrodynamics with error estimation,”
*Applied Mathematical Modelling*, vol. 37, no. 14-15, pp. 7789–7809, 2013. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus - J. C. Mason and D. C. Handscomb,
*Chebyshev Polynomials*, CRC Press, Boca Raton, Fla, USA, 2003. View at MathSciNet - H. N. Abramson, “Nonlinear vibration,” in
*Shock and Vibration Handbook*, C. M. Harris, Ed., McGraw-Hill, New York, NY, USA, 1988. View at Google Scholar - S. B. Tiwari, B. Nageswara Rao, N. Shivakumar Swamy, K. S. Sai, and H. R. Nataraja, “Analytical study on a Duffing-harmonic oscillator,”
*Journal of Sound and Vibration*, vol. 285, no. 4-5, pp. 1217–1222, 2005. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet · View at Scopus