Abstract
The forced damped parametric driven pendulum oscillators are analyzed numerically via the Galerkin method (GM) and analytically using both ansatz method (AM) and He’s frequency formulation. One of the most important features of the obtained numerical approximation using GM is that it can recover a large number of different oscillators related to the problem under study. Moreover, the mentioned equation is solved analytically via both AM and He’s frequency formulation. Also, the analytical approximations can recover many different oscillators related to the problem under consideration. Both analytical and numerical approximations are compared with each other and with Runge–Kutta (RK) numerical approximation by estimating both maximum global distance and residual errors. The proposed method can help many authors interested in studying the dynamic problems to explain the mechanics of oscillating to different oscillators in physics, plasma models, engineering, and biological systems.
Introduction
The deep understanding of the mechanism of nonlinear oscillations has an effective role in interpreting the ambiguities of many natural and physical phenomena as well as engineering problems in various fields of science. Accordingly, many researchers have been able to give correct scientific explanations about their scientific experiences based on a deep understanding of the characteristics of these phenomena after the clarity of the ambiguity about the phenomenon under study.1–5 In the framework of nonlinear dynamics, there is no doubt that the scenario of dynamic mechanism of the pendulum motion is one of the main objects that have deserved more attention in modeling different kind of (non)linear phenomena related to the nonlinear oscillations, chaos, and bifurcations.6–10 The simple pendulum has been used as a physical model to several solve problems related to many realistic and physical problems, for example, nonlinear plasma oscillations,11–13 Duffing oscillators,14–17 Helmholtz oscillations, 18 the nonlinear equation of wave, 19 and many other oscillators.20–25
It is know that the main objective of the numerical approaches is to find some numerical solutions to various realistic physical, engineering, and natural problems, especially when exact solutions are unavailable or extremely difficult to determine. There are many numerical approaches that were used for analyzing the family of the Duffing oscillator and Duffing–Helmholtz oscillator with constant coefficients. It is known that this family is integrable, that is, its exact solution is available in the absence of damping effect. On the other hand, if the damping effect and some others friction forces are taken into account, we get a non–integral differential equation, that is, its exact solution is not available. Therefore, some semi-analytical or/and numerical methods must be used in order to analyze this type of non–integral differential equations to find some approximate analytical and numerical solutions. The parametric driven pendulum equation is one of the non–integral second-order differential equations that govern the motion of a harmonic pendulum under the effect of damping26,27
Due to the potential applications of the nonlinear pendulum oscillators, in this work the damped parametric driven pendulum under the influence of a periodic external force in the pivot vertically will be investigated. In this case, the equation of motion becomes
Equation (2) also is not integrable, thus, it will be solved numerically and/or using some ansatz to find some analytical approximations. Using some polynomial approximations to sin θ, we get
However, in the absence of the driven term Q0 cos (γt), equation (3) reduces to the forced damped Duffing equation with constant coefficients
In this study, some different analytical and numerical approaches are introduced for analyzing and solving equation (2). In the first, the Galerkin method is employed for analyzing this problem numerically. This method will reduce the second-order differential equation (2) to a system of algebraic nonlinear equations. After that we can solve the obtained system using various method or using MATHEMATICA Package. In the second and third approaches, both ansatz method and He’s frequency formulation are applied for solving this problem analytically. Since this equation is not integrable, so all obtained solutions using both ansatz method and He’s frequency formulation are analytical approximations. Therefore, both maximum global distance and residual errors are estimated for all obtained solutions and compared with RK numerical approximation. The proposed methodology and approximations maybe help many authors for investigating the behavior of realistic pendulum oscillations and many phenomena related to the oscillations such as the motion of atoms and molecules within different materials, oscillations in different plasma systems, etc.
The rest of this work is organized in the following fashion: Galerkin Algorithm for analyzing the equation of motion to the pendulum oscillators is discussed in details in Sec. II. In this section, both unforced and forced damped parametric driven pendulum oscillators are examined. In Sec. (III), the ansatz method is applied for deriving some analytical approximations to the equation of motion. Moreover, In Sec. (IV), He’s frequency formulation is introduced for getting a new formula for the analytical approximation to the equation of motion. In Sec. (V), the obtained approximations for different types of oscillators have been discussed. Also, both maximum global distance error and maximum global residual error have been estimated and discussed for different types of oscillators. Moreover, the impact of physical parameters (coefficients of the physical problem (2)) on the profile of the oscillator have been examined. The obtained results are summarized in Sect. (VI).
Galerkin Algorithm for Analyzing the Damped Pendulum Oscillators
Let us consider a polynomial second-order ode
Some particular cases to the i.v.p. (5) could be obtained such as
We will use the same idea as for the linear case (7a), that is, we assume an approximate solution to the i.v.p. (5) in the interval 0 ≤ t ≤ T could be defined as
Figure 1 demonstrates the hat functions on the grid ξ ≡ t gives the key for evaluating the weighted residuals. From this figure, we can deduce the values of φj−1, φ
j
, and φj+1 in the intervals Diagram of the hat functions.
Some properties of the Galerkin hat functions for t ∈ [0, T] could be illustrated as follows
In general, the following integration is obtained
Moreover, the value of the below integration is derived
Assuming that a
j
(t) ≡ a
j
=const, and by using the value of P(x) given in equation (6), we can easily evaluate the following integral
Some others useful formulas that can be used for analyzing the different equations of motion for various pendulum oscillators via Galerkin method are introduced
The formulas (14)-(16) are used for evaluating the weighted residuals in the case when the coefficients a
k
(t) in (6) are polynomials in t. For example, the variable-coefficients forced damped Helmholtz–Duffing oscillator:
Moreover, some relations related to the Galerkin hats and trigonometric functions are defined as
For example, the forced damped Mathieu–Duffing oscillator:
Galerkin method for anatomy the forced damped pendulum oscillators
Now, let us apply the Galerkin method for analyzing the forced damped parametric driven pendulum i.v.p.
Assuming that there exists some T > 0 which satisfies θ(0) = θ(T) = 0. Now, we try to find an approximate solution to the i.v.p. (18) in the ansatz form
Multiplying both sides of equation (19) by φ
j
, and integrating the obtained equation on the interval
Now we can integrate equation (20) term by term according to the Galerkin method and depending on the above mentioned relations
Using the value of θ given in equation (8), and taking the value of the relation φ
r
φ
s
= 0 for
Inserting equation (22) into equation (21) give us
Following the same procedure as above, the value of the integral I2 can be easily obtained
The integral value of I4 can be evaluated as follows
Our next aim is to evaluate the integral value of I3
Using the above relations and after some tedious but straightforward calculations, we obtain
Finally, the system of nonlinear transcendental equations to be solved is
We will have
Analytical Approaches
Here, both Ansatz method (AM) and He’s frequency formulation can be applied for deriving some analytical approximations to the nonlinear pendulum equation of motion.
First approach: Ansatz Method
To find an analytical approximation to the i.v.p. (18), the proposed method (ansatz method (AM)) is summarized in the following steps Step (1) First let F = 0, then the i.v.p. (18) reduces to the following i.v.p. Step (2) Assuming that the solution of the i.v.p. (28) is given by the ansatz Step (4) Assuming the solution of Step (6) For Step (7) Now, let us retune to the i.v.p. (18) and suppose that its analytical approximation is given by Step (8) The integration of equation (35) may be approximated as follows
The constants c0 and c1 are found from the ICs θ(0) = θ0 and
Second approach: He’s frequency formulation
This was devoted for analyzing many problems related to the different pendulum oscillators .29–33 The algorithm of this approach can be summarized in the following brief steps based on the published papers about this method Step (1) Let us define the following residual function Step (2) Using Taylor expansion or Chebyshev approximation for where λ = 1/6 (for Taylor expansion) or λ = 2/13 (for Chebyshev approximation). Step (3) For β = 0 and F0 = 0, the following homotopy is introduced
Assuming the solution is defined by the following ansatz Step (4) Inserting solution (42) into H
p
= 0 (given in equation (41)) and after tedious calculations and in order to avoid secularity, then we obtain the following ode in u for p = 1, Step (5) Integrating equation (43) twice over τ, we obtain a huge value for u with two constants Step (6) Then the value of u is obtained as Step (7) He’s frequency–amplitude formulation reads Step (8) In order to get the solution to the damped oscillator, we replace A by A exp (−βt) and then we get the following generalized frequency–amplitude formulation
Finally, the solution to the unforced damped oscillator reads Step (9) For the forced damped case Step (10) By inserting solution (50) into equation (39), taking the following value of φ into consideration Step (11) From the coefficient of cos (tΩ) in expression (51) and for φ(0) = 0, we have
By solving equation (52) using the following mathematica commands
RESULTS AND DISCUSSION
For numerical results, we can discuss different cases for the nonlinear pendulum oscillators depending on the initial conditions • In the first case, the variable-coefficients forced damped Duffing oscillator for • In the absence of forced term (F = 0), the variable-coefficients unforced damped Duffing oscillator is presented as illustrated in Figure 2(b) for • Also, the variable-coefficients forced undamped Duffing oscillator in the absence damping term (β = 0) is discussed for • Moreover, the forced damped parametric pendulum oscillator/or the constant-coefficients forced damped Duffing oscillator in the absence of the excitation amplitude (Q0 = 0) is discussed for The numerical approximations to the i.v.p. (18) using both GM and RK numerical method for different values of

Both maximum global distance and residual errors for the numerical approximations using both GM and RK numerical method to the i.v.p. (18) are estimated for all mentioned cases.
Also, all obtained numerical approximations are discussed for different values of the physical parameters The impact of hats number n on the numerical approximations to the i.v.p. (18) using both GM and RK numerical method is investigated. Both maximum global distance and residual errors for the numerical approximations using both GM and RK numerical method to the i.v.p. (18) are estimated at 
One can see that the accuracy of the approximation using GM increases with increasing the number of hats n. Also, it is clear that RK numerical approximation in this interval is not good as compared to the numerical approximation using GM. However, for long time domain say, 0 ≤ t ≤ 100 with small values to Ω, say Ω = 2 or less, the RK numerical approximation becomes better than all mentioned approximations as shown below
For arbitrary values to the physical parameters, the effect of damping coefficient β, excitation amplitude Q0, coefficient of forcing term F, and initial velocity The impact of damping coefficient β on the numerical approximations to the i.v.p. (18) using both GM and RK numerical method is investigated. The impact of excitation amplitude Q0 on the numerical approximations to the i.v.p. (18) using both GM and RK numerical method is investigated. The impact of forcing term coefficient F on the numerical approximations to the i.v.p. (18) using both GM and RK numerical method is investigated. The impact of the initial velocity The maximum global residual error for the analytical and numerical approximations using RK numerical method, GM, AM, and He’s frequency formulation to the i.v.p. (18) are estimated at 



Conclusions
The equation of motion of the forced damped parametric driven pendulum and some related equations have been investigated using different numerical and analytical approaches including the Galerkin method (GM), ansatz method (AM), and He’s frequency formulation. In the first, the mentioned equation of motion has been reduced to the variable-coefficients forced damped Duffing oscillator via Taylor expansion or Chebyshev approximation. After that the GM was applied for analyzing the variable-coefficients forced damped Duffing oscillator. The obtained Galerkin approximation could be recovered several cases for the pendulum oscillators. In the first case, we discussed the forced damped parametric driven pendulum oscillator/or the variable-coefficients forced damped Duffing oscillator for arbitrary velocity. Also, the unforced damped parametric driven pendulum oscillator/or the variable-coefficients unforced damped Duffing oscillator in the absence of forced term (F = 0) has been reported. Moreover, the forced undamped parametric driven pendulum oscillator/or the variable-coefficients forced undamped Duffing oscillator in the absence of damping term (β = 0) has been investigated. Furthermore, we studied the forced damped parametric pendulum oscillator/or the constant-coefficients forced damped Duffing oscillator in the absence of driven term (Q0 = 0). On the other side, some analytical approximations to all mentioned evolution equations have been derived in detail via both ansatz method and He’s frequency formulation.
The numerical approximations using GM and the analytical approximations using AM and He’s frequency formulation have been discussed and compared with the RK numerical approximations. It was observed that the numerical approximations using GM give high-accurate results as compared to the RK numerical approximations and the analytical approximations, and this is one of the most important features of the GM. Thus, this method is considered one of the powerful and effective numerical methods for solving dynamic problems due to its high-accuracy. All used methods and obtained approximations can help many researchers in modeling and analyzing nonlinear oscillations in different plasma models.
Footnotes
Acknowledgements
The authors express their gratitude to Princess Nourah bint Abdulrahman University Researchers Supporting Project (Grant No. PNURSP2022R17), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia. Taif University Researchers Supporting Project No. (TURSP-2020/275), Taif University, Taif, Saudi Arabia.
Author Contributions
All authors contributed equally and approved the final manuscript.
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: The authors express their gratitude to Princess Nourah bint Abdulrahman University Researchers Supporting Project (Grant No. PNURSP2022R17), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia. Taif University Researchers Supporting Project No. (TURSP-2020/275), Taif University, Taif, Saudi Arabia.
Data Availability
All data generated or analyzed during this study are included in this published article (more details or mathematica codes can be requested from El-Tantawy).
