A Hamiltonian theory for an elastic earth: First order analytical integration