Setting up
A 1 mF capacitor holds 10 V. Switch S is open, so the 25 Ω resistor and the 0.1 H inductor carry nothing. At t = 0 the switch closes and all three parts sit side by side, in parallel. What does the voltage do?
Capacitor voltage cannot jump, so v(0+) = 10 V. Inductor current cannot jump either, so iL(0+) = 0 A. The resistor takes iR = v/R = 10/25 = 0.4 A, and that current comes out of the capacitor: iC = −0.4 A.
The equation
All three branches share one voltage v. Taking each current downward, into the + end, KCL says iR + iL + iC = 0, so v/R + iL + C·dv/dt = 0. At 0+ the voltage falls at dv/dt = −0.4/0.001 = −400 V/s.
Differentiate once and use v = L·diL/dt: d²v/dt² + (1/RC)·dv/dt + v/(LC) = 0. Two numbers set its behaviour: the neper frequency α = 1/(2RC) = 20 s⁻¹ and the resonant frequency ω0 = 1/√(LC) = 100 rad/s.
Try v = A·e^(st): s² + 2αs + ω0² = 0, s = −α ± √(α² − ω0²). Here α = 20 is below ω0 = 100, so the roots are complex: s = −20 ± j97.98. The circuit is underdamped: it will ring.
The response
The capacitor discharges into the coil. By t = 13.98 ms, v has fallen to 0 V and the inductor current has peaked at iL = 0.76 A. Of the 50 mJ that sat in C's electric field, 57% is now in L's magnetic field.
The energy swings back and forth while R burns some on every swing: v(t) = e^(−20t)(10 cos 97.98t − 2.04 sin 97.98t) V, t in seconds. It rings with period Td = 2π/ωd = 64.1 ms, inside an envelope that shrinks as e^(−20t).
In parallel, smaller R means more damping: α = 1/(2RC). At R = 5 Ω, α = ω0 = 100, critically damped: one dip, no ringing. At R = 2 Ω the roots are real, s = −20.9 and −479.1: overdamped, with a slow tail.
At first the capacitor holds w = ½·C·V0² = ½ × 0.001 × 10² = 50 mJ. The coil only borrows it; the resistor turns it into heat: ∫v²/R dt from 0 to ∞ = 50 mJ. Without R, an ideal LC rings forever.
The working
# step 1/9 · circuit capacitor C = 1 mF, charged to V0 = 10 V resistor R = 25 Ω inductor L = 0.1 H, iL = 0 A t < 0: S open, nothing flows. t = 0: S closes. No source is left: this is the natural (source-free) response.
The parts are ideal: the switch closes instantly, the inductor has no winding resistance and the capacitor has no leakage. Every number in the figure is computed from this model; t in the formulas is in seconds, the plots are in milliseconds.