A general proof of the energy equipartition theorem is given. Our derivatio
n holds for any distribution function depending on the phase space variable
s only through the Hamiltonian of the system. This approach generalizes the
standard theorem in two main directions. On the one hand, it considers the
contribution to the total mean energy of homogeneous functions having a mo
re general type than the ones usually discussed in the literature. On the o
ther hand, our proof does not rely on the assumption of a Boltzmann-Gibbs e
xponential distribution.