# Current expression after closing the switch

In the picture below the switch $$\S_1\$$ is open for a long time, and I need to find the expression of $$\i(t)\$$ for $$\t>0\$$ (when $$\S_1\$$ closes):

Since this is an RLC circuit, I need to solve a second order ODE. I found $$\i(0)=4\mathrm{ A}\$$ and $$\frac{di(0)}{dt}=28\mathrm{ A/s}$$ as initial conditions to be able to solve that ODE (if someone could double check those values, that would be great).

After $$\S_1\$$ is closed, the $$\30\Omega\$$ resistor is short-circuited and the $$\10\Omega\$$ and $$\20\Omega\$$ resistors are in parallel, so we get the following circuit:

I have tried using both Kirchhoff's laws but couldn't find that ODE. Any ideas how can I proceed here?

Attempt using KCL:

NODE A:

$$6=i_c+i_2$$

$$6=0.15\frac{dv_c}{dt}+\frac{v_c-0}{6.667} \tag{1}$$

NODE 0:

$$i_2=i+i_3$$

$$\frac{v_c-0}{6.667}\ = i + \frac{0-v_L}{15}\tag{2}$$

Replacing (2) in (1):

$$6=0.15\frac{dv_c}{dt}+i - \frac{v_L}{15}$$

$$6=0.15\frac{dv_c}{dt}+i -\frac{1}{15}\frac{di_3}{dt}$$

$$6=0.15\frac{dv_c}{dt}+i -\frac{1}{15}\frac{d(i_2-i)}{dt}$$

$$6=0.15\frac{dv_c}{dt}+i +\frac{1}{15}\frac{di}{dt}-\frac{1}{15}\frac{di_2}{dt}$$

$$6=0.15\frac{dv_c}{dt}+i +\frac{1}{15}\frac{di}{dt}-\frac{1}{15}\frac{d(6-i_c)}{dt}$$

$$6=0.15\frac{dv_c}{dt}+i +\frac{1}{15}\frac{di}{dt}+\frac{1}{15}\frac{di_c}{dt}$$

This is as far as I could go trying to get that second order ODE for $$\i(t)\$$.

• @Antonio51 I first tried finding the ODE using KCL, but didn't succeed. Then i tried KVL, but could't make it either. Sep 7 at 11:50
• Check this. When switch is closed, R-L alone at the left, R-C-I alone at the right ... Two First Order equations. Sep 7 at 12:01
• Show us your work. There is no point in asking someone to redo everything that you have done. Sep 7 at 12:35
• @ElliotAlderson The work is there. I have found all the initial and final conditions of my desired variable i(t). I have found the equivalent circuit after the switch have been closed. But i still can't find a second order ODE for i(t), like i have read in books we should find to solve a RLC circuit, or two first order ODE like Antonio sugested (never heard we could do that, but i tried anyway). I have added a new picture showing my attempt using KCL in the top nodes. Sep 7 at 13:09
• Have you the initial condition before closing the switch? When you close the switch, it is obvious that the first loop (L-R) is alone with a "initial" inductor current. So, after closing the switch, current in the self is an exponentially decreasing function starting at 2 A -> you have the first part of your i(t) current ... Sep 7 at 14:06

Check first this, switch open. Dynamic DC analysis. Microcap v12.
This will give you the "initial" condition of the inductor current and voltage capacitor ... for the two "independent" loops ... after closing the switch.

After closing the switch, "i(t)" is composed of two parts: current1 from the left, current2 from the right, from independent loops.

Since this is an RLC circuit, I need to solve a second order ODE.

Are you sure?

Perhaps two first-order independent equations, then one add the solutions?

Check the variables you need.

• I finally solved it! The two first order ODE helped a lot, until yesterday, i didn't knew we could do that to solve a RLC circuit. One more question, wich software did you use to simulate that circuit? It's a free software? or commercial one? Sep 8 at 12:31
• FULL FREE software with many examples. Check the link in answer. Sep 8 at 12:34
• I tried click the link, but nothing happened. I will Google it, Sepctrum Software Microcap? Sep 8 at 12:46
• Spectrum Software - Micro-Cap 12. Analog simulation, mixed ...spectrum-soft.com go to Download ... microcap v12 full CD Sep 8 at 12:56