A battery pushes electricity one steady way — that's DC. The socket in your wall does something different: it shoves the charge back and forth, about 50 to 60 times every second. That's alternating current (AC). Think of pushing a child on a swing: you don't push once and walk away, you push, let it come back, and push again, over and over.
Now put three parts in the path of that back-and-forth current. A resistor just rubs against the flow and turns energy into heat. A coil (inductor) and a capacitor are sneakier: they push back harder or softer depending on how fast you wiggle the current. That frequency-dependent push-back is called reactance. The coil's reactance $X_L=\omega L$ grows when you raise the frequency; the capacitor's $X_C=1/(\omega C)$ shrinks when you raise it. Here $\omega=2\pi f$ is just the frequency counted in radians per second.
The clever part is how the three combine. They do not simply add. Because the coil's and capacitor's voltages are a quarter-cycle out of step with the resistor's, they stack like the sides of a right triangle into the impedance $Z=\sqrt{R^2+(X_L-X_C)^2}$. Suppose $R=30\,\Omega$ and a coil contributes $X_L=40\,\Omega$. Then $Z=\sqrt{30^2+40^2}=50\,\Omega$ — not $70\,\Omega$. Ohm's law still works, you just use $Z$ instead of $R$: a $120\text{ V}$ (rms) supply drives $I_\text{rms}=120/50=2.4\text{ A}$. The current also runs out of step with the voltage by the phase angle $\tan\varphi=(X_L-X_C)/R$, here $\arctan(40/30)\approx53^\circ$.
The magic moment is resonance. As you tune the frequency, there is one special value $f_0=1/(2\pi\sqrt{LC})$ where $X_L$ and $X_C$ become equal and cancel. The impedance drops to its smallest value, $Z=R$, and the current peaks — exactly how a radio picks one station out of the air. Only the resistor actually burns power: $P_\text{avg}=V_\text{rms}I_\text{rms}\cos\varphi$, where $\cos\varphi=R/Z$ is the "power factor."
The sliders map straight onto these symbols: V₀ sets the push, f sets $\omega$, and R, L, C set the impedance. Try this in the sim above: (1) leave the defaults and nudge f until the readout Z bottoms out and I_rms peaks — that's resonance, near 50 Hz. (2) Crank f far above resonance and watch $X_L$ take over: the circuit turns inductive and the current lags. (3) Drop f well below resonance and watch $X_C$ dominate: $Z$ climbs and the current shrinks.
| Symbol | Quantity | SI Unit |
|---|---|---|
| $Z$ | Impedance | Ω |
| $X_L=\omega L$ | Inductive reactance | Ω |
| $X_C=1/(\omega C)$ | Capacitive reactance | Ω |
| $\varphi$ | Phase angle | rad |
| $Q=\omega_0 L/R$ | Quality factor (resonance sharpness) | dimensionless |