# Electrical – Calculating Differential equation RLC Circuit

electricalpassive-networkspower electronics Hi,
I tried to find the voltage on the capacitor as a function of time, Vc(t).
In the initial condition (t<0) the switch was closed and the current source was open circuit, so I found the initial conditions for the capacitor and the inductor ( VC(0)=65v, and IL(0)=1A).
At t=0, the switch will open and the current source connect to circuit like the picture here.
I'd tried to write the differential equation of the circuit and got something weird: I know that the equation of RLC circuit 2d must be positive, otherwise, I will get one of the roots positive which is impossible.
Please, I need your help, what is important to me is to proof the equation so I can show the lecturer that he was wrong, but I'm not sure if what I did was right.
Here is the solution of the lecturer:
(A1 and A2 easy to find) the decition of current in the inductor is true: Since everyone seems to have been variously confused at different times about your question, let me re-draw and re-phrase it: simulate this circuit – Schematic created using CircuitLab

(The above reflects the case after the switch opens and after the current source has been added, both at $$\t=0\$$.)

On the left is your new circuit (without initial conditions showing, as I think it is unnecessary in order to answer your question.) On the right is the same circuit through a simple, obvious Thevenin transformation about which I'm sure you agree. I prefer the right side because it makes it a little easier to answer your question about the lecturer's answer.

Let's use KCL for the node marked as $$\V_t\$$:

$$C\,\:\frac{\text{d}\,V_{\left(t\right)}}{\text{d}t}+\frac1{L}\int V_{\left(t\right)} \:\text{d}t=\frac1{L}\int V_{s\left(t\right)} \:\text{d}t$$

(I've placed out-flowing currents on the left and in-flowing currents on the right.)

Some development results in:

\begin{align*} \frac{\text{d}\,V_{\left(t\right)}}{\text{d}t}+\frac1{L\,C}\int V_{\left(t\right)} \:\text{d}t&=\frac1{L\,C}\int V_{s\left(t\right)} \:\text{d}t\\\\ \frac{\text{d}^2\,V_{\left(t\right)}}{\text{d}t^2}+\frac{V_{\left(t\right)}}{L\,C}&=\frac{V_{s\left(t\right)}}{L\,C}\\\\ \end{align*}

But we also know that the current, $$\I_{\left(t\right)}\$$, is everywhere the same throughout the right-hand circuit. So it follows that:

$$V_{s\left(t\right)}=39\:\text{V}-R\,I_{\left(t\right)} = 39\:\text{V}-R\,C\,\:\frac{\text{d}\,V_{\left(t\right)}}{\text{d}t}$$

Substituting in:

\begin{align*} \frac{\text{d}^2\,V_{\left(t\right)}}{\text{d}t^2}+\frac{V_{\left(t\right)}}{L\,C}&=\frac{1}{L\,C}\left(39\:\text{V}-R\,C\,\:\frac{\text{d}\,V_{\left(t\right)}}{\text{d}t}\right)\\\\ \frac{\text{d}^2\,V_{\left(t\right)}}{\text{d}t^2}+\frac{R}{L}\:\frac{\text{d}\,V_{\left(t\right)}}{\text{d}t}+\frac{V_{\left(t\right)}}{L\,C}&=\frac{39\:\text{V}}{L\,C} \end{align*}

Which is just a 2nd order diff-eq I'm sure you can solve.

But just looking at the characteristic equation, ($$\s^2+650\,s+1\times 10^5=0\$$), you would easily find $$\s=-400\$$ and $$\s=-250\$$. Which is a huge clue for setting up the general solution.

The lecturer's general solution is correct.