The computation of second order energies using a reference spectrum euler function