Why have we assume that the there should be no acceleration in deriving the Electrostatic potential energy

In the NCERT textbook grade 12, it is mentioned before deriving the work done in moving a charge $$q$$ from point $$R$$ to $$P$$ in presence of an electric field at Origin, $$O$$ by charge $$Q$$

Two remarks may be made here. First, we assume that the test charge q is so small that it does not disturb the original configuration, namely the charge Q at the origin (or else, we keep Q fixed at the origin by some unspecified force).

This makes sense for obvious reasons

Second, in bringing the charge q from $$R$$ to $$P$$, we apply an external force $$F_{ext}$$ just enough to counter the repulsive electric force $$F_{ele.}$$ (i.e, $$F_{ext}$$= –$$F_{electric}$$. This means there is no net force on or acceleration of the charge q when it is brought from $$R$$ to $$P$$, i.e., it is brought with infinitesimally slow constant speed. In this situation, work done by the external force is the negative of the work done by the electric force and gets fully stored in the form of the potential energy of the charge $$q$$.

I know how to derive the potential energy of a charge, but I can't understand why we have made this second assumption, that the externally applied force and the electrical forces have to be equal. Now coming to a thermodynamic derivation for work done in expanding/compressing volume keeping the pressure varying (i.e. in slow process)

here we use the same notion of $$dW=F.ds$$ which is converted to

$$dW= P_{ext}.dV$$

but this time we replaced $$P_{ext}$$ with $$P_{int}+dP$$. And so we get $$dW= (P_{int}+dP).dV$$

Why did we not add a similar $$F_{ext}=F_{electric}+dF$$

And so continue

$$dW= (F_{electric}+dF).ds$$

Note that both the cases mentioned are happening in infinitesimally slow speed if I am right, so why different treatment? The only possible explanation I can come up with is that one conservative force and another is not, but I couldn't build upon it.

TLDR;

Why is there additional Pressure, $$dP$$ added in the thermodynamic derivation but no additional $$dF$$ added for the electrostatic derivation?

• Correct, we are not bothered by whether the piston has KE or not as long as we are only interested in the change in internal energy $\Delta U$ of the system per the first law. But if we are interested in the total change in energy \Delta E_{tot}$of the system then we would be interested in the KE (and PE) of the system per the general version of the first law. I just posted an answer related to this that you may find helpful. See:physics.stackexchange.com/questions/629839/… Apr 16 '21 at 13:56 • Thanks, Bob for clarifying, though I want to get back to you, later on, as I was curious what would happen if we derived using thermodynamic treatment of making$F_{ext}=F_{electric}+dF\$ then it struck me there has to be an obvious problem in conservative forces . Will get back to you later Apr 16 '21 at 14:00