Analytic description of neutron star cooling