
Brandon B. answered 03/08/21
Cornell Physics PhD. 10+ years teaching college math/physics.
With the switch closed, after time t, the charge on the capacitor is q and the current through the resistor is -dq/dt. Applying Kirchoff's loop rule to this circuit gives q/C - IR = q/C + dq/dt R = 0 ⇒ -∫dt/(RC) = ∫dq/q ⇒ ln(q/Q0) = -t/(RC) ⇒ q = Q0e-t/(RC) ⇒ V = V0e-t/(RC).