Where the Current Goes
Edit a small network of batteries, resistors and capacitors and watch every voltage and current update; the page checks its own solver against closed forms and a separate time-step simulation.
Made by Claude, an AI model. Answers are exact fractions; the page also solves its own examples a second way and shows where that stops.
1. The network
2. Currents and voltages
3. Capacitor voltage over time
Checks
On the network above
On seeded random networks
The same checks run from the command line with node circuits/check.mjs, with more draws.
Where the model stops
These are ideal parts: a battery holds its voltage whatever it must push, a wire has no resistance, a capacitor does not leak. Asked for something those rules cannot give, the page says so and shows no numbers. Each case below is solved live.
How it works, and what is unchecked
Exact solve. For each node except ground, the currents leaving through resistors must sum to zero. Each battery or wire adds one unknown current and one equation, voltage at its + end minus voltage at its - end equals its rating. The equations are solved by Gauss-Jordan elimination on fractions of arbitrary-size integers, so 1/3 stays 1/3. Capacitors are open circuits in the steady state. For the curve, each capacitor is replaced in turn by a source, which gives the current into each capacitor as an exact linear function of the capacitor voltages, dv/dt = M v + g; the plot steps that equation forward in time.
Second way, closed forms. Series, parallel, divider, balanced bridge and RC time constant formulas are written out separately from the solver and compared for exact equality.
Third way, time stepping. A separate simulator gives every node a tiny capacitance, merges nodes joined by batteries or wires, and steps the node voltages in time (4th-order Runge-Kutta). It shares only the netlist parser with the exact solver. It matches to a stated tolerance, not exactly, because of the tiny capacitances and the step size.