For a normal RC circuit with one resistor and one capacitor, let say at $t=0$ the switch closes and complete the circuit. All components are connected. voltage source (VA), $R$ and $C$.
If C was initially charged to let say a voltage value of -VC(initially) before the switch even closed to complete the circuit and now when $t=0$ the source is trying to charge the capacitor as VA > -VC(initially)
Wouldn't the capacitor have to discharge to zero voltage first before it can be charged up to the source voltage?
How does the discharge of the capacitor and the charging work at the same time? I can't visualize the concept of how that work. Where does the energy go?
To my understand,
E - IR - V(c) =0
E- (dq/dt)R - q/c =0 Solving the DE equation: Vc(t) = Vf (1-e^-1/RC); where vf is when the capacitor has been charged for long time and it is now act as an open circuit. No current flow, which mean the resistor voltage is zero and the sum of the voltage drop across the circuit is now just E = Vf (final voltage across the capacitor equal to the source).
I(t) = Io*e^(-t/RC);
the Io (I initial) is when t=0 the switch just closed. The charge across the capacitor is still zero as it can't change instantaneously. therefore, the initial current Io is just the Io=E/R. However this is not what we have in this case.