How can the voltage in a circuit possibly be constant for different resistances?

Consider two identical electron battery circuits, Circuit A and Circuit B, with the only difference being the resistance at resistors, which is higher for B than for A. The drift velocity of a given electron in either circuit would be $\frac {I}{nAe}$, or $\frac {V}{nARe}$, with $n$ the electron particle density, $A$ the cross-sectional area of the wire, $e$ the charge of an electron, and $R$ the resistance at resistor. The kinetic energy would, therefore, be inversely proportional to the square of resistance given that the other parameters are constant (they are for circuits A and B).

Since voltage is set to be the same for the two circuits, electrons in both circuits start off with the same amount of potential energy, $Ve$, and no kinetic energy. They are then accelerated to the drift velocity described above as soon as the battery is switched on and proceed to lose all their remaining potential energy after having passed the resistor, leaving them only with kinetic energy.

Clearly, the work that an electron has done on the resistor is the starting potential energy minus the kinetic energy they are left with, or $Ve-\frac {1}{2}m(\frac {V}{nARe})^2$. Since the resistance is higher for B than for A, that value will likewise be greater for the former.

But since voltage is defined as total work done in a circuit by unit charge, it should be higher for Circuit B than for Circuit A.

What have I done wrong?

If your circuit is in steady-state (i.e. DC) conditions, the electrons aren't starting at zero velocity at the voltage source. The circuit is, after all, a loop, so your electrons have a kinetic energy of $\frac{1}{2}m\left(\frac{V}{nARe}\right)^2$ just before they enter the voltage source. The voltage source does an amount of work equal to $Ve$ on them, so after the voltage source, your electron has an energy of $Ve+\frac{1}{2}m\left(\frac{V}{nARe}\right)^2$. The resistor, having voltage drop $-V$, does an amount of work equal to $-Ve$ on the electron, so its energy is just $\frac{1}{2}m\left(\frac{V}{nARe}\right)^2$ after the resistor, which completes the loop. As you can see, the kinetic energy of the electron is just a spectator in the process, and is affected by neither the voltage source nor the resistor. After all, we assumed that drift velocity was constant in steady-state (DC) conditions, so this makes sense.
• In fact, this internal resistance is partly caused by the fact that the electron's kinetic energy is wasted as heat once it reaches the positive terminal (which is why short-circuited batteries explode). As such, in order to keep the electron drift velocity constant, a battery with external voltage drop $V$ must actually internally do more work than $Ve$ to get the electron to the right kinetic energy as it leaves the battery. This difference manifests itself as a resistance. – probably_someone Mar 26 '18 at 21:44