Two ways to store energy, one loop connecting them
Wire a charged capacitor directly across an inductor and something remarkable happens: nothing sits still. The capacitor starts to discharge through the inductor, and as current flows, the inductor's magnetic field builds up and stores the energy the capacitor is giving up. Once the capacitor is fully discharged, the current does not simply stop — the collapsing magnetic field in the inductor keeps pushing current in the same direction, which recharges the capacitor with the opposite polarity. The whole process then runs in reverse. Energy sloshes back and forth between the capacitor's electric field and the inductor's magnetic field, over and over, with a single natural frequency set entirely by the two component values.
In a perfectly ideal circuit with zero resistance, this oscillation would continue forever, because there is no mechanism anywhere in the loop to convert the electrical energy into heat and lose it. That idealised, lossless LC tank is the starting point for essentially every oscillator, filter and tuned circuit in electronics.
From Kirchhoff's law to a spring equation
Writing Kirchhoff's voltage law around the loop — the inductor's voltage plus the capacitor's voltage must sum to zero — and expressing both in terms of the charge q on the capacitor produces a second-order differential equation that is, term for term, identical to a frictionless mass on a spring:
V_L + V_C = 0 L * d^2q/dt^2 + q/C = 0 (electrical: L <-> mass, 1/C <-> spring constant) compare to a mass on a spring: m * d^2x/dt^2 + k*x = 0 both give simple harmonic motion at: omega_0 = 1 / sqrt(L*C) f_0 = 1 / (2*pi*sqrt(L*C))
Charge (or, equivalently, voltage across the capacitor) plays the role of position, current plays the role of velocity, and the energy stored in the capacitor's electric field (q²/2C) plays the role of potential energy while the energy stored in the inductor's magnetic field (½LI²) plays the role of kinetic energy. At the instant the capacitor is fully charged, current is momentarily zero — exactly like a pendulum at the top of its swing — and at the instant the capacitor voltage crosses zero, current is at its peak — exactly like a pendulum passing through the bottom of its arc at maximum speed.
Real circuits have resistance, so they need feedback
Every real inductor has some winding resistance and every real capacitor has some leakage, so a real LC tank's oscillation decays exponentially, its amplitude shrinking a little more each cycle as energy bleeds away as heat — exactly like a real pendulum eventually settling to rest through air resistance and friction at the pivot. To build a self-sustaining oscillator, practical circuits add an active element — a transistor or an op-amp — that senses the tank's own oscillation, amplifies a small sample of it, and feeds that amplified signal back into the tank in phase, timed to arrive exactly when it can replenish the energy lost to resistance that cycle. Classic topologies such as the Colpitts oscillator (which taps the feedback from a capacitive voltage divider) and the Hartley oscillator (which taps it from an inductive voltage divider) differ only in exactly how that feedback is extracted, not in the underlying LC resonance driving the frequency.
Why this circuit is everywhere in electronics
Because its frequency depends only on two passive component values that are easy to select and, with variable capacitors or inductors, easy to tune, the LC oscillator (and its resonant cousin, the driven RLC circuit) is the workhorse behind local oscillators in radio receivers, the carrier generators in AM and FM transmitters, clock references in older electronic systems, and the tank circuits inside voltage-controlled oscillators used for frequency modulation. Modern high-precision applications have largely moved to crystal oscillators, which use a quartz crystal's mechanical resonance instead of a discrete L and C for far better frequency stability — but the crystal's electrical behaviour near resonance is itself modelled as an equivalent LC circuit, so the underlying physics never really goes away.
Frequently asked questions
Why does an ideal LC circuit oscillate forever?
Because with zero resistance there is nowhere for energy to leak out as heat. The total energy stored across the inductor's magnetic field and the capacitor's electric field stays constant, so once the circuit is set oscillating, it keeps trading that fixed energy back and forth between the two components indefinitely, exactly like a frictionless pendulum swinging forever.
How does a real oscillator keep running despite resistance?
Every real LC tank has some resistance, so its natural oscillation decays exponentially unless energy is added back in. Practical LC oscillator circuits, such as the Colpitts and Hartley designs, use a transistor or op-amp as an active gain element that taps a small amount of the tank's own oscillation, amplifies it, and feeds it back in phase to exactly replace the energy lost to resistance each cycle — sustaining a constant-amplitude oscillation indefinitely.
Why is the LC oscillator often compared to a pendulum or a spring?
Because the underlying mathematics is identical: both are systems where energy trades continuously between two storage forms — kinetic and potential for a mechanical oscillator, magnetic (inductor) and electric (capacitor) for an LC circuit — obeying the same second-order differential equation. The LC circuit's natural frequency f = 1/(2π√LC) plays the exact same mathematical role as a pendulum's f = (1/2π)√(g/L) or a spring's f = (1/2π)√(k/m).
Try it live
Everything above runs in your browser — open LC Oscillator and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open LC Oscillator simulation