Before proceeding onwards please note that I am talking about a simple circuit consisting of an ideal battery, a switch and an external resistance.
So I was told that $$ W_\text {ideal battery} = Q_\text { dissipated by the resistance} $$, but this seems wrong to me. My reasons are:
i) Electrons carry energy, they travel from the negative terminal to the positive terminal. If all the energy of the electrons were to be transferred to the resistance then in that case, electrons (after passing through the resistance) will start undergoing random motion since electric field at them is now 0, potential difference between any two points on that circuit is 0 (the wire itself is resistance less but we have attached a resistance to the wire).
ii) In my opinion what would happen is that all the potential energy will change to heat energy, the remaining kinetic energy of electrons will be constant (assuming that drift velocity is constant throughout the circuit, I know it will not be so but I am not well versed enough with the math required to find drift velocity, the statistical analysis required to do so is far beyond my current ability).
iii) If that is indeed the case then when we closed the switch, the battery would have certainly given the electrons a certain kinetic energy as that is why drift velocity is a thing, before the switch was closed there was no electric field and thus no drift velocity, the net velocity of electrons was 0.
iv) The work done by the battery $ q \times V $ is simply change in potential energy and there is no component of kinetic energy inside which means that initially the battery must have provided the circuit with additional energy, which is $ \frac{1}{2} mv_d^2$ and thus all of the energy provided by the battery is not dissipated into heat, only the potential energy is dissipated into heat.
Is my reasoning above correct, if so
$$ W_\text {ideal battery} = Q_\text { dissipated by the resistance} $$
would turn out to be incorrect right?
EDIT 1,
Rather than saying that potential energy is changing at every point which is incorrect as the wire itself is resistance less, I should have said that potential energy is changing across the resistor.