An equation for the heat capacity of solids