Polynomial and rational approximation for electronic structure calculations