I have a doubt about the work done by a battery and the potential energy of a capacitor?
1- Consider a circuit where the capacitors are connected to the terminals of a battery. Through calculations we get that change in potential energy of a battery is half of the work done by a battery. Since they are not equal, does this imply that work done by a battery is done by a non conservative force? Where is the energy lost to?
2- Now consider a dielectric slab inserted partially into the capacitor that is connected to the terminals of a battery. We want to find the force that keeps the dielectric in equilibrium when it is partially inserted into the parallel plate capacitor. To do this we use the principal of virtual work. We equate work done by the external force that keeps the dielectric in equilibrium in moving the dielectric by a small imaginary distance dR. This must be negative of work done by the battery as net work done is zero, there is no change in kinetic energy. (gravity is neglected for a small distance dR). Here however we take work done by the battery as change in potential energy. (In Solving we equate change in potential energy to work done by external force) Why? Isn't that a contradiction to the previous statement or is the previous statement wrong? Is there an alternate way to solve the given problem?