# What is the initial condition of the current in the capacitor?

I have a problem solving this circuit using differential equations:

For t>0 we have

$$\frac{V_c}{2}+i=4$$ $$\frac{1}{2\times 2}\int_{t_0}^{t}i({\tau})\,d\tau+i(t)=4$$ $$\frac{di(t)}{dt}+\frac{1}{4}i(t)=0$$ Solving the differential equation gives me $$i(t)=I_0 e^{-0.25t}$$

where $$\I_0=i(0)\$$.

The problem is that $$\I_0\$$ gives me 0. I know if I solve for $$\v_c\$$ then I can get $$\i(t)\$$, deriving, and finally I get

$$I_0=-6\,\mbox{A}$$

How do I know this is true?

Let's say that the circuit was running for a long time before the switch alters its state (from 60V source to 24V source). This means that capacitor was fully charged. But what was its voltage?

In DC circuits, caps are considered open-circuits (and inductors short-circuits) in steady-state. Hence, we have a voltage divider - 60V source, R1 = 6 Ω and R2 = 3 Ω. So

$$\V_{3Ω} = V_C = \frac{3}{3+6}60=20V\$$

We conclude that $$\V_C(0) = 20V\$$

Now, based on the second figure, let's say that the current of 6Ω resistor is entering the node Vc and current of 3Ω resistor is exiting. KCL:

$$\\frac{V_C-24}{6}=\frac{V_C}{3}+I_C\$$

but

$$\I_C=C\frac{dV_C}{dt}\$$

Now we have the D.E. and can solve it to find every voltage and current of the circuit.

Hint: At $$\t=0^+\$$, what's the voltage across the 6 Ω resistor? Therefore how much current is flowing through it?

And what's the voltage across the 3 Ω resistor? Therefore how much current is flowing through it?

Using those results and KCL, you can get the current through the capacitor.

Alternative solution: what is the Thévenin equivalent circuit of the source and two resistors? Given the voltage across the capacitor at $$\t=0^+\$$, what then is the current through the capacitor?