The Existence of Homoclinic Orbits and the Method of Melnikov for Systems in $R^n$

We consider a periodically forced dynamical system possessing a small parameter, in arbitrary dimension. When the parameter is zero the system is autonomous with an explicitly known homoclinic orbit; we develop a criterion for this homoclinic orbit to persist for small, nonzero values of the parameter. The theory is applied to an example arising from a magnetized spherical pendulum.The theory is a generalization to arbitrary dimension of the method of Melnikov. The example is a generalization to $R^4$ of a system in $R^n$ considered by Holmes.