Hi, today in lecture, we discussed the work done on inserting a dielectric between a capacitor. Two cases of this example: One case, where the battery is disconnected so that the charge stays constant. Other case where the battery stays connected so voltage is constant. I am confused on why the work by the electric force for the disconnected battery is negative, while the work for the connected battery is positive. The professor discussed something about the fringed electric field that results in a force downwards by the electric field when we insert the dielectric. Also, he mentioned how when work is positive, energy is added, so it makes sense that the final energy state for inserting dielectric into a connected battery-capacitor increases. Vice versa to the disconnected battery.. I am confused on what is happening specifically for each case and more important "why". Can someone please explain this concept?