Variational calculation of energy spectra of rotational nuclei at high spins