On the energy of an elastic rod