I'm confused about the use of the Ampere's Law and the Biot-Savart Law due the inconvenience of each law.
I want to calculate the magnetic field due to current carrying a circular loop over itself, i.e. not the magnetic field outside the loop but $B$ over the loop. For this, I use the two laws:
1. Ampere's Law
It states that: $$\oint B\cdot dl = \mu_0 I$$
The problem with the Ampere's Law is that $B$ is inside the integral, so in order to solve $B$ I need to use a closed line $L$, such that $B$ that does not depend of $dL$. In that case:
$$\oint B\cdot dl = \mu_0 I$$ $$B \oint dl = \mu_0 I$$ $$B = \frac{\mu_0 I}{L}$$
But, what type of trajectory $L$ should I choose?
2. Biot Savart Law
Let the trajectory: $$c(\theta) = R(\cos\theta\hat i + \sin\theta\hat j)$$ $$dc(\theta) = R(-\sin\theta\hat i + \cos\theta\hat j)d\theta$$
The magnetic field at point $c(t)$ is:
$$ dB = \frac{\mu_0}{4\pi}\frac{Idc\times r}{|r|^3}$$ $$ B(t) = \int_0^{2\pi}\frac{\mu_0}{4\pi}\frac{Idc\times (c(t)-c(\theta))}{|c(t)-c(\theta)|^3}$$ $$ B(t) = \int_0^{2\pi}\frac{\mu_0}{4\pi}\frac{IR(-\sin\theta\hat i + \cos\theta\hat j)d\theta\times R((\cos t-\cos\theta)\hat i+(\sin t-\sin\theta)\hat j)}{|R((\cos t-\cos\theta)\hat i+(\sin t-\sin\theta)\hat j)|^3}$$ $$ B(t) = \int_0^{2\pi}\frac{\mu_0I}{4\pi R}\frac{(-\sin\theta \sin t+\sin^2\theta - \cos\theta \cos t +\cos^2\theta)\hat k}{\sqrt{\cos^2 t-2\cos t\cos \theta+\cos^2\theta+\sin^2 t-2\sin t\sin\theta+\sin^2\theta}^3}d\theta$$ $$ B(t) = \int_0^{2\pi}\frac{\mu_0I}{4\pi R}\frac{1-\cos(t-\theta)}{(2(1-\cos(t-\theta)))^{3/2}}d\theta\hat k$$ $$ B(t) = \frac{\mu_0I}{8\sqrt{2}\pi R}\int_0^{2\pi}\frac{d\theta}{\sqrt{1-\cos(t-\theta)}}\hat k$$
This integral tends to infinity, because in some point $t$ (that is $c(t)$ is one point in the circular loop) tends to $\theta$ and the denominator becomes 0. So, is impossible to calculate the magnetic field over the own spiral.
And I think that the principal reason of this is that in Biot-Savart law the $r$ is in the denominator, so when I try to calculate the magnetic field very close to the current, this $r$ tends to zero and the magnetic field tends to infinity.
If I try this calculation with the formula for volumes ($ B = \int_V \frac{\mu_0}{4\pi}\frac{Jdv\times r}{|r|^3}$) the problem persists due the $r$ is in the denominator and the magnetic field near some point $dv$ will tend to infinity because $r$ tends to zero.
What is the way to do this calculation?