# What is the voltage across the capacitor 3ms after the switch is closed

I have this circuit:

This circuit is working for a long time like this, with the switch open. So, the circuit is stabilized and the voltage across the capacitor is 40V.

At t=0, the switch is closed.

What is the voltage across the capacitor 3ms after the switch is closed.

MY SOLUTION

After the switch is closed, the capacitor will change its voltage to match the one imposed by the voltage divider composed of R1 and R4.

At the left side of R1 there is 40V and at the right side of R4 there is 30V.

If we remove the capacitor, we can calculate the current in the circuit to be

$$\V = RI\$$

$$\(40-30) = (100 + 22)I\$$

$$\I = 81.96mA\$$

So, the voltage drop across R1 is equal to

$$\V_{R1} = 100 x 81.96mA = 8.1967V\$$

So the voltage between the resistors is

$$\V_{div} = 40 - 8.1967 = 31.80V\$$

This will be the voltage across the capacitor after stabilization.

So far, so good. This matches the value I get from the simulator I am using.

Now I want to know the voltage across the capacitor 3ms after it starts discharging.

If I substitute both voltage sources with wires, I see that the capacitor is in parallel with R1 and R4, what gives me an equivalent resistance of 18.0327.

Now I use

$$\V_c(t) = V_s e^{-\frac{t}{RC}}\$$

$$\V_c(3ms) = 40 e^{-\frac{3e-3}{18.0327 x (1000 e-6)}}\$$

$$\V_c(3ms) = 33.8695V\$$

The problem is that when I simulate that using software simulators I get the voltage across the capacitor after 3ms to be 38.7438V.

What is wrong?

## 2 Answers

The switch is closed at $$\\small t=0\$$, and the capacitor voltage for $$\\small t \ge 0\$$ is: $$\\small v_c(t)=40-\frac{1}{C}\int i\: dt\$$, where $$\\small i\$$ is the capacitor discharge current.

Now use KCL at the node pointed to by the blue arrow to form the required differential equation, and solve (using the integrating factor method, for example). The initial capacitor current is $$\\small i(0)=\frac{10}{22} \:A\$$

• BRILLIANT. Problem solved. THANKS!!!!!!!!
– Duck
Aug 1, 2019 at 10:49

You should do a sanity check with your equation. If t=0 then Vc = 40, so far so good, but when t tends to infinity, then Vc = 0, not the correct number of about 31.8V.

It's like there is an offset of (22||100)* (40/100 + 30/22) = 31.8033V

So the capacitor discharges from 40V to 31.8033V with a time constant as you correctly calculated.

Can you write the equation for that exponential discharge?

• very good. THANKS!!!!!!!!!
– Duck
Aug 1, 2019 at 10:49