B-field lines always form complete loops
- Thus the net flux is 0
- So Gauss’ Law for magnetic fields is
$$ \oint_S\vec B\cdot\text d\vec A=0 $$
❕There is no magnetic monopoles
$$ \oint_C\vec B\cdot\text d\vec l=\mu_0 I_\text{enc}\left ( =\mu_0\int_S\vec j\cdot \text d \vec A \right) $$
We can use Biot-Savart formula for infinitely long wire
$$ \vec B(s)=\frac{\mu_0 I\,\hat\theta}{4\pi}\left[ \frac{\sin\alpha}{s}\right]^\frac{\pi}{2}_{-\frac{\pi}{2}}=\frac{\mu_0 I}{2\pi s}\,\hat\theta $$
$$ \text d\vec l=\text dl\,\hat \theta\Rightarrow \vec B\cdot\text d\vec l=B\,\text dl \quad ; \quad |\vec B(s)|=\text{constant} $$
$$ \oint_C\vec B\cdot\text d\vec l=\oint_CB\,\text dl=B\oint_C\text dl=B2\pi s=\mu_0I $$
<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/94e94907-9fb8-4f3b-ad06-3c81a53fa029/Solenoid.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/94e94907-9fb8-4f3b-ad06-3c81a53fa029/Solenoid.png" width="40px" /> A Solenoid is a helical coil of wire
</aside>
$$ \begin{aligned} \oint_C\vec B\cdot \text d\vec l&=B_\text{in}l=\mu_0I_\text{enc}=\mu_0nlI \\ &\Rightarrow B_\text{in}=\mu_0nI
\end{aligned} $$