#### Abstract

In this work, some novel approximate analytical and numerical solutions to the forced damped driven nonlinear (FDDN) pendulum equation and some relation equations of motion on the pivot vertically for arbitrary angles are obtained. The analytical approximation is derived in terms of the Jacobi elliptic functions with arbitrary elliptic modulus. For the numerical approximations, the Chebyshev collocation numerical method is introduced for analyzing the equation of motion. Moreover, the analytical approximation and numerical approximation using the Chebyshev collocation numerical method and the MATHEMATICA command Fit are compared with the Runge–Kutta (RK) numerical solution. Also, the maximum distance error to all obtained approximations is estimated with respect to the RK numerical solution. The obtained results help many authors to understand the mechanism of many phenomena related to the plasma physics, classical mechanics, quantum mechanics, optical fiber, and electronic circuits.

#### 1. Introduction

The pendulum oscillator and some related equation have been used as a physical model to solve several natural problems related to bifurcations, oscillations, and chaos such as nonlinear plasma oscillations , Duffing oscillators , and Helmholtz oscillations , and many other applications can be found in . There are few attempts for analyzing the equation of motion of the nonlinear damped pendulum taking the friction forces into account . The approximate solution was obtained in form of the Jacobi elliptic functions. However, there are many others forces in addition to the friction force that affect the motion of the pendulum such as perturbed and periodic forces. These forces appear in different dynamic systems and cannot be neglected due to their great impact on the behavior of the oscillator. For instance, the unforced damped driven nonlinear pendulum equation/or the unforced damped parametric driven pendulum equationhas been derived in detail in , where , , , , , is a small parameter, and denotes the angular displacement. In (1), indicates the eigenfrequency of the system and represents the damping coefficient. Here, the pendulum is modeled by a sphere of mass , hanging at the end of a massless wire with length and fixed to a supporting point “O,” swinging to and from in a vertical plane under the gravity acceleration “.”. For , the unforced undamped nonlinear pendulum oscillation/the unforced undamped Duffing oscillator is recovered . (1) has only been analyzed numerically via the midpoint scheme, and based on our comprehensive survey, we did not find any attempt to find a semi-analytical solution to this equation. Motivated by the potential applications of the nonlinear oscillators, the forced damped driven nonlinear (FDDN) pendulum equation or sometimes called the forced damped parametric driven pendulum equation will be studied:

Also, some analytical approximations to (2) and some related equations will be derived for the first time and will be compared with the Runge–Kutta (RK) numerical solution. Moreover, the Chebyshev collocation numerical method  is introduced for analyzing both (1) and (2). Furthermore, the MATHEMATICA command Fit is devoted for analyzing the equation of motion. We graphically make a comparison between the analytical and numerical approximations, and the maximum distance error in the whole time domain is estimated.

#### 2. Analytical Approximations to the FDDN Pendulum Equation

Let us now write the evolution equation in the form of the initial value problem (i.v.p.):where indicates the oscillation amplitude.

Using Chebyshev polynomial approximation, we can approximate aswhere

The error of this approximation may be estimated via the following formula:

For example, at the angle , the exact error equals while the error according to formula (6) equals and the difference between them is given by . The respective approximation for reads as

Also, for , we obtain which will be used as the default value in the present study. Consequently, i.v.p. (3) can be reduced to the following variable coefficient forced damped Duffing i.v.p.

Suppose the solution of this problem is given by

The function is a solution to the following ode:

Accordingly, we getwhere the coefficients are given in Appendix 1.

Now, for small , we can define which leads towhere the coefficients have the same values given in Appendix 1 while the values of coefficients of and are given in Appendix 2.

The constants and could be determined from the following system:

Eliminating from system (13), we have the following cubic equation:

Also, by eliminating from system (13), we get

We choose the least in magnitude pair of real roots in (14) and (15). Accordingly, the final form of the analytical approximation to i.v.p. (3) is given bywithwhere

#### 3. Chebyshev Collocation Numerical Scheme for Analyzing FDDN Pendulum Equation

Now, the Chebyshev interpolation collocation method is introduced for analyzing i.v.p. (3) on the time interval . To do that, we first solve numerically the ode. Let be the RK numerical solution to the i.v.p. described by (3). Then, we assume that the solution is given in terms of Chebyshev polynomials:where stands for the Chebyshev polynomial of the first kind and denotes the highest degree of the Chebyshev polynomials involved in the linear combination.

The collocation points are defined asfor .

The additional equations are required for determining the values of . Thus, the values of the coefficients are found from the following linear system:

In general, increasing the value of will not guarantee good approximations. Thus, we must choose some optimal value for to our approximations. To this end, we define a range for possible values, say

We then find the optimal value for within this range. Let be the solution using formula (19) and let be the RK numerical solution to i.v.p. (3) on the interval . The following maximum distance error with respect to the RK numerical solution is defined:

The optimal value for on the range will then be that for which the error is as small as possible. o verifies the validity of this claim. Let us use the following data: , as an example in i.v.p. (3). By solving this problem via both RK and Chebyshev collocation numerical methods in the interval and estimating the error based on relation (23) for , we finally get the error associated with each number as shown in Table 1. The results in Table 1 illustrate that the optimal value of based on the mention data for equals and the error value corresponding to equals . Also, the optimal polynomial according to the mentioned data reads asPolynomial (24) allows us to estimate the cuts with the horizontal axis as well as the maxima and minima to the crest and the trough, respectively, as shown in Figure 1 and Table 2. Using the MATHEMATICA command Fit gives the following solution for :with error . Figure 2 demonstrates the comparison between the approximations of i.v.p. (3) using RK numerical solution with MATHEMATICA command Fit (here, polynomial (25)) and Chebyshev collocation numerical solution (24). It is noted that all used techniques give highly accurate approximations with low errors as compared to the RK numerical solutions.

The semi-analytical solution (16) to i.v.p. (3) could be recovered as follows.Case (1). For , the different approximations to the forced undamped Duffing oscillator with constant coefficients are introduced in Figure 3 with . The comparison between the RK method and the analytical approximation (15) is presented in Figure 3(a). The approximate solutions using the MATHEMATICA command Fit and RK method are displayed in Figure 3(b). In Figure 3(c), both RK and Chebyshev collocation numerical approximations are presented. Also, the maximum error for the analytical approximation (15) and MATHEMATICA command Fit and Chebyshev collocation numerical solutions as compared to the RK numerical approximation is estimated based on the following relation:Accordingly, the maximum error of the three approximations for the present case is estimated asCase (2). For , the comparison between the analytical approximation (16) and the numerical approximations using the RK, MATHEMATICA command Fit, and Chebyshev collocation numerical methods to the forced undamped Duffing equation with variable coefficients is considered as shown in Figure 4 with . The maximum error of the three approximations to the present case is calculated asCase (3). For , the unforced damped Duffing equation with variable coefficients is recovered and its semi-analytical solution (16) is compared with the numerical approximations using RK, MATHEMATICA command Fit, and Chebyshev collocation numerical methods as demonstrated in Figure 5 with . In addition, the maximum error to the three approximations as compared to RK numerical approximation is estimated asThe MATHEMATICA code for the RK and Chebyshev collocation numerical approximations with the maximum error is given in Appendix 3.Case (4). For , the general analytical approximation (16) to the forced damped parametric driven pendulum i.v.p. (3) is compared with the RK, MATHEMATICA command Fit, and Chebyshev collocation numerical solutions as elucidated in Figure 6. The influence of on the amplitude of the semi-analytical solution (16) is investigated as shown in Figure 7. It is noted that the amplitude of the analytical approximation (15) decreases with the increase of . Also, the maximum error according to relation (23) to the analytical approximation (16) and MATHEMATICA command Fit, and Chebyshev collocation numerical solutions as compared to the RK numerical solution is estimated as follows:

In all mentioned cases, it is observed that analytical approximation (16) to i.v.p. (3) and its related equations (here we mean the four mentioned cases) give highly accurate results as compared to the numerical approximations. It is observed that analytical approximation (16) is better than the MATHEMATICA approximation but less than the Chebyshev collocation numerical solution for all mentioned cases. However, in the fourth case, i.e., the forced damped parametric driven pendulum i.v.p. (3), the MATHEMATICA approximation is better than the analytical approximation (16). In general, all obtained approximations are characterized by their high accuracy. However, semi-analytical solution (16) is more stable than the Chebyshev collocation numerical solution against all relevant physical variables.

#### 4. Conclusions

In this work, some effective and accurate analytical and numerical approximations to the forced damped parametric driven pendulum equation have been derived and investigated. The mentioned equation of motion has been reduced to the forced damped Duffing equation with variable coefficients in order to find its analytical solution. In terms of the Jacobi elliptic functions, the analytical approximation has been derived. For the numerical approximations, the Chebyshev collocation method has been used for analyzing the equation of motion and some related equations. It was noted that the analytical approximation could recover some special cases to the nonlinear pendulum oscillators. For instance, for undamping case, i.e., for , the solution to the forced undamped Duffing equation with variable coefficients has been recovered and examined. Also, for , the solution to the forced undamped Duffing equation with constant coefficients has been recovered and discussed. The obtained approximations were compared with the RK numerical approximation and the MATHEMATICA command Fit approximation. Also, the maximum distance error has been estimated for all approximations as compared to the RK numerical approximation. It was found that the analytical approximation gives good results with high accuracy as compared to the numerical approximations. Furthermore, it was observed that the analytical approximation is better than the MATHEMATICA approximation but less than the Chebyshev collocation numerical solution for all mentioned cases except the case of the forced damped parametric driven pendulum i.v.p. (3), the MATHEMATICA approximation is slowly better than the analytical approximation (16). The methods used in this study could be extended to solve many nonlinear equations that control the different cases of pendulum oscillations . In addition, the obtained results/solutions are useful for investigating several physical problems related to the oscillations in plasma physics, fluid mechanics, field theory, engineering science, solid state physics, and quantum mechanics.

#### Appendix A

The coefficients of equation (11):

#### Appendix B

The coefficients and of equation (12):

#### Appendix C

MATHEMATICA Code for Chebyshev Collocation Numerical Method to Figure5(c). Note that this is general code which can be used and applied for analyzing many oscillators related to the present evolution equation.

Clear[a, b, m, h, x, [CurlyPhi], n, [Chi]]; \{a = 0, b = 30, m = 45\};

[Beta] = 0.1; [CapitalOmega] = 2; [Omega]0 = 1; [Omega]2 = 1; [CurlyEpsilon] = 0.1; [Gamma] = 0.1; x0 = 0; x1 = 0.1;

[Phi][t_]: =  [Omega]0ˆ2 - [CurlyEpsilon] [Omega]2 Cos[ [Gamma]

t]; F = 0;

rk = NDSolve[

y”[t] + 2 [Beta] y’[t] + [Phi][t] Sin[y[t]] = =

F Cos[ [CapitalOmega] t] && y[a] = = x0 && y’[a] = = x1,

y, \{t, 0, 100\}][[1, 1, 2]];

Plot[Evaluate[\{rk[t]\}], \{t, a, b - 10\}, PlotRange - All.

PlotStyle - \{\{Black, Thin\}\}]

h = (b - a)/m;

x[t_]:= Sum[

Subscript[c, k] ChebyshevT[k, (a + b - 2 t)/(a - b)], \{k, 0, m\}];

R[t_]: = x”[t] + 2 [Beta] x’[t] + [Phi][t]Sin[x[t]] -

F Cos[ [CapitalOmega] t];

[Xi][j_]: = 1/2 (a + b + (-a + (b) Cos[( [Pi] + 4 j [Pi])/(2 + 2 m)])

solc = Flatten[Solve[sys0]];

x[t_]:= Sum[

Subscript[c, k] ChebyshevT[k, (a + b - 2 t)/(a - b)]//. solc, \{k.

0, m\}];

[Chi][m_][t_]: =

Sum[Subscript[c, k] ChebyshevT[k, (a + b - 2 t)/(a - b)]//.

solc, \{k, 0, m\}];

er[m_]: = Max[Table[Abs[rk[t] - [Chi][m][t]], \{t, a, b, 0.1\}]];

error[m_]:= Module[\{ [Xi], [Chi], R, sys, solc, err\},

\{ [Xi][j_]: =

1/2 (a + b + (-a + (b) Cos[( [Pi] + 4 j [Pi])/(2 + 2 m)]); [Chi][tt_]: =

Sum[Subscript[c, k] ChebyshevT[k, (a + b - 2 tt)/(a - b)], \{k, 0,

m\}]; R[t_]: =  [Chi]”[tt] +

2 [Beta] [Chi]’[tt] + [Phi][tt]∗Sin[ [Chi][tt]] -

F Cos[ [CapitalOmega] tt];

sys =

Flatten[Join[

Table[rk[ [Xi][j]] = =  [Chi][ [Xi][j]], \{j, 5,

m\}], \{\{ [Chi][a] - x0 = = 0, [Chi]’[a] - x1 = = 0, [Chi][b] - rk[b] = = 0, [Chi]’[b] - rk’[b] = =

0, [Chi]”[b] - rk”[b] = = 0\}\}]];

solc = Flatten[NSolve[sys]]; [Chi][tt_]: =

Sum[Subscript[c, k] ChebyshevT[k, (a + b - 2 t)/(a - b)], \{k, 0,

m\}]//. solc;

err = Maximize[\{Abs[rk[t] -[Chi][t]], 0 = t = b\}, t][];

\};

\{err, [Chi][t]\}

];

nmin = 7; nmax = 60;

opt = Sort[Table[\{error[jj][], jj\}, \{jj, nmin, nmax\}]][];

n = opt[];

OPtimalnValue = = n

errx = error[n];

Error = = errx[]

poly = errx[];

Cheb = Plot[Evaluate[\{rk[t], poly\}], \{t, a, b\}, PlotRange - All.

PlotStyle - \{\{Dashing[0.05], Thick, Black\}, \{Dotted, Thick, Blue\}\},

PlotLegends - Placed[\{“RK4″, “Chebyshev”\}, Frame - True].

#### Data Availability

All data generated or analyzed during this study are included within the article (more details can be requested from the corresponding author).

#### Disclosure

This paper was only published as a preprint entitled Approximate Solutions to the Forced Damped Parametric Driven Pendulum Oscillator: Chebyshev Collocation Numerical Solution .

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Authors’ Contributions

All authors contributed equally and approved the final version of the manuscript.

#### Acknowledgments

The authors express their gratitude to Princess Nourah bint Abdulrahman University Researchers Supporting Project number (PNURSP2022R157), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia. Taif University Researchers supporting project number (TURSP-2020/275), Taif University, Taif, Saudi Arabia.