  In the first part of the paper we develop a constructive procedure to obtain
the Taylor expansion, in terms of the energy, of the period function for a
non-degenerated center of any planar analytic Hamiltonian system. We apply it
to several examples, including the whirling pendulum and a cubic Hamiltonian
system. The knowledge of this Taylor expansion of the period function for this
system is one of the key points to study the number of zeroes of an Abelian
integral that controls the number of limit cycles bifurcating from the periodic
orbits of a planar Hamiltonian system that is inspired by a physical model on
capillarity. Several other classical tools, like for instance Chebyshev systems
are applied to study this number of zeroes. The approach introduced can also be
applied in other situations.
