I'm reading through my text (Griffiths Electrodynamics), and I'm working through an example in which he tries to dismantle a scenario where it is tempting to think that the magnetic field does work. The scenario is as follows, we have a square current carrying loop of wire of constant current I, of side width a, in a magnetic field pointing into the page B. The current circulates clockwise so that the magnitude of the force points up. He says that if the current is set so that the magnitude of the magnetic force exceeds the gravitational force, the loop will move up(it is important to note that only the top side of the loop of wire is inside the B field here, and since both the left and right side are inside it, their force vectors cancel each other), and it is tempting to think that it is the magnetic force doing the work here, where the equation that would describe it would be: W = IaBh where h is its vertical displacement. Instead he argues that it must be a battery (or any source of emf) doing the work. His argument is as follows: When the loop begins to move up, the charges moving through it it acquire a vertical velocity u, in addition to their horizontal velocity w (pointing right). This makes their net velocity vector point diagonally up and to the right. Since the magnetic force vector is always perpendicular to the velocity vector, the force vector points diagonally up and to the left, giving it a component which points directly opposite to the horizontal velocity component. The horizontal component of magnetic force can be written as: FH = λauB (pointing left) The vertical component of magnetic force can be written as: FV = λawB = IBa (pointing up) where λ is the linear charge density of the wire. He then completes this argument by saying "In a time dt, the charges move a (horizontal) distance wdt, so the work done by this agency (battery) is: WB = λaB∫uwdt = IBah Proving that the equation we arrived at erroneously is actually due to the emf, not the magnetic field. My confusion is this: Why are the two velocities inside the integral? This suggests that they are not constant, and then I'm not able to figure out how these two quantities actually are equal to each other. If the velocities are constants, then both can be taken outside the integral, and the substiution λawB = IBa can be made, and u∫dt would simply equal h. Thoughts?