**Part D**. What is Iencl, the current passing through the chosen loop?

Express your answer in terms of L (the length of the Ampèrean loop along the axis of the solenoid) and other variables given in the introduction.

**Part E**. Find Bin, the z component of the magnetic field inside the solenoid where Ampère's law applies.

Express your answer in terms of L, D, n, I, and physical constants such as ?0.

### Answer

**D)**. The magnetic field of a solenoid by considering a rectangular path is,

`\oint B \cdot d s =\oint B \cdot d s+\oint B \cdot d s+\oint B \cdot d s+\oint B \cdot d s`

`=0+0+B l+0`

`=B L`

Zero value comes when the angle between the magnetic field line and the area is perpendicular to each other which results in `\cos 90^{\circ}`

. As the flux is the equal to the dot product of magnetic field and the area enclosed.

Use Ampere's Circuital law.

`B l =\mu_{0} N I`

`B =\frac{\mu_{0} N I}{L}`

`=\mu_{0} n I`

Here, `n=\frac{N}{L}`

The ampere's law is,

`\oint B \cdot d s=\mu_{0} I_{\mathrm{mc}}`

`B L =\mu_{0} I_{\mathrm{mc}}`

`I_{\mathrm{enc}} =\frac{B L}{\mu_{0}}`

Substitute the value of `B`

.

`I_{\mathrm{enc}}=\frac{\left(\mu_{0} n I\right) L}{\mu_{0}}`

`I_{\mathrm{mc}}=n \pi`

**E)**. The ampere's law is,

`\oint B \cdot d s =\mu_{0} I_{\mathrm{enc}}`

`B L =\mu_{0}(n I L)`

`B =\frac{\mu_{0} n I Z}{L^{\prime}}`

`B =\mu_{0} n I`