# Calculating magnetic flux density

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')$$.

• There is no infinity there if current density is finite, both numerator and denominator vanish when $x=x', y=y',z=z'$ and in the end it all cancels out. – Maxim Umansky Feb 22 at 1:03
• What are the integration limits? – nicoguaro Feb 22 at 2:20
• The denominator vanishes faster than the numerator, so it is so not obvious how this works out, but it does (see a proof of the Helmholtz decomposition theorem, for example at the beginning of Classical Electricity and Magnetism by Panovksy and Philips). – Amit Hochman Feb 22 at 9:45