## 4 Melnikov Analysis  
Here, we continue the study of our physical systems by applying Melnikov analysis in order to find the threshold parameter values for which the systems possess homoclinic chaos. The first step to begin with Melnikov analysis is to assume that damping parameter \(\alpha\) and excitation amplitudes \(f\) (in the periodically driven pendulum with a torque) and \(\gamma\) (in the vertically excited parametric pendulum with a torque) are fairly small, and a first-order perturbation could be used. By introducing a small parameter \(\epsilon\), we produce the substitutions \(\alpha=e\hat{\alpha}\) and \(\gamma=e\hat{\gamma}\), and we can rewrite the equations of motion (Equations (2) and (4)) as the two differential equations that we can find in Table 1, in which \(v_{\phi}\) is the angular velocity. The corresponding Hamiltonian of the unperturbed system (\(\epsilon=0\)) is  
\[H_{0}(\phi)=\frac{v_{\phi}^{2}}{2}+V(\phi), \tag{12}\]  
where \(V(\phi)=1-\cos\phi+\
u\phi\) is the unperturbed potential plotted in Figure 4. For \(\
u=0\), \(V(\phi)\) corresponds to the potential of the pendulum. In that case, we can find the heteroclinic orbit connecting the saddle fixed points \(\phi=\pm\pi\) as shown in Figure 7. In order to evaluate the variation in the period, we obtain the reciprocal of Equation (12) and write \(v_{\phi}=\sqrt{2V(\phi)}\) in the function of the unperturbed potential. Thus, the equation reads  
\[\frac{\mathrm{d}\tau}{\mathrm{d}\phi}=\frac{1}{v_{\phi}}=\frac{1}{\sqrt{2V( \phi)}} \tag{13}\]  
and its integral is  
\[\tau-\tau_{0}=\int\frac{\mathrm{d}\phi}{\sqrt{2-2\cos\phi}}\enspace, \tag{14}\]  
where \(\tau_{0}\) absorbs the integration constant. \begin{table}
\begin{tabular}{l l} \hline \hline
**Periodically Driven Pendulum with a Torque** & **Vertically Excited Parametric Pendulum with a Torque** \\ \hline \(\phi=v_{\phi}\) & \(\phi=v_{\phi}\) \\ \(\hat{v}_{\phi}=-c\alpha\phi-\sin\phi+\
u+cf\sin\omega\tau\) & \(\hat{v}_{\phi}=-c\alpha\phi-(1+c\gamma\omega^{2}\sin\omega\tau)\sin\phi+\
u\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The equations of the two pendulum models rewritten after the introduction of small parameter \(\epsilon\). The tilde is neglected in further notation. Figure 7: Schematic plots of the stable \(W_{s}\) and unstable \(W_{u}\) manifolds as perturbed heteroclinic (for \(\
u=0\), Figure 4, red curve (**a**)) and homoclinic orbits (for \(\
u>0\) Figure 4, blue curve (**b**)). The points in phase space \(p1\), \(p2\), and \(p\) denote the corresponding saddle fixed points. Dashed lines correspond to unperturbed cases. \(d\) defines the shortest distances the stable and unstable manifolds. \(d=0\) implies their cross-section and mixing of solutions. It is possible to integrate the above expression, and after some algebra, we obtain the heteroclinic orbits  
\[\phi^{*} =\pm 2\arctan(\sinh\tau)\] \[v^{*}_{\phi} =\pm\frac{2}{\cosh(\tau-\tau_{0})}. \tag{15}\]  
In Figure 8, we integrate numerically the equation  
\[\tau-\tau_{0}=\int\frac{\mathrm{d}\phi}{\sqrt{2-2\cos\phi+2\
u\phi}}. \tag{16}\]  
This expression corresponds to the case of the asymmetric potential with a nonzero torque, \(\
u\
eq 0\). After adding perturbations, there is a split of the stable and the unstable manifolds, denoted by \(W_{S}\) and \(W_{U}\), so that they might intersect themselves creating a homoclinic point and generating the appearance of [PERSON]'s horseshoe chaos. The distance \(d(\tau)\) between the stable and unstable manifolds of the perturbed system is calculated along a direction that is perpendicular to the unperturbed homoclinic orbit. Then, the critical value for which the transition from periodic motions to chaos appears is found by setting the distance \(d(\tau)\) to zero.