A thin diamagnetic rod is placed vertically between the poles of an electromagnet. When the current in the electromagnetic is switched on, then the diamagnetic rod is pushed up, out of the horizontal magnetic field. Hence the rod gains horizontal potential energy. the work required to do this comes from