  We derive the bifurcation set for a not previously considered
three-parametric Bogdanov-Takens unfolding, showing that it is possible express
its vector field as two different perturbed cubic Hamiltonians. By using
several first-order Melnikov functions, we obtain for the first time analytical
approximations for the bifurcation curves corresponding to homoclinic and
heteroclinic connections, which along with the curves associated to local
bifurcations organize the parametric regions with different structures of
periodic orbits.
  As an application of these results, we study a family of 3D memristor
oscillators, for which the characteristic function of the memristor is a cubic
polynomial. We show that these systems have an infinity number of invariant
manifolds, and by adding one parameter that stratifies the 3D dynamics of the
family, it is shown that the dynamics in each stratum is topologically
equivalent to a representant of the above unfolding. Also, based upon the
bifurcation set obtained, we show the existence of closed surfaces in the 3D
state space which are foliated by periodic orbits. Finally, we clarify some
misconceptions that arise from the numerical simulations of these systems,
emphasizing the important role played by the existence of invariant manifolds.
