I'm sorry if this topic isn't adequate for the forum.
Does anyone know how can I make this LC circuit simulation for \$v_{c}(t)\$?
The original circuit is the one shown in the figure.
\$v_{C}(t)=\left(-\dfrac{RC\omega A}{1+(RC\omega)^{2}}\right)e^{-\frac{t}{RC}}+\dfrac{A}{\sqrt{1+(RC\omega)^{2}}}\sin({\omega t+\arctan{(RC\omega)}}) \quad , t\leq 0.24\, s\$ \$v_{C}(t)=v_{C}(t=0.24^{-})\cdot\cos{^{2}(0.24\cdot\omega_{0})}+v_{C}(t=0.24^{-})\sin{(\omega_{0}t)}\quad ,t> 0.24\, s\$$$ \begin{align} v_{C}(t)&=\left(-\dfrac{RC\omega A}{1+(RC\omega)^{2}}\right)e^{-\frac{t}{RC}}+\dfrac{A}{\sqrt{1+(RC\omega)^{2}}}\sin({\omega t+\arctan{(RC\omega)}}) ,\quad t\leq 0.24\, s\\[.8em] v_{C}(t)&=v_{C}(t=0.24^{-})\cdot\cos{^{2}(0.24\cdot\omega_{0})}+v_{C}(t=0.24^{-})\sin{(\omega_{0}t)},\quad t> 0.24\, s \end{align} $$
I'm trying to do the LTSpiceLTspice analysis for \$t\geq 0.24\, s\$.
I found \$v_{c}(t=0.24)=-0.143118\, V\$ with the values that were given (R = 120Ω120 Ω, C = 0,1mF.1 mF, L = 1mH1 mH and ω = 120π) which I used as the initial condition along with \$i_{L}(t=0.24)=0\, A\$ as it is shown here:
But I'm not getting the sinusoidal curve and I can't understand why.
Thanks in advance!