11485 FACTA UNIVERSITATIS Series: Mechanical Engineering Vol. 21, No 1, 2023, pp. 21 - 29 https://doi.org/10.22190/FUME230108006H © 2023 by University of Niš, Serbia | Creative Commons License: CC BY-NC-ND Original scientific paper A GOOD INITIAL GUESS FOR APPROXIMATING NONLINEAR OSCILLATORS BY THE HOMOTOPY PERTURBATION METHOD Ji-Huan He1,2,3, Chun-Hui He4,5, Abdulrahman Ali Alsolami5 1National Engineering Laboratory for Modern Silk, College of Textile and Clothing Engineering, Soochow University, Suzhou, China 2School of Mathematics and Information Science, Henan Polytechnic University, Jiaozuo, China 3School of Science, Xi’an University of Architecture and Technology, Xi’an, China 4School of Mathematics, China University of Mining and Technology, Xuzhou, Jiangsu, China 5Department of Mathematics, Faculty of Science, King Abdulaziz University, Jeddah, Saudi Arabia Abstract. A good initial guess and an appropriate homotopy equation are two main factors in applications of the homotopy perturbation method. For a nonlinear oscillator, a cosine function is used in an initial guess. This article recommends a general approach to construction of the initial guess and the homotopy equation. Duffing oscillator is adopted as an example to elucidate the effectiveness of the method. Key words: Homotopy perturbation method, Nonlinear oscillator, Periodic solution 1. INTRODUCTION The nonlinear vibration theory has triggered skyrocketing interest in both nonlinear science and engineering, from vibration isolators [1] to nano materials [2] and micro-electromechanical systems [3,4], and the homotopy perturbation method [5] has laid the foundation for fast and accurate insight into the frequency-amplitude relation of a nonlinear oscillator, which occurs anywhere in engineering and science [6]. The traditional perturbation method [6] is widely used for this purpose, however, it is only valid for the Received: January 08, 2023 / Accepted February 05, 2023 Corresponding author: Ji-Huan He and Chun-Hui He Affiliation, National Engineering Laboratory for Modern Silk, College of Textile and Clothing Engineering, Soochow University, Suzhou, P. R. China E-mails: Hejihuan@suda.edu.cn (J.H. He), mathew_he@yahoo.com (C.H. He) mailto:Hejihuan@suda.edu.cn mailto:mathew_he@yahoo.com 22 JI.H. HE, C.H. HE, A.A. ALSOLAMI weak nonlinearity. Other effective analytical methods include the variational iteration method [7,8,9] and the variational approach [10,11,12]. The homotopy perturbation method [5] is a universal method for nonlinear vibration systems, it has been considered as a strongly promising and unprecedented method for nonlinear problems [13,14], and many reliable modifications were recommended in literature, among which Li-He’s modification [15,16] is much attractive. The homotopy perturbation method is to decompose a nonlinear equation to infinite linear equations where Laplace transform can be applied, this modification is called as He-Laplace method [17]. The parameterized homotopy perturbation method [18], and the couple of the homotopy perturbation method with Kashuri Fundo transform [19] or the Lindstedt-Poincare technology [20] has also been caught much attention. The homotopy perturbation method is extremely effective for fractional calculus [21-24], machine learning [25-28] and imaging process [29-33]. Though the method is almost matured, there is still much space to further improvement. 2. HOMOTOPY PERTURBATION METHOD The homotopy perturbation method [5] is a powerful tool to nonlinear vibration systems. We consider a nonlinear vibration equation in the form ( ) 0u A u+ = (1) where A is a nonlinear function of u, and A/u>0. In order to elucidate the solving process of the homotopy perturbation method, we can construct the following universal homotopy equation  2 2( ) ( ) 0 + + − + =u t u p u A u  (2) where ω is the frequency, p is the homotopy parameter. The homotopy perturbation method is to deform Eq. (2) gradually from p=0 to p=1. When p tends to zero, Eq. (2) results in a linearized oscillator, while when p tends to1, Eq. (2) turns to be the original one. The most important two factors of the homotopy perturbation method are: 1) how to choose a good initial guess with possible unknown parameters; and 2) how to establish an appropriate homotopy equation. All iteration methods are sensitive to the initial guess. A good choice of the initial guess leads to a fast convergence, while an inappropriate choice might result in a wrong result [34]. To show the importance of the homotopy equation in the solving process, if we construct the following homotopy equation for a nonlinear oscillator  2 2( ) ( ) 0 − + + =u t u p u A u  (3) we need an infinite iteration to obtain an approximate solution converging extremely slowly to the exact solution. This is because when p=0, Eq. (3) has no any property of oscillation, it should be emphasized that the initial guess must have the basic properties of the solution, the classic homotopy perturbation method always begins with 0 ( ) cos=u t A t (4) A Good Initial Guess for Approximating Nonlinear Oscillators by the Homotopy Perturbation Method 23 In this paper, we improve the homotopy equation instead of Eq. (2) and choose a better initial guess. Instead of Eq. (4), this paper uses the following initial guess 0 0 ( ) cos(2 1) = = + N i i u t a i t (5) where ai (i=0~N) are the constants satisfying the following identity 0= = N i i a A (6) The initial guess given in Eq. (4), with an unknown frequency, is widely used in the homotopy perturbation method, while Eq. (5) contains more unknown constants and provides a more flexible approach to an accurate identification of the frequency. 3. AN EFFECTIVE IMPROVEMENT OF THE HOMOTOPY PERTURBATION METHOD In this section, we adopt the well-known Duffing oscillator as an example to elucidate the solving process 3 0u u u+ + = (7) with initial conditions (0) , (0) 0= =u A u (8) The Duffing oscillator is always used as a good paradigm to elucidate the effectiveness and reliability of a method [35-39]. We choose an initial guess in the form 0 ( ) cos cos 3= +u t a t b t  (9) Eq. (9) is the exact solution of the following linear oscillator with a forcing term 2 2 0 0 ( ) 8 cos 3 0 + + =u t u b t   , (0) =u A and (0) 0 =u (10) where a and b are unknown parameters. According to the initial conditions, the parameters a and b should satisfy the following identity + =a b A (11) Accordingly we recommend the following homotopy equation  2 2 2 3 2( ) 8 cos 3 (1 ) 8 cos 3 0 + + + − + − =u t u b t p u u b t       (12) It is obvious that when p=0, Eq. (12) becomes Eq. (10), whose solution is Eq. (9); when p=1, Eq. (9) becomes the original one. For b=0, Eq. (12) is the standard homotopy equation. According to the homotopy perturbation method, the solution is expanded as 2 0 1 2 = + + +u u pu p u (13) 24 JI.H. HE, C.H. HE, A.A. ALSOLAMI Eq. (12) becomes   2 2 2 2 0 1 2 0 1 2 2 2 2 3 2 0 1 2 0 1 2 ( ) 8 cos 3 (1 )( ) ( ) 8 cos 3 0   + + + + + + + + + − + + + + + + + − = u pu p u u pu p u b t p u pu p u u pu p u b t        (14) Proceeding the standard solving process required by the perturbation method [5,6], we can obtain a series of linear differential equations. The first two equations are 2 2 0 0 ( ) 8 cos 3 0 + + =u t u b t   , 0 (0) =u A and 0 (0) 0 =u (15) 2 2 3 2 1 1 0 0 ( ) (1 ) 8 cos 3 0 + + − + − =u t u u u b t     , 1 (0) 0=u and 1 (0) 0 =u (16) The solution of Eq. (15) is Eq. (9). Using this result, Eq. (16) becomes 2 2 1 1 3 2 ( ) (1 )( cos cos 3 ) ( cos cos 3 ) 8 cos 3 0  + + − + + + − = u t u a t b t a t b t b t          (17) Simplifying Eq. (17) yields the following equation 2 2 3 2 2 1 1 3 2 3 2 2 2 2 3 3 3 3 ( ) (1 ) ( ) cos 4 4 2 1 3 3 ( ) 8 cos 3 4 2 4 3 3 3 1 ( ) cos 5 cos 7 cos 9 4 4 4 4    + + − + + +      + + + − + +    + + + + u t u a a a b ab t a a b b b b t a b ab t ab t b t              (18) No term of tcosωt should be involved in u1 for a periodic solution, so the coefficient of cosωt should be zero: 2 3 2 23 3 3 (1 ) ( ) 0 4 4 2 − + + + =a a a b ab  (19) or 2 2 2 2 2 23 3 3 3 3 1 ( ) 1 ( 2 ) 1 ( 2 ) 4 4 2 4 4 = + + + = + + = + + −a ab b aA b A b bA    (20) From Eq. (7) we have 3 2 (0) (0) (0) (1 )u u u A A  = − − = − + (21) while Eq. (9) predicts 2 (0) ( 9 )u a b  = − + (22) We, therefore, have 2 2 ( 9 ) (1 )+ = +a b A A  (23) or 2 2 2 (1 ) (1 ) 9 8 + + = = + + A A A A a b A b    (24) A Good Initial Guess for Approximating Nonlinear Oscillators by the Homotopy Perturbation Method 25 For given A and ε, we can obtain the approximate frequency easily by solving Eqs. (20) and (24) simultaneously. 4. DISCUSSION In case ε<<1 , we can determine approximately the value of b from the following equation by the perturbation method 2 2 23 (1 ) 1 ( 2 ) 4 8 + + + − = + A A A b bA A b   (25) The perturbation solution for b reads 31 32 =b A (26) We, therefore, obtain 2 2 2 2 1 3 1 1 4 1 4 + = = + + A A A     (27) Eq. (27) is just same as that solved by the classic homotopy perturbation method, and it is valid for ε<<1. Considering our small assumption of the parameter ε, we cannot fail to appreciate its harmony and intoxicating formula valid for all values of ε>0 . Considering another case when ε tends to infinity, Eq. (25) becomes 3 2 23 ( 2 ) 4 8 + − = + A A b bA A b   (28) Solving for b from Eq. (28) results in 0.04943=b A (29) As a result, we have 2 2 2 2(1 ) 1 0.7166 8 1.3955 + = = = + A A A A A b     (30) or 1/ 2 0.8465= A  (31) while the exact frequency when ε tends to infinity is [40]: 2 2 / 2 2 0.5 0 = 0.8472 2 (1 0.5sin ) ex A A t dt      − = = − (32) 26 JI.H. HE, C.H. HE, A.A. ALSOLAMI Fig. 1 Comparison between the exact solution (continuous line) and the approximate one (discontinuous line) for different cases: (a) A=1 and ε =1; (b) A=1 and ε=100; (c) A=1 and ε=10000. A Good Initial Guess for Approximating Nonlinear Oscillators by the Homotopy Perturbation Method 27 The relative error is 0.08%. Fig.1 gives the comparison between the approximate solution and the exact one for different cases, showing an extremely high accuracy of the approximate solution from small to large ones. 5. CONCLUSION We looked into the effect of the initial guess on the solution accuracy. Obviously, the obtained solution has a better accuracy than that by the classic homotopy perturbation [41,42], the approximate solutions obtained by other analytical methods, especially the frequency formulation [43, 44], can also be used as the initial guess, this idea can lead to a new modification of the homotopy perturbation method, and we will discuss it in a forthcoming article. As a conclusion, we give a new way to construction of a suitable homotopy equation for accurate estimate the periodic solution of a nonlinear vibration equation regardless of its nonlinearity strength. Though we use the method to solve nonlinear oscillators, it is also valid for other nonlinear problems. REFERENCES 1. Ibrahim, R.A., 2008, Recent advances in nonlinear passive vibration isolators, Journal of Sound and Vibration, 314(3-5), pp. 371-452. 2. Ke, L.L., Yang, J., Kitipornchai, S., 2010 , Nonlinear free vibration of functionally graded carbon nanotube-reinforced composite beams, Composite Structures, 92(3) , pp. 676-683. 3. Yang, Q., 2023, A mathematical control for the pseudo-pull-in stability arising in a micro-electromechanical system, Journal of Low Frequency Noise, Vibration and Active Control, doi: 10.1177/14613484221133603 4. Feng, G.Q., Niu, J.Y., 2023, The analysis for the dynamic pull-in of a micro-electromechanical system, Journal of Low Frequency Noise, Vibration and Active Control, doi: 10.1177/14613484221145588 5. He, J.H., 1999, Homotopy perturbation technique, Computer Methods in Applied Mechanics and Engineering, 178(3-4), pp. 257-262. 6. Nayfeh, A.H., 1973, Perturbation methods, New York, Wiley & Sons. 7. Wang, S.Q., He, J.H., 2007, Variational iteration method for solving integro-differential equations, Physics letters A, 367(3), pp. 188-191. 8. Odibat, Z.M., Momani, S., 2006, Application of variational iteration method to Nonlinear differential equations of fractional order, International Journal of Nonlinear Sciences and Numerical Simulation, 7(1), pp. 27-34. 9. Deng, S.X., Ge, X.X., 2022, The variational iteration method for Whitham-Broer-Kaup system with local fractional derivatives, Thermal Science, 26(3), pp. 2419-2426. 10. Wang, S.Q., 2009, A variational approach to nonlinear two-point boundary value problems, Computers & Mathematics with Applications, 58(11), pp. 2452-2455. 11. Shen, Y.Y., Huang, X.X., Kwak, K., et al., 2016, Subcarrier-pairing-based resource optimization for OFDM wireless powered relay transmissions with time switching scheme, IEEE Transactions on Signal Processing, 65(5), pp. 1130-1145. 12. Khan, Y., Akbarzade, M., Kargar, A., 2012, Coupling of homotopy and the variational approach for a conservative oscillator with strong odd-nonlinearity, Scientia Iranica, 19(3), pp. 417-422. 13. Biazar, J., Ghanbari, B., Porshokouhi, M.G., Porshokouhi, M.G., 2011, He's homotopy perturbation method: A strongly promising method for solving non-linear systems of the mixed Volterra-Fredholm integral equations, Computers & Mathematics with Applications, 61(4) , pp. 1016-1023. 14. Saranya, K., Mohan, V., Kizek, R., Fernandez, C., Rajendran, L., 2018, Unprecedented homotopy perturbation method for solving nonlinear equations in the enzymatic reaction of glucose in a spherical matrix, Bioprocess and Biosystems Engineering, 41(2) , pp. 281-294. 28 JI.H. HE, C.H. HE, A.A. ALSOLAMI 15. Anjum, N., He, J.H., Ain, Q. T., Tian, D., 2021, Li-He’s modified homotopy perturbation method for doubly-clamped electrically actuated microbeams-based microelectromechanical system, Facta Universitatis Series Mechanical Engineering, 19(4), pp. 601-612. 16. Ji, Q.P., Wang, J., Lu, L.X., Ge, C.F., 2021, Li-He's modified homotopy perturbation method coupled with the energy method for the dropping shock response of a tangent nonlinear packaging system, Journal of Low Frequency Noise, Vibration and Active Control, 40(2) , pp.675-682. 17. Nadeem, M., Li, F.Q.,2019, He-Laplace method for nonlinear vibration systems and nonlinear wave equations Journal of Low Frequency Noise, Vibration and Active Control, 38(3-4) , pp. 1060-1074. 18. Adamu, M.Y., Ogenyi, P., 2018, New approach to parameterized homotopy perturbation method, Thermal Science, 22(4), pp. 1865-1870. 19. Peker, H.A., Cuha, F.A., 2022, Application of Kashuri Fundo transform and homotopy perturbation method for fractional heat transfer and porous media equations, Thermal Science, 26(4), pp. 2877-2884. 20. Alam, M.S., Sharif, N., Molla, M.H.U., 2022, Combination of modified Lindstedt-Poincare and homotopy perturbation methods, Journal of Low Frequency Noise, Vibration and Active Control, doi: 10.1177/14613484221148049 21. Li, Z.Y., Wang, M.C., Wang, Y.L., 2022, Solving a class of variable order nonlinear fractional integral differential equations by using reproducing kernel function, AIMS Mathematics, 7(7), pp. 12935-12951. 22. Li, Z.Y., Chen, Q.T., Wang, Y.L., Li, X.Y., 2022, Solving two-sided fractional super-diffusive partial differential equations with variable coefficients in a class of new reproducing kernel spaces, Fractal and Fractional, 6(9), 492. 23. Wang, K.L., 2023, Novel analytical approach to modified fractal gas dynamics model with the variable coefficients, ZAMM, https://doi.org/10.1002/zamm.202100391. 24. Wang, K.L., Wei, C.F., 2023, Fractal soliton solutions for the fractal-fractional shallow water wave equation arising in ocean engineering, Alexandria Engineering Journal, 65, pp. 859-865. 25. Wang, S.Q., Wang, X.Y., Shen, Y.Y., et. al, 2022, An ensemble-based densely-connected deep learning system for assessment of skeletal maturity, IEEE Transactions on Systems, Man, and Cybernetics: Systems, 52(1), pp. 426-437. 26. Wang, S.Q., Shen, Y.Y., Shi, C.H., et. al, 2018, Skeletal maturity recognition using a fully automated system with convolutional neural networks, IEEE Access, 6, pp. 29979-29993. 27. Hu, S.Y., Yuan, J.P., Wang, S.Q., 2019, Cross-modality synthesis from MRI to PET using adversarial U-net with different normalization, 2019 International Conference on Medical Imaging Physics and Engineering, doi: 10.1109/ICMIPE47306.2019.9098219 28. Wu, K., Shen, Y.Y., Wang, S.Q., 2018, 3D convolutional neural network for regional precipitation nowcasting, Journal of Image and Signal Processing, 7(4), pp. 200-212. 29. Wang, S.Q., Li, X., Cui, J.L., et al., 2015, Prediction of myelopathic level in cervical spondylotic myelopathy using diffusion tensor imaging, Journal of Magnetic Resonance Imaging, 41(6), pp. 1682-1688. 30. Yu, W., Lei, B.Y., Shen, Y.Y., et. al, 2021, Morphological feature visualization of Alzheimer's disease via Multidirectional Perception GAN, IEEE Transactions on Neural Networks and Learning Systems, doi: 10.1109/TNNLS.2021.3118369 31. Hu, S.Y., Lei, B.Y., Wang, S.Q., et. al, 2021, Bidirectional mapping generative adversarial networks for brain MR to PET synthesis, IEEE Transactions on Medical Imaging, 41(1), pp. 145-157. 32. Yu, W., Lei, B.Y., Shen, Y.Y., et. al, 2021, Morphological feature visualization of Alzheimer's disease via Multidirectional Perception GAN, IEEE Transactions on Neural Networks and Learning Systems, doi: 10.1109/TNNLS.2021.3118369 33. Hu, S.Y., Yu, W., Chen, Z., et al., 2020, Medical image reconstruction using generative adversarial network for Alzheimer disease assessment with class-imbalance problem, IEEE 6th International Conference on Computer and Communications (ICCC), doi: 10.1109/ICCC51575.2020.9344912 34. Machina, A., Edwards, R., van den Driessche, P., 2013, Sensitive dependence on initial conditions in gene networks, Chaos, 23(2), 025101. 35. El-Dib, Y. O., Elgazery, N. S., Mady, A. A., Alyousef, H.A., 2022, On the modeling of a parametric cubic–quintic nonconservative Duffing oscillator via the modified homotopy perturbation method, Zeitschrift für Naturforschung A, 77(5), pp. 475-486. 36. Vahidi, A.R., Babolian, E., Azimzadeh, Z., 2018, An Improvement to the Homotopy Perturbation Method for Solving Nonlinear Duffing's Equations, Bulletin of the Malaysian Mathematical Sciences Society, 41(2) , pp. 1105-1117. 37. Azimzadeh, Z., Vahidi, A.R., Babolian, E., 2012, Exact solutions for non-linear Duffing's equations by He's homotopy perturbation method, Indian Journal of Physics, 86(8) , pp. 721-726. A Good Initial Guess for Approximating Nonlinear Oscillators by the Homotopy Perturbation Method 29 38. El-Dib, Y.O., 2023, Properties of complex damping Helmholtz-Duffing oscillator arising in fluid mechanics, Journal of Low Frequency Noise, Vibration and Active Control, doi: 10.1177/14613484221138560 39. Aljahdaly, N.H., Alharbi, M.A ., 2022, Semi-analytical solution of non-homogeneous Duffing oscillator equation by the Pade differential transformation algorithm, Journal of Low Frequency Noise, Vibration and Active Control, 41(4), pp.1454-1465. 40. Belendez, T., Belendez, F.J., Martinez, C., et al., 2016, Exact solution for the unforced Duffing oscillator with cubic and quintic nonlinearities, Nonlinear Dynamics, 86(3), pp. 1687–1700, 41. Aljahdaly, N.H., Shah, R.S., Naeem, M., Arefin, M.A., 2022, A Comparative Analysis of Fractional Space-Time Advection-Dispersion Equation via Semi-Analytical Methods, Journal of Function Spaces, 2022, 4856002, doi:10.1155/2022/4856002 42. Dubey, V.P., Kumar, D., Singh, J., Alshehri, A.M., Dubey, S., 2022, Analysis of local fractional Klein-Gordon equations arising in relativistic fractal quantum mechanics, Waves in Random and Complex Media, 2022, doi:10.1080/17455030.2022.2112993 43. Qie, N., Houa, W.-F., He, J.-H., 2021, The fastest insight into the large amplitude vibration of a string, Reports in Mechanical Engineering, 2(1), pp. 1-5. 44. Tian, Y., 2022, Frequency formula for a class of fractal vibration system, Reports in Mechanical Engineering, 3(1), pp. 55-61.