# Magnetic field (by current density)

Good, I would need someone to help me know what I'm doing wrong: we know that the magnetic field that generates a circular loop of radius "a" on its axis is

$$\vec{B}(\vec{r})=\frac{\mu_0I}{4\pi}\int\frac{\vec{dl'}\times(\vec{r}-\vec{r}\ ')}{|\vec{r}-\vec{r}\ '|^3}=\frac{\mu_0Ia^2}{2(z^2+a^2)^{3/2}}\hat{k}$$ with $$\vec{r}-\vec{r}\ '=z\hat{k}-a\hat{\rho}\ '$$ and $$\vec{dl}\ '=ad\varphi'\vec{\varphi}\ '$$

now, when I try to calculate it with the expression of the current density with $$\vec{J}=\underbrace{\frac{I}{2\pi a}\hat{\varphi}}_{\vec{J_l}}\delta(z)\delta(\rho-a)$$ then if

$$\vec{B}(\vec{r})=\frac{\mu_0}{4\pi}\int\frac{\vec{J}\times(\vec{r}-\vec{r}\ ')}{|\vec{r}-\vec{r}\ '|^3}dV'=\frac{\mu_0Ia}{4\pi(z^2+a^2)^{3/2}}\hat{k}$$ with $$\vec{r}-\vec{r}\ '=z\hat{k}-a\hat{\rho}\ '$$

Can someone help me? Am I miscalculating the current density? Why isn't that it?

The idea is that $$J{\rm d}V = I {\rm d}l$$, so the current density should be
$$J({\bf r}) = I\delta(z)\delta(\rho - a)$$
$$\int {\rm d}V~ J({\bf r}) = 2\pi a I = \int {\rm d}l ~ I$$
it seem you are. you're missing $$2\pi a$$ from the expression. now, it looks like you've only done integration over z and $$\rho$$ and not $$\varphi$$ which should have give you $$2\pi$$. so now we're only missing an a. maybe it comes also from the integration, from the Jacobian $$\rho d \varphi$$ ?