(i) switch S is just closed and (ii) switch S is closed for a long time