Resumen

The key point of our approach is to write the invariant manifolds in terms of generating functions, which are solutions of the Hamilton-Jacobi equation. In some examples,
we show that it is enough to analyse the phase portrait of the Riccati equation without solving it explicitly. Finally, we consider an analogous problem in a perturbative situation. If the invariant manifolds of the unperturbed loop coincide, we have a problem of splitting of separatrices. In this case, the Riccati equation is replaced by a Mel0nikov potential defined as an integral, providing a condition for the existence of a perturbed loop and its transversality. This is also illustrated with a concrete example.