I have a geometry where current density distribution is constant. I can calculate the $z$ component of magnetic flux density according to Biot-Savart law as following:
$$B_z(x,y,z) = \int\limits_x\int\limits_y\int\limits_z \frac{(y-y')J_x(x',y',z')-(x-x')J_y(x',y',z')}{((x-x')^2+(y-y')^2+(z-z')^2)^{\frac{3}{2}}}dx'dy'dz'\, .$$
I can calculate this integral numerically using MATLAB on various points $(x,y,z)$. My question is, how do we handle infinities which occur when $(x,y,z)=(x',y',z')$.