Does the formula τ=μ×B work for a non-uniform magnetic field? Why?
If not, how to calculate the torque on a current carrying loop placed in x-y plane, supposing the non uniform magnetic field equation is provided?