A mathematical study of the electron decay in diffusion and recombination controlled afterglows