
Solenoid is a long coil of wire consisting of closely packed loops.
Let 'n' be the number of turns per unit length of the solenoid and I be the current flowing through the solenoid. Let us consider a rectangular Amperian loop a b c d near the middle. Where ab = h. Let the applied field be B along 'ab' and zero along the path 'cd', the paths 'be' and 'da' are perpendicular to the field (\(\theta\)= 90, cos\(\theta \)=0). \(\therefore\)Magnetic field is also zero.
\(\phi _{abcd} \vec{B}. \vec{dl} = \) \(\int_{ab}\vec{B}.\vec{dl} +\int_{bc}\vec{B}.\vec{dl}+\int_{cd}\vec{B}.\vec{dl} +\int_{da}\vec{B}.\vec{dl} \)
[\(\int_{bc}\vec{B}.\vec{dl}=\int_{da}\vec{B}.\vec{dl} = 0 \) (\(\theta =90^0\)) \(\int_{cd}\vec{B}.\vec{dl}\) is very less & neglected, because It is outside the solenoid.]
\(\therefore \phi _{abcd} \vec{B}. \vec{dl} = \) \(\int_{ab}\vec{B}.\vec{dl}\) = \(\phi_{ab}B dlcos\theta\)
\(\theta =0 , cos\theta =1\ and\ dl=ab=h\)
\(\therefore \phi_{abcd} \vec{B}.\vec{dl} = B.h\) .......................(1)
According to ampere's circuital law,
\(\phi_{abcd} \vec{B}.\vec{dl}\) = \(\mu_0 I_t\) .............................(2) where \(I_t = nhI\)
From equations 1 & 2, Bh= \(\mu_0nhI\)
\(B = \mu_0nI\)