# Can magnetic force do work? [duplicate]

I have been told numerous times that magnetic force do no work at all but I have some trouble digesting this fact. Now suppose we have two straight wire with some current, they certainly can feel force which may be repulsive or attractive depending upon current direction, can magnetic force do work? We also have magnetic potential energy defined to $U = -\vec{\mu} \cdot \vec{B}$ which suggests magnetic field can store energy and hence do some kind of work.

Magnetic forces do no work on moving charges. If a charge $q$ moves with a velocity $\vec{v}$ in a magnetic field $\vec{B}$ then it experiences a force $\vec{F} = q\vec{v}\times\vec{B}$. Since the work done is $dW = \vec{F}\cdot d\vec{x}$ and since $d\vec{x} = \vec{v}dt$, we have $dW = q(\vec{v} \times \vec{B})\cdot\vec{v}dt$, which is always zero.