A parallel plate capacitor is connected across a battery of emf V as shown in figure. The plates of the capacitor have area A and separation between the plates is d. Now switch S is clossed to connect the capacitors with battery. Now the distance between the plates is slowely reduced to d/2. Cacluclate the work done by the external agent in the process.