Approximate analytical and numerical solutions to the damped pendulum oscillator: Newton–Raphson and moving boundary methods

In this work, some new approximate solutions to the damped pendulum equation are obtained. In addition, the Newton–Raphson method (NRM), moving boundary method, and fourth-order Runge Kutta forth-order (RK4) are introduced to analyze the problem under study numerically. With respect to the approximate analytic solutions, two schemes are devoted: in the first approach, we can solve our problem with specific values for the initial conditions (zero initial angle) and after that compare our analytic solution with numerical solutions and with some published solutions. Thereafter, some modifications and improvements for the analytic solution will be constructed in order to get high-accurate solutions. With respect to the second scheme, we can solve our problem with arbitrary initial conditions and then make a comparison between the obtained results and the mentioned numerical solutions. Moreover, the distance error for all obtained solutions is estimated with respect to the RK4 solution.


Introduction
Differential equations and nonlinear physical models occupy central roles for applications in all aspects of life [1][2][3][4][5][6][7][8][9][10][11][12][13][14][15]. The development of modern life demands the control in nonlinear physical models in order to construct useful applications for humanity [16][17][18]. Therefore, nonlinear phenomena become important and demand mathematical treatments to obtain the exact solutions, approximate solutions or numerical schemes (if the exact solutions cannot be possibly found) to give a good explanation and description for the physical behaviours and to recognize their properties [1,2,[19][20][21][22][23]. Generally, nonlinear models are expressed in terms of ordinary or partial differential equation [24][25][26][27]. Usually, in nonlinear analysis, the exact solutions are little comparison to approximate solutions or numerical methods. The nonlinear vibrations, oscillations, and waves are here important examples for nonlinear physical models [28][29][30]. The evolution of the oscillator took five centuries from the 16th century the 20th century in order to develop from an idea to an application. It was not really simple, but great efforts were made by some famous scientists like Galileo, Huygens, Hooke, Newton, Leibniz, James Bernoulli, John Bernoulli, Euler, Helmholtz, Strutt, Rayleigh, etc. [31]. The simple pendulum has been investigated experimentally and analytically to be recognized their mechanical characters. For long decades, the simple pendulum has been solved analytically or numerically by numerous methods to find appropriate solutions [1][2][3][4][32][33][34][35]. It is interest for researchers as a fertile ground for new ideas and applications. Generally, the damping terms often make differential equations more complicated in solutions [36]. In the early time, it was studied under the influence of weight in the absence of friction and dissipation forces. Consequently, the equation of an undamped motion of simple pendulum without a friction or a dissipation readsθ where θ ≡ θ(t) gives the angular displacement of the pendulum with respect to the angle between vertical axis and the pendulum, κ = g/l represents the angular frequency in unit of rad (1/s), g = 9.81 m/s 2 donates the acceleration of the gravity, and l gives the length of massless pendulum arm as shown in Figure 1. In this case, the simple pendulum moves with a simple harmonic motion indefinitely without decaying because the only effect on the pendulum motion is the conservative force, so the mechanical energy will remain constant during the movement of the pendulum. But this behaviour does not mimic the actual reality of the pendulum motion due to the presence of several forces that work to impede its motion such as air resistance, friction, viscosity, etc. These forces are called dissipative force which leads to cause a loss of pendulum energy and the mechanical energy does not remain constant and the pendulum amplitude decreases during the motion. Therefore, the dissipative force must be included to the equation of motion. Therefore, we can reformulate the equation of motion for a simple pendulum as follows here, γ = c/(2ml) represents the coefficient of the damping term and it is measured in rad (≡ 1/s), where m is the mass of weight attached to the end of the pendulum arm and c is the linear damping coefficient at the pendulum hinge. In Equation (2), the first term θ ≡ d 2 θ/dt 2 represents the acceleration, the second term 2γ θ ≡ 2γ dθ/dt represents the damping, and the third term κ 2 sin θ represents the gravitation. An aim of this paper focuses on a study of the damped Pendulum oscillator without approximation for nonlinear stiffness term which takes the sine form. Here, the Duffing Oscillator is subjected to initial conditions; a zero displacement and a non-zero velocity. Using Jacobi elliptic function analysis, some new approximate analytical solutions to the problem under consideration are obtained. Moreover, approximate numerical solutions with the high accuracy to the damped Pendulum oscillator using Newton-Raphson method (NRM) and moving boundary method (MBM) are carried out. Moreover, the distance error between the approximate analytical and numerical solutions and the RK4 is estimated.

An approximate analytic solution for particular initial conditions
In this section, the simple pendulum oscillator exposes to the linear damping effect which appears in terms of 2γ θ and the nonlinear stiffness term which takes the sine form as κ 2 sin θ , where θ is a time dependent and the two parameters κ and γ are positive. This problem is subjected to the initial conditions; a zero displacement θ(0) = 0 and non-zero velocity θ (0) =θ 0 = 0. Consequently, the following damped simple pendulum oscillator is expressed according to the previous physical description of the Duffing oscillator as: Now, we are looking for a solution to Equation (3) in the form: where sd( √ ωt, m 0 exp(−ρt)) is Jacobi elliptic function and A, B, λ, ω, m 0 , and ρ are real constants, to be determined later. If the first initial condition: θ(0) = 0 is applied to Equation (4), then we can prove that A = 0, B = 0, and sd(0, m 0 ) = 0. Also, by applying the second initial condition: θ (0) =θ 0 to Equation (4), the constant A is expressed as: In order to determine the values of the others constants B, λ,ω, m 0 , and ρ to satisfy Equations (3) and (4) in a reasonable way, let us assume that which is subjected the initial conditions R(0) = 0, gives derivatives of R(t) from first to fourth. These conditions are used to determine the constants B, λ, ω, m 0 , and ρ. The first condition R(0) = 0, is directly applied to Equations (4) and 6), and consequently, the constant λ is determined in term of damping parameter as follows: By applying condition R (1) (0) = 0, to Equations (4) and (6) with the help of Equation (7), the value of parameter ω in terms of κ, γ , B, and m 0 is determined as The condition R (2) (0) = 0, is applied to Equations (4) and (6) to find the value of m 0 with the help of Equation (8) as: Two parameters B and ρ can be determined by applying the following two conditions R (3) (0) = 0 and R (4) (0) = 0 to Equations (4) and (6) with the help of Equation (9). Accordingly, we can get the value of ρ by solving the following polynomial where . For sake of simplicity, one of the real root to Equation (10) gives the following value of the parameter ρ as and the value of B is described by Now, all values of the mentioned parameters are expressed in terms of κ, γ andθ 0 as follows Thus, an (approximate or exact) analytic solution of Equation (3) is given by: with κ 2 = γ 2 .
In this case, the Pendulum can oscillate forever without interruption or decay. We can deduce that our results are consistent with the theory for the undamped Pendulum motion. [34] gives an approximate analytical solution to the problem

Remark 2.1: Recently, Johannesen
in the following form with and where m 0 = sin 2 (ψ max /2). Now, let us make a comparison between the approximate analytic solutions (14) and (18) as well as the approximate numerical solution using Runge Kutta fourth-order method (RK4) in order to measure the accuracy of the solutions (14) and (18). This comparison is introduced in Figure 2(a). It is observed that the solution (18) is more accurate than the solution (14). However, the solution (14) can be modified by introducing the following new approximation Note that in this modification/improvement, we replaced θ(t) in solution (14) by θ(ξ(t)), i.e. t → ξ(t). These results are confirmed in Figure 2(b) which the three approximate analytic solutions (18), (21), and RK4 are compared to each other. Moreover, the distance error for the obtained solution with respect to RK4 solution is estimated. It is found that the new approximate analytic solution (21) is better than both solutions (14) and (18). However, in Johannesen paper [34], the damped motion of simple Pendulum for zero initial angle, i.e. θ(0) = 0 is studied, but in the following section, we shall investigate the damped motion of the pendulum for arbitrary initial conditions.

Approximate analytic solutions for arbitrary initial conditions
Let us rewrite Equation (3) with arbitrary initial conditions where κ = γ . Here, we can recover and discuss some different cases. The first one, if θ 0 = 0, the solution (14) satisfies the problem (22). The second case whenθ 0 = 0 and θ(0) = θ 0 , we get The third case, if we considered θ 0θ0 = 0, in this case, we define an approximate analytical solution to the problem (22) as follows with In this case, when κ = γ , we may use the last expression taking the limit as κ → γ . This same expression may also be used in the case when θ 0 = 0 orθ 0 = 0. Note that for θ 0 =θ 0 = 0, the trivial solution θ(t) ≡ 0 is obtained. In the next section, we shall solve the problem (22) numerically using two approaches namely, NRM and moving boundary method (MBM) and after that comparing the obtained approximate analytic and numerical solutions (24).

Newton-Raphson method
First, for applying NRM to the problem (22), let us consider where θ(t) is defined in Equation (14).
The values of C andθ 0 can be obtained from the following system This system could be solved with the aid of the NRM.

Moving boundary method
Sometimes, the approximate analytic solution maybe not good for large time intervals. In that case, we may apply the MBM to improve the accuracy of our mentioned problem. We proceed by dividing the time interval into smaller intervals of length h = T/N; say 0 = t 0 < t 1 < t 2 < · · · < t j < · · · < t N = T, where t j = jh (j = 0, 1, . . . , N). Let θ 0 (t) to be the analytical approximation in the interval 0 ≤ t ≤ t 1 . Also, it is assumed that θ 1 (t) to be the analytical approximation in the interval t 1 ≤ t ≤ t 2 , with the following initial conditions Moreover, suppose we already defined θ k (t) (t k ≤ t ≤ t k+1 ) for k = 0, 1, 2, . . . , j − 1. Consequently, we can define θ j (t) on t j ≤ t ≤ t j+1 as the analytical approximation with initial conditions This allows us to define an analytical approximate solution θ(t) on the whole interval 0 ≤ t ≤ T as follows where Figure 3 shows the comparison between the numerical approximations (RK4, NRM and MBM) and analytical approximation (24). It is clear from Figure 3(a) that the approximation (24) gives excellent results as compared to the numerical solutions. In Figure 3(b,c), the comparison between the RK4 and MBM solutions is considered.
One can see, the near-perfect match between the two numerical solutions, which strengthens the MBM.

Conclusion
The damped pendulum differential equation of motion has been solved analytically and numerically. The analytical approximation is introduced in the form of the Jacobean elliptic functions for two cases. In the first case, the problem is solved for certain initial conditions (the initial angle is taken to be zero and non-zero initial speed). In this case, our analytic solution is compared with Johannesen's solution [34]. It is observed that our solution is less accurate than the Johannesen's solution [34]. However, we improved our solution and a new solution with accuracy higher than Johannesen's solution [34] has been obtained. Also, the problem was solved under the same initial conditions numerically using NRM and moving boundary method. The comparison between the analytical and numerical approximations has been carried out. In addition, the distance error for each method with respect to the fourth-order Runge Kutta method has been estimated. It has been noticed that our solution gives good results. With respect to the second case, we solved the pendulum equation of motion with arbitrary initial conditions and got a general solution in the form Jacobean elliptic functions and this solution could be recovered many cases. For example, the general solution could be reduced to the solution of the first case if we use the same initial conditions of the first case. Moreover, the general solution was compared with the numerical solutions. the MBM allows us to obtain an analytical solution as linear combination of characteristics functions of the intervals that correspond to the time interval partition. This method is applicable once we obtained an analytical approximated solution for a given arbitrary conditions. It may be employed to solve other nonlinear problems such as the damped and forced cubic Duffing equation as well as the cubic-quintic damped and forced Duffing equation.

Disclosure statement
No potential conflict of interest was reported by the author(s).