Here I am trying to solve the circuit and from my calculation, I got, I(t)=3e^(-2t) - 3e^(-3t) and Vc(t)=12-18e^(-2t)+12e^(-3t) When Initial conditions are; I(0-)=0A and Vc(0-)=6V From my assumption, current will flow through the circuit until the voltage across the capacitor is 12V so V(∞)=12V and I(∞)=0A. but when I simulate the circuit in MATLAB, I got something different...

1st graph is for current and second graph is for voltage across capacitor. Here both current and voltage are zero in steady state. How is it possible that steady state voltage across capacitor is zero? Also the current graph is inverse of what I theoretically calculated. Where am I wrong? Please help me out.

• Why is graph #1 oscillating, but graph #2 is not? Feb 23, 2021 at 18:56
• Your simulation is definitely wrong. Feb 23, 2021 at 18:56
• So are my mathematical assumption right? The steady state voltage across capacitor would be 12V? Feb 23, 2021 at 19:07

Your 1st graph has something like pixel aliasing ripple but correct 0.444 A peak

Your 2nd has the probe location for 12V-Vc =0 steadystate so not Vc.

My sim

• But why the 1st current graph is inverse of what I calculated? Feb 23, 2021 at 19:41
• I can't see what you did, but it just seems to be a reverse component orientation or 0V reference is somehow the reason. If I swap the my sim's inductor orientation, I can get a similar result. But clearly you expect by schematic convention it to be positive. Feb 23, 2021 at 20:14