Free energy of electrets