# Finite Solenoid (maybe?)

1. Jul 21, 2014

### physicsjones

1. The problem statement, all variables and given/known data
A cylindrical shell of radius a and length 2L is aligned around the z-axis from z= -L ot z = +L. A current I is distributed uniformly on the cylinder and moves around the cylinder's z-axis. Find the magnitude of the magnetic field at the origin.

2. Relevant equations
Biot-Savart Law $\vec{B} = \frac{\mu_0}{4 \pi} \int\frac{d\vec{I} \times \vec{r}}{r^2}$
Ampere's Law $\int \vec{B}\dot{} d\vec{l} = \mu_0 I_{enc}$

3. The attempt at a solution
I've tried this several different ways. First, I tried with ampere's law, the way you would with an infinte solenoid, but that doesn't work since the field isn't perpendicular/constant at the end pieces.

I then tried to use Biot-Savart, but may have done so incorrectly. I got $B = \frac{\mu_0 I}{4 \pi} 2 \pi \int\limits_{-L}^{L} \frac{a}{\sqrt{a^2+z^2}} dz$, which simplifies to (after some Mathematica) $\mu_0 I a \mathrm{arcsinh}(\frac{L}{x})$, which isn't able to be evaluated at the origin. So I'm stuck.

I've looked at answers like the one given at http://www.phys.uri.edu/~gerhard/PHY204/tsl215.pdf, but have difficulty following and translating them to my problem.

2. Jul 22, 2014

### Simon Bridge

Have you tried dividing the cylinder into loops width dz with current dI?

3. Jul 22, 2014

### physicsjones

Just tried it now
Using Griffith's formula for on-axis field from a current loop (example 5.6 3rd edition)
$B(z) = \frac{\mu_0 I}{2} \frac{a^2}{(a^2+z^2)^{3/2}}$

I integrate this with respect to z from -L to L and the result is $\frac{\mu_0 I L}{\sqrt{a^2+L^2}}$
Seem reasonable?

4. Jul 22, 2014

### Simon Bridge

That sounds reasonable - though I havn't done the maths myself.
The result should be less than if the entire current were in a single loop...

how does it compare to a solenoid with N turns and current I?

5. Jul 23, 2014

### physicsjones

Usually a solenoid has field $\frac{\mu_0 N I}{L}$.
I think that means the units are off in my solution since I essentially have units of $\mu_0 I$ and those are of $\frac{\mu_0 I}{L}$.
I just double checked the integral, and that was evaluated correctly, which means I set it up incorrectly.

I tried it again by by taking the derivative of the above formula to get an expression for dB, and integrating across z, the same as plugging in L and -L to the formula above. Since the only z is squared, this gives 0.

That actually makes so much sense. Since we're at the center of a finite line, the fields from each "ring" are going in opposite directions.

6. Jul 23, 2014

### Simon Bridge

If the currents are going anticlockwise (viewed looking down the z axis) then field along the z axis due to the ring of current dI radius a at position z (between z and z+dz) is pointing in the +z direction, whether z is above or below the origin. Sketch the picture to see.
http://hyperphysics.phy-astr.gsu.edu/hbase/magnetic/curloo.html
$$\vec B = B\hat k\\ dB = \frac{\mu_0}{4\pi}\frac{2\pi a^2 dI}{(z^2+a^2)^{3/2}}=\frac{\mu_0 I}{4L}\frac{a^2 dz}{(z^2+a^2)^{3/2}}$$... or something.
The difference between the cylinder of current and the solenoid is how the current is distributed.

7. Jul 23, 2014

### vanhees71

I don't know, what you are calculating. Just use the Biot-Savart Law, of which the notation you wrote in your first posting also doesn't make sense at all.

You need the current density, which is obviously given (in cylinder coordinates) as
$$\vec{j}=\frac{I}{2L} \delta(\rho-R) \vec{e}_{\varphi} \Theta(-L<z<L).$$
$$\vec{B}(\vec{r})=\frac{\mu_0}{4 \pi} \int_{\mathbb{R}^3} \mathrm{d}^3 \vec{r}' \vec{j}(\vec{r}') \times \frac{\vec{r}-\vec{r}'}{|\vec{r}-\vec{r}'|^3}.$$
Just evaluate the integral for $\vec{r}=z \vec{e}_z$! Be aware that the cylinder-coordinate-unit vectors depend on the position. So it's save to rewrite everything in terms of Cartesian components before doing the integral!