# Simple RC Circuit question: how does a precharged capacitor interact with a lower voltage source?

So, I have this simple question to solve, but I am uncertain about some details. The circuit I have to solve is the one on the image below:

I have a circuit with one capacitor(C = 1/4 Farad), two switches(s1, s2), two resistors(R1 = 4ohm, R2 = 2ohm) and a voltage source(V1 = 10V).

The question asks me to calculate Vc(t) (the capacitor's tension over time). Right before t=0, both switches are opened, and the capacitor's tension is 20V. At t=0, both switches close, and stay closed until t=0.9s . At that moment, s2 opens. The question then asks me to calculate Vc over time, from 0 to 0.9, and then from 0.9 to infinity(until discharged, I think).

What got me confused is that Vc(0)=20V. That means the capacitor was pre-charged by a 20V voltage source, getting a charge of 5 coulombs(q=c*v). But then, it is connected to a circuit with a voltage source that has a voltage lower than of its own (V of the V1 = 10v).

I imagine that, because of this, the capacitor will discharge. Thing is, does the presence of the voltage source interferes with the discharging of the capacitor? Does it at all? Should I use the Vc = Vo * e^(-t/RC)) equation?

Thanks so much in advance, and I am sorry if I was long-winded.

• Current will flow from the higher voltage source to the lower voltage source, regardless of what types of sources they are. But you can select the current direction arbitrarily - the analysis will tell you the correct direction of flow: +ve, you've assumed correctly; -ve the direction is the reverse of that assumed. – Chu Jul 1 at 23:36

For circuit 1: it will discharge until $$\ V_C = V_{BAT} \$$
$$V_C = (V_{C0} - V_{BAT}) \times exp \left( \frac{-t}{R1*C} \right) + V_{BAT}$$
For circuit 2: it will discharge to zero but $$\ V_{C1} \$$ depends on the previous equation
$$V_C = V_{C1} \times exp \left( \frac{-t}{(R1+R2)*C} \right)$$