On the analytic expression of the free energy in linear viscoelasticity