## 4 Numerical Examples
### Nonlinear Single Pendulum  
In order to verify the effectiveness of the proposed algorithm in nonlinear cases, an oscillating nonlinear single pendulum [36] described in Figure 8 is considered in this subsection. \begin{table}
\begin{tabular}{c c} \hline \hline
**Method\(\backslash\)\(\Delta t\)** & **0.2 s** \\ \hline Bathe method & 0.015 s \\ Proposed method & 0.015 s \\ GGW method & 0.016 s \\ [PERSON] method & 0.020 s \\ Trapezoidal rule & 0.018 s \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Computational time of different methods for Problem 4.1. Figure 8: The oscillating nonlinear single pendulum. Figure 7: Acceleration responses with the Wilson method, Bathe method, GGW method, trapezoidal rule, and the proposed method from 40 to 50 s.  
The governing equation is  
\[\ddot{\theta}+\omega^{2}\sin(\theta)=0;\theta(0)=\theta_{0},\dot{\theta}(0)=\dot{ \theta}_{0} \tag{33}\]  
where \(\omega=\sqrt{g/L}\), \(\theta(t)\) is the angle between the rod and the vertical plane at time \(t\), \(L\) is the length of the rod regardless of mass, and \(g\) is the acceleration of gravity, assuming a dimensionless case of \(L=g=1\) so that \(\omega=1\). Large motion causes the nonlinearity, the degree of which can be adjusted by changing the initial conditions. In this case, the energy \(E_{total}\) is conserved, which can be written as [37; 38]  
\[\frac{1}{2}\left(\frac{\mathrm{d}\theta}{\mathrm{d}t}\right)^{2}-\omega^{2} \cos(\theta)=E_{total} \tag{34}\]  
Considering the initial conditions \(\theta_{0}\) and \(\dot{\theta}_{0}\), the equation can be expressed as:  
\[t=\pm\int\limits_{\theta_{0}}^{\theta}\frac{1}{\sqrt{\dot{\theta}_{0}^{2}+2 \omega^{2}(\cos(\theta)-\cos(\theta_{0}))}}\mathrm{d}\theta \tag{35}\]  
Letting \(\theta_{0}=0\), the relationship of Equation (35) can be rewritten as:  
\[t=\pm\frac{1}{\left|\theta_{0}\right|}\int\limits_{0}^{\theta}\frac{1}{\sqrt{ 1-\kappa^{2}\sin^{2}\left(\frac{\theta}{2}\right)}}\mathrm{d}\theta\ =\frac{2}{\left|\dot{\theta}_{0}\right|}\mathrm{Ei}\left(\sin\left(\frac{ \theta}{2}\right),\kappa\right) \tag{36}\]  
where \(\kappa=2\omega/\dot{\theta}_{0}\) and \(\mathrm{Ei}\) (\(zk\)) is the elliptic integral of the first kind. With the change in \(\kappa\), the pendulum has two movement modes: if \(\kappa<1\), the pendulum will rotate around the center and the angle of rotation will keep increasing; if \(\kappa\geq 1\), the pendulum will oscillate around the center of rotation and the angle will be limited into a certain range and form a periodic change. The maximum angle becomes:  
\[\theta_{\mathrm{max}}=2\sin^{-1}\left(\frac{\dot{\theta}_{0}}{2\omega}\right) \tag{37}\]  
Here we consider a highly nonlinear case; that is, when the speed of rotation is zero, the maximum oscillating angle reaches \(179.9^{\circ}\). According to the proposed equation, the initial condition is set to be \(\dot{\theta}_{0}=1.99999238456499\) such that the movement mode of the pendulum is close to the critical state. This case can be used to verify the validity of the algorithm. For the proposed method, the parameters are \(c_{1}=c_{3}=1/4\), \(\alpha=0\), \(\beta=0.5\) and for the GGW method, the parameter is \(\alpha=0\). The corresponding results are shown in Figure 9 with \(\Delta t/T=10^{-4}\). It can be seen that the trapezoid rule, Wilson method, and Bathe method all give a result that the pendulum tends to rotate around the center, which indeed does not reflect the actual movement. Instead, the proposed method and GGW method generate numerical solutions which are very close to the exact solution. It can be also found that when the time step is \(\Delta t=T/50000\), as shown in Figure 10, the solution of the proposed method possesses high accuracy compared with the exact solution. The computational time of these methods are listed in Table 2. We can find that the computational time of the proposed method, the GGW method, and the Bathe method are close to each other, which is a little longer than that of Wilson method, since these three methods are two-step ones.