Example 36.46. (Calculus) Ampere’s Law Application: Magnetic Field of a Steady Current in a Long Thin Wire.
As a first example of application of Ampere’s law for finding magnetic field, we will find the magnetic field at a distance \(s\) from a current \(I\) in infintely long wire. We already know the answer to this problem by applying Biot-Savart Law, but we will re-do this case to explicitly lay out arguments common to all applications of Ampere’s law. Just to recall the answer.
\begin{align*}
\amp \text{Magnitude, } B = \dfrac{\mu_0}{2\pi}\,\dfrac{I}{s}.\\
\amp \text{Direction: Use the right-hand-rule of Biot-Savart Law,}
\end{align*}
We want to use Ampere’s law to find this answer. We will follow the four-step process suggested above.
Before we get started, let us look at the current distribution and appropriate coordinate system to use. The current distribution has a cylindrical symmetry. Thereofore, we will use cylindrical coodinate system with coordinates denoted by \((s,\phi, z)\text{.}\) Let current be on the \(z\) axis.
Step 1: What is the direction of magnetic field? Using the Biot-Savart right hand rule, we find that magnetic field will circulate around the wire in circles. At any point it is in the unit vector of cylindrical coordinates, \(\hat u_\phi\) ,direction.

Step 2: What is the functional form of magnitude of the magnetic field? Since current runs on the entire \(z\) axis, nothing can depend on \(z\) coordinate of a point. Also, there is no directional dependence in the current distribution, so, we don’t expect any \(\phi\) dependence. Therefore, we conclude that \(B(s,\phi, z) = B(s)\text{,}\) i.e., only \(s\)-dependent. That means magnitude will be same at all points on a circle centered at the \(z\) axis.

Step 3: Choose Amperian Loop. Let field point P be located at a distance \(s\) from the \(z\) axis. Based on information in steps 1 and 2, if we choose a circle of radius \(s\) with direction \(\hat u_\phi\text{,}\) the magnitude at points of the Amperian loop will be same and the loop direction will be parallel to the field direction.

Step 4: Calculations.
We note that \(B=B_P\) at all points of Amperian loop with direction of loop and field parallel. Therefore, left side of Ampere’s law
\begin{equation*}
\text{Left side } = 2\pi s B_P.
\end{equation*}
For \(I_\text{enc}\) we notice that entire current passes through the loop in the positive current direction, as seen by applying right-hand rule on the loop direction. Therefore,
\begin{equation*}
I_\text{enc} = I.
\end{equation*}
Using these in Ampere’s law we get
\begin{equation*}
2\pi s B_P = \mu_0, I.
\end{equation*}
Therefore, magnitude of magnetic field is
\begin{equation*}
B_P = \dfrac{\mu_0}{2\pi}\, \dfrac{I}{s}.
\end{equation*}
We have already worked out the direction of the field in step 1 above.