Lessons · circuits

The LC oscillator: the current is the slope of the charge

Regime 2 — calculus does what algebra cannot. The acceleration isn't constant, so the algebra formulas don't apply; calculus is the only road in, and SymPy proves the closed form solves the equation of motion.

Regime 2 · calculus does more Math machine-derived & checked by SymPy 2 modeling assumptions (author-asserted)

A capacitor C=100 μC = 100\ \muF is charged to Q0=0.01Q_0 = 0.01 C and then connected across an inductor L=10L = 10 mH. With no resistance to drain it, the charge Q(t)Q(t) and the current I(t)I(t) oscillate forever at angular frequency ω=1/LC\omega = 1/\sqrt{LC}. Plotted as a stacked QQtt over IItt, the slope of the charge is the current at every instant — the same slope↔value pivot as position and velocity, and the electrical twin of a mass on a spring. Drag LL and watch the period T=2πLCT = 2\pi\sqrt{LC} stretch; the energy sloshes between the capacitor and the inductor while the total stays fixed.

Angular frequency ω=1/LC\omega = 1/\sqrt{LC}
1000 1/s
Period T=2πLCT = 2\pi\sqrt{LC}
0.006283 s
Peak current Imax=Q0ω=Q0/LCI_{\max} = Q_0\omega = Q_0/\sqrt{LC}
10 A
Total energy E=Q02/2CE = Q_0^2/2C (constant)
0.5 J
Kirchhoff's voltage law is a second-order differential equation
LdIdt+QC=0,I=dQdt  Ld2Qdt2+QC=0L\,\frac{dI}{dt} + \frac{Q}{C} = 0, \quad I = \frac{dQ}{dt} \ \Longrightarrow\ L\,\frac{d^2Q}{dt^2} + \frac{Q}{C} = 0

Around the loop, the inductor's back-EMF LdI/dtL\,dI/dt balances the capacitor voltage Q/CQ/C. Because the current is the rate of change of charge, I=dQ/dtI = dQ/dt, this is a second-order differential equation for Q(t)Q(t) — the exact shape of the mass–spring equation x=ω2xx'' = -\omega^2 x, with ω2=1/(LC)\omega^2 = 1/(LC).

check I=dQ/dtI = dQ/dt; check LQ+Q/C=0L\,Q'' + Q/C = 0; energy Q22C+12LI2\tfrac{Q^2}{2C} + \tfrac12 LI^2 constant; T=2πLCT = 2\pi\sqrt{LC}; quarter-period 9090^\circ phase

  • The current is the slope of the charge: I=dQdtI = \dfrac{dQ}{dt} — exactly as velocity is the slope of position. [structural]
  • The charge solves the LC equation Ld2Qdt2+QC=0L\,\dfrac{d^2Q}{dt^2} + \dfrac{Q}{C} = 0 — the electrical twin of the spring's x=ω2xx'' = -\omega^2 x. [structural]
  • Energy trades between the capacitor Q22C\tfrac{Q^2}{2C} and the inductor 12LI2\tfrac12 LI^2; the total stays at the initial Q022C\tfrac{Q_0^2}{2C}. [simplify]
  • The period is T=2πLCT = 2\pi\sqrt{LC}: a full cycle later the charge repeats, Q(t+T)=Q(t)Q(t+T) = Q(t). [structural]
  • A quarter period in, the capacitor is empty (Q=0Q = 0) while the current peaks — charge and current are 9090^\circ out of phase. [structural]

Dimensional homogeneity: checked by SymPy (holds).

Common misconception: “The charge and current both start large and fade away, the way they do when a capacitor charges through a resistor (RC).

Not here. With no resistor there is nothing to dissipate the energy, so nothing decays — the charge and current oscillate forever. They are 9090^\circ out of phase: when the charge QQ is at its peak the current II is zero (the capacitor is full and momentarily not flowing), and a quarter cycle later Q=0Q = 0 while II is at its peak (the capacitor is empty and the current is greatest). The energy trades back and forth between the capacitor's Q2/2CQ^2/2C and the inductor's 12LI2\tfrac12 LI^2, but the total is constant. RC relaxes; LC rings.

Modeling assumptions — author-asserted, disclosed not discharged
  • An ideal LC circuit: a perfect inductor and capacitor with no resistance, so no energy is dissipated and the oscillation never decays.
  • The capacitor starts fully charged to Q0Q_0 and the initial current is zero, I(0)=0I(0) = 0 — all the energy begins in the capacitor's electric field.

The stacked graph, fully annotated

A static rendering (Matplotlib) at the default parameters — the interactive version is in the Graph tab above.

2026-06-27T06:43:49.289681 image/svg+xml Matplotlib v3.11.0, https://matplotlib.org/