# Physics equations/Magnetic field calculations

## The Biot-Savart law

Geometry for the Biot-Savart law. ${\displaystyle {\vec {B}}={\tfrac {\mu _{0}}{4\pi }}\int {\frac {Id{\vec {\ell }}\times {\hat {r}}}{r^{2}}}}$

The Biot–Savart law is used for computing the resultant magnetic field B at position r generated by a steady current I (for example due to a wire): a continual flow of charges which is constant in time and the charge neither accumulates nor depletes at any point. The law is a physical example of a line integral: evaluated over the path C the electric currents flow. The equation in SI units is:

**Problem: Generalize this line integral to a volume integral involving current density.

## Magnetic field due to a current loop

Magnetic element current loop

*Problem: Show that if circular loop of radius ${\displaystyle a}$ carries a current ${\displaystyle I}$, then the the magnetic field at the center of the loop points in the ${\displaystyle {\hat {z}}}$ direction and as a magnitude of:

${\displaystyle B_{\text{center}}={\frac {\mu _{o}I}{2a}}}$.

(This represents the magnetic field at ${\displaystyle z=0}$ in the figure to the right; the magnetic field points in the ${\displaystyle {\hat {z}}}$ direction.)

***Problem:Show that if circular loop of radius ${\displaystyle a}$ carries a current ${\displaystyle I}$, then the the magnetic field at the at a distance ${\displaystyle z}$ away from the center is in the z direction, has magnitude:

${\displaystyle B(z)={\frac {\mu _{o}I}{2}}{\frac {a^{2}}{\left(z^{2}+a^{2}\right)^{3/2}}}}$

## Ampère's circuital law

Closed surfaces to the left; open surfaces with boundaries to right.
Understanding Maxwell's displacement current. A current flowing through a wire produces a magnetic field, in accordance with Ampère's law. But a capacitor in the circuit represents a break in the current, so that a surface can avoid penetration by the current by passing between the plates of the capacitor. Maxwell corrected this flaw by postulating that a time-varying electric also generates a magnetic field.

The "integral form" of the original Ampère's circuital law[1] is a line integral of the magnetic field around any closed curve C (This closed curve is arbitrary but it must be closed, meaning that it has no endpoints). The curve C bounds both a surface S, and any current which pierces that surface is said to be enclosed by the surface. The line integral of the magnetic B-field (in tesla, T) around closed curve C is proportional to the total current Ienc passing through a surface S (enclosed by C):

${\displaystyle \oint _{C}{\vec {B}}\cdot \mathrm {d} {\boldsymbol {\ell }}=\mu _{0}I_{\mathrm {enc} }}$

## Maxwell's correction term (displacement current)

This equation might is not generally valid if a time-dependent electric field is present, as was discovered by James Clerk Maxwell, who added the displacement current term to Ampere's law around 1861.[2][3] The need for this extra term can be seen in the figure to the right. The diagram shows a capacitor being charged by current ${\displaystyle I\,}$ flowing through a wire, which creates a magnetic field ${\displaystyle \mathbf {B} \,}$ around it. The magnetic field is found from Ampere's law:

*****Problem: Show that with Maxwell's correction (with ${\displaystyle \partial {\vec {E}}/\partial t}$), Ampere's law becomes:

${\displaystyle \oint _{C}{\vec {B}}\cdot \mathrm {d} {\boldsymbol {\ell }}=\mu _{0}\int _{S}({\vec {J}}+\epsilon _{0}{\frac {\partial {\vec {E}}}{\partial t}})\cdot d\mathbf {S} \,}$

where,

${\displaystyle \int _{S}{\vec {J}}\cdot d\mathbf {S} =I_{\mathrm {enc} }}$

## Magnetic field due to a long straight wire

Magnetic field near a long straight wire.

*Problem: Show that in the vicinity of a long, straight wire carrying current ${\displaystyle I\,}$, Ampere's law yields:

${\displaystyle {\vec {B}}={\frac {\mu _{0}I}{2\pi r}}\,{\hat {\theta }}}$

where ${\displaystyle {\hat {\theta }}}$ is a unit vector that points in the azimuthal direction, and ${\displaystyle \mu _{0}}$ is the magnetic constant.

## Magnetic field inside a long thin solenoid

Magnetic field due to a solenoid

*Problem: Show that in the vicinity of a long, thin solenoid of length ${\displaystyle L}$

${\displaystyle {\vec {B}}=\mu _{0}{\frac {N}{L}}I=\mu _{0}n'I}$

where ${\displaystyle I\,}$ is the current, ${\displaystyle N}$ is the number of turns, and ${\displaystyle n'}$ is the number of turns per unit length.

## references

1. https://en.wikipedia.org/w/index.php?title=Amp%C3%A8re%27s_circuital_law&oldid=578507291
2. Example taken from Feynman, Richard; Robert Leighton; Matthew Sands (1964) The Feynman Lectures on Physics, Vol.2, Addison-Wesley, USA, p.18-4, using slightly different terminology.
3. https://commons.wikimedia.org/w/index.php?title=File:Displacement_current_in_capacitor.svg&oldid=38260258