Post History
Your derivation is correct, you just missed the sign: $V_L=-V_C=2;\mathrm{V}$, because the capacitor charges with +2 V, and the discharge accounts for the negative sign on the inductor. The notatio...
Answer
#1: Initial revision
Your derivation is correct, you just missed the sign: \$V_L=-V_C=2\;\mathrm{V}\$, because the capacitor charges with +2 V, and the discharge accounts for the negative sign on the inductor. The notation of \$V_L=-V_C\$ may be confusing, so think of it as \$V_C=-V_L\$, maybe it makes more sense. Verifying your results is never a bad idea, so here it is: ![test](https://electrical.codidact.com/uploads/Fuv876RadeJaqzLpGGWFX6Us) `I(R2)` is plotted in blue while in black it's the test voltage, modelled as a function with the same format as your result, except for taking care of the delays (the `uramp()` part, such that it's zero until the event).