Thermodynamics of mixing polymers