Determination of the residual charge after current extinction-an integral approach