# Setting up differential equations for voltage

Tags:
1. Aug 19, 2015

### jerry fan

Let V1 be the voltage across C1 and V2 be the voltage across C2. I want to solve for V1 and V2 as a function of time.

My idea was to use dV1/dt=I1/C1 and dV2/dt=I2/C2. Then using circuit rules i can express I1 and I2 as functions of V1 and V2 and substitute them into the previous diff eqs. Finally i throw the differential equations into mathematica and solve. However, I'm having issues with using circuit rules.

I1 is the current in C1 branch and points to the left
I2 is the current in C2 branch and points to the right
IRL is the current in IRL branch and points to the right

This is what I've come up with so far:
V1 - V2 + I2 * R2 =0
V1 = IRL * RL
I1 = IRL + I2

Are these equations and method of finding V1 and V2 as a function of time right? Thanks

Last edited: Aug 19, 2015
2. Aug 19, 2015

### BvU

Hello Jerry, and welcome to PF !

Do you know how to solve this problem in case C1 is absent ?

3. Aug 19, 2015

### jerry fan

If C1 is absent, then V2=I*(R2+RL). Then dV2/dt=V2/(C2*(R2+RL))is that correct?

4. Aug 19, 2015

### BvU

You wanted to solve for V1 and V2 and wrote down
so can you solve those ?

Now you add V2 = I * (R2+RL) but you don't tell me what I is. I suppose you mean I2 ?

---

Could you also explain a little where V1 - V2 + I2 * C2 = 0 comes from ? Do you see that it can't be right ? The dimensions don't match.

5. Aug 19, 2015

### jerry fan

oh my bad i meant R2. I dindt label I because its could be labeled IRL or I2

6. Aug 19, 2015

### BvU

So by now we are at the following picture, right ?

In that case I wholeheartedly agree with what you wrote in post #1: it's correct.

 correction ! dV1/dt=I1/C1 isn't correct !

You now have five equations with five unknowns. You might remove a few but that's up to you.
Sure you want to "throw it all into mathematica" ?

Yes. Would you need mathematica in that case , or could you solve it on your own ?

 same correction: needs a minus sign

Last edited: Aug 19, 2015
7. Aug 19, 2015

### jerry fan

Yes, that exactly what I had in mind. Thanks for the confirmation. I havn't had to use circuits in a while so im pretty rusty. I can solve by hand but i have to use them later so i decided that might as well get mathematica to solve for me.

8. Aug 19, 2015

### BvU

Check the signs. I edited and re-edited #6.

There are only two degrees of freedom in the problem; I suggest you work it out so far that you only solve two equations with two unknowns ...

9. Aug 19, 2015

### jerry fan

in #6 what is wrong with dV1/dt=I1/C1? i solved the equations by hand and got
I1=((R2 - RL)*V1 + RL*V2) / (R2 RL)
and
I2= (-V1+V2)/R2

At this point I cannot substitute I1 and I2 into the equation dV/dt=I/C?

10. Aug 19, 2015

### BvU

It should be dV1/dt= $\bf -$ I1/C1

11. Aug 19, 2015

### jerry fan

Can you explain why there needs to be a negative sign there?

12. Aug 19, 2015

### BvU

For the capacitor you have Q = CV so I = dQ/dt = C dV/dt : A positive I means the Q increases hence the V increases.

Your definition of I1 lets Q decrease if I1 is positive