Positive work by a magnetic field

Consider a single charge moving only under the influence of Magnetic Field $\vec{B}$. The charged particle moves in a circle and the work done by $\vec{B}$ is 0. Now consider a current element in a uniform magnetic field ($\vec{B`}$). Now the derivation of the expression of force results in the the equation $\vec{F} = i \vec{l} \times \vec{B}$ (for a uniform magnetic field) where $\vec{l}$ is the vector joing the ends of the current element. For simplicity, I will consider a straight conductor. When the two vectors are perpendicular, the current element experiences a net non-zero force which does not cause a torque and causes translational motion. Therefore, in this case the magnetic field does positive work.

How is this contradiction possible? Magnetic field, which did no work on a single charge, now does positive work when the current carrying elements clumped together in a conductor. Is there any implicit assumption in the whole process which causes this? Can someone please give a good explanation?

The claim, "the magnetic force does no work," while technically true, is misleading in so many situations and actually helpful in so few that we probably shouldn't put as much emphasis on it as many textbooks do. The magnetic field stores energy, and a change of the configuration of a system (like moving a current) can convert that stored energy into other forms, so the system will certainly behave as if the magnetic field is doing work, but careful analysis will always show that it's not actually the magnetic force that's doing the work associated with the change of magnetic energy. Usually it's an electric force.

In your example, I think the subtlety lies in assuming that $I\vec{\ell}$ for the current $= q \vec{v}$ for individual charges. The charges will tend to change trajectory, i.e. $\vec{v}$ changes, due to the magnetic field, but $\vec{\ell}$ maintains its direction. Why? Because the wire (magically? We never really explain it very well in class) constrains the charges to move along its length in spite of their lateral movement produced by the magnetic field. As others have said above, the wire exerts a force on the charges to keep them in a straight line, and so the charges exert a reaction on the wire which moves it.

So technically, the magnetic force isn't doing any work on the current; it's just redirecting the force that would otherwise be pushing the current down the wire so that that force has a component pointing perpendicular to the wire instead.

Now for the bonus question: a magnetic dipole, e.g. a current loop or a small refrigerator magnet, will experience a force in a nonuniform magnetic field (though not in a uniform one). The dipole will then accelerate if this is the only force acting on it, so work is being done on it. If it's not the magnetic force doing the work, then what is it? (Really, as in this case, it gets silly sometimes to insist the magnetic force isn't doing work. For many intents and purposes, you might as well treat it as though it is.)

When electrons moving through a wire experience a magnetic force they change direction right? And when they push in that direction they don't gain any energy. So it must be the battery which gave the electrons their kinetic energy that is doing the work. As long as the current is flowing, the magnetic force is acting, and it is the battery that is sustaining this interaction.

Therefore, in this case the magnetic field does positive work. How is this contradiction possible?

The force given by the formula

$$\vec F= i \vec{l} \times \vec B$$

is magnetic force acting on the current forming particles - mobile electrons. The formula is accurate provided the wire does not move so the current forming particles follow the wire element $\vec{l}$. If so, the work done by magnetic forces on the electrons is zero and since the wire does not move, work done by magnetic forces on the wire is also zero.

If the wire element is allowed to move, mobile electrons no longer move along $\vec{l}$, but their velocity is influenced also by the motion of the wire. In such case above formula generally does not give correctly magnetic force on the wire element.

Except for when the motion of the wire is very slow (slower than the average speed of electrons with respect to the wire). Then, the formula gives accurately magnetic force on the electrons. Electrons move each differently and always perpendicularly to the experienced magnetic force, so no work is done by magnetic forces on them. However, in macroscopic description the confinement of the electrons within the wire means any external force $\vec{F}_{e}$ (due to external bodies, magnetic field...) they experience in a small element of the wire is accompanied by internal force $\vec{F}_{i}$ whose component perpendicular to the wire cancels the same kind of component of the external force. This can be assumed to be ordinary mechanical force obeying principle of action and reaction, so the electrons push back on the wire. The result is, that due to magnetic field the electrons themselves make the wire move and work on it. When the wire element $\ell$ gets displaced by $\Delta \vec s$, the expression

$$i \vec{l} \times \vec B \cdot \Delta \vec s$$

gives net work done on the wire by the electrons. The magnetic field thus enables the moving electrons to give kinetic energy (or work, if done steadily) to the rest of the wire.

The role of magnetic field is similar to the role of normal force of ground, when a human is in the process of standing up. No work is done by the ground; all the work is done by internal forces in the human body. But the normal force of the ground is necessary to make this possible. Similarly, magnetic forces do not work, but they make possible work to be done by the electrons on the rest of the wires.

How is this contradiction possible? Magnetic field, which did no work on a single charge, now does positive work when the current carrying elements clumped together in a conductor. Is there any implicit assumption in the whole process which causes this? Can someone please give a good explanation?

It's simpler than you think, and there is no contradiction. Start with a current in a wire, like this:

GNUFDL image by Jfmelero, see Wikipedia

Chuck a charged particle past it and it moves in a circular fashion around the magnetic field lines. No work is done. Now wrap the wire into a number of loops until you've got a solenoid, whereupon your magnetic field is reconfigured to resemble that of a bar magnet:

Image courtesy of Rod Nave's hyperphysics

Chuck a charged particle through the middle of the solenoid, and it moves in a circular fashion around the magnetic field lines. No work is done. Now get hold of two bar magnets, and let them attract one another. When this occurs no work is done. Instead you do work on the magnets when you pull them apart. It's rather like gravity. You do work on a brick when you lift it. Gravity doesn't do work on it when it falls down. It merely converts potential energy into kinetic energy, which typically gets dissipated as heat.