Question: A capacitor of capacitance $C$ is given a charge $Q$. At $t=0$, it is connected to an ideal battery of emf $\epsilon$ through a resistance $R$. Find the charge on the capacitor at time $t$
Answer: I found it to be $$C\epsilon (1-e^{-t/RC})+Qe^{-t/RC}$$
and it is correct. I want to discuss some interesting inferences I obtained from the above expression, sir.
The first term represents the charge on a capacitor when it's charging and the second term represents the charge when it's discharging. In this question, we're adding both charging and discharging terms when there's already some charge on a capacitor to be charged completely.
From some question and answers on Physics and Electrical Engineering StackExchange, I learnt that a capacitor cannot be charged and discharged at the same time. But here it seems, both charging and discharging can take place in much the same way forward and backward reactions proceed in a chemical dynamic equilibrium.
Can a glass of water be filled when you are drinking out of it and pouring more water into the glass simultaneously? — Harry SvenssonMay 23 '18 at 23:11
@JohnRennie Yes sir. We're shifting the time scale towards right. That's how I derived the above formula.
But it seems, it's safe to assume given two independent capacitors, one charged with $Q$ amount of charge and the other one completely discharged to discharge and charge simultaneously. And adding both or in other words superimposing the both cases, it seems the net result comes out to be the same.
I don't know whether I made the point clear. But I'm sure this is something similar to dynamic chemical equilibrium where both forward and reverse reactions take place.