A capacitor of capacitance C is given a charge Q. At t = 0, it is connected to an ideal battery of emf ε through a resistance R. Find the charge on the capacitor at time t.
The capacitor is given a charge Q. It will discharge and the capacitor will be charged up when connected with battery Net charge at time.
t=Q e−tRC+q{1−e−tRC}
t=Q e−tRC+Cϵ{1−e−tRC}