Question: what is inhomogeneous magnetic field?
Answer: the magnetic field must be inhomogeneous because the magnetic force is proportional to the gradient of the field. ... In fact, in elementary courses of electromagnetism it is very easily shown that if the magnetic field is uniform (i.e., homogeneous field), the force on a magnetic moment is zero.