# Magnetic Field due to Solenoid

1. Mar 7, 2014

### KracniyMyedved

1. The problem statement, all variables and given/known data
A solenoid of length L and radius R lies on the y-axis between y=0 and y=L and contains N closely spaced turns carrying a steady current I. Find the magnetic field at a point along the axis as a function of distance a from the end of the solenoid.

2. Relevant equations
Magnetic field on the axis (distance x from center) due to a current carrying ring : $\vec{B}= \frac{\mu_o I R^2}{2(R^2 +x^2)^{3/2}}$
Biot-Savart Law: $\vec{B}=\frac{\mu_o I}{4\pi} \int_A^B \frac{\vec{ds}\mathbf{x}\vec{r}}{r^3}$

3. The attempt at a solution
My best attempt is based around modelling the solenoid as a collection of current carrying rings covering a distance of L.

$\vec{B}= \frac{\mu_o I R^2}{2(R^2 +x^2)^{3/2}}$ for each ring of current

$\vec{B}= \int_{l+a}^a \frac{\mu_o I R^2}{2(R^2 +x^2)^{3/2}}dx$

$\vec{B}= \frac{\mu_o I R^2}{2} \int_{l+a}^a \frac{dx}{(R^2 +x^2)^{3/2}}$

Integrating via trig substitution, using x = Rtanθ, which implies $dx=Rsec^2 θ dθ$ and $(R^2 + x^2)^{3/2}=R^3 sec^3 θ$

$\vec{B}= \frac{\mu_o I R^2}{2} \int_{x=l+a}^{x=a} \frac{Rsec^2 \theta d\theta}{R^3 sec^3 \theta}$

$\vec{B}= \frac{\mu_o I}{2} \int_{x=l+a}^{x=a} \frac{d\theta}{sec\theta}$

$\vec{B}= \frac{\mu_o I}{2} \int_{x=l+a}^{x=a} cos\theta d\theta$

$\vec{B}= \frac{\mu_o I}{2} sin\theta$ for x from x=l+a to x=a

Constructing a triangle from the substitution lets us find $sin\theta$ in terms of R and x:
$sin\theta = \frac{x}{(x^2 + R^2)^{1/2}}$

Finally,

$\vec{B}= \frac{\mu_o I}{2}(\frac{a}{(a^2+R^2)^{1/2}} - \frac{l+a}{((l+a)^2 +R^2)^{1/2}})$

I'm reasonably sure this is wrong because the next part of the question implies a dependence on N, as well I think my modelling the solenoid as I did was a bit shaky, but I cannot think of another way to go about this.

Last edited: Mar 7, 2014
2. Mar 8, 2014

### Simon Bridge

Well you should expect a dependence on N wouldn;t you? After all, the field due to 2 loops must be different from the field due to 1 loop right?

This is a standard problem - so you could just look it up and see how other people approach it.
i.e. http://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/solenoid.html

3. Mar 8, 2014

### PhysicoRaj

What you are actually doing here is integrating the field due to small section of the solenoid of length dx (which you later substitute the limits for the length of the solenoid) which is not necessarily a single loop, but consists of ndx loops, n being the loops per unit length.