2

The Biot-Savart law for the magnetic field at a point, r , in space due to a constant-current carrying conductor is given as :

$$\boldsymbol{B}(\boldsymbol{r}) = \frac{\mu_0}{4\pi}I\int_c \frac{d\boldsymbol{l}\times\hat{r'}}{r'^2}$$

($\boldsymbol{r'}$ is the vector from the position of $d\boldsymbol{l}$ to the point you are interested in ($\boldsymbol{r}$) ). The contour over which the integration takes place, is just the path the current is going i.e. along the conductor.

I want to use this definition to find the magnetic field produced by a circular wire at a point, p, along the central axis of the conductor which is at a distance, a, from the centre, using the component form of the vectors. I have been able to calculate $\boldsymbol{B}$ already using an alternative approach but when redoing the calculation in component form I run into trouble. I have two pictures below that will help :enter image description here enter image description here

In Cartesian coordinates, $d\boldsymbol{l} = \hat{x}dx + \hat{y}dy + \hat{z}dz$, and for integrating around the circular wire:

$$R^2 = x^2 + y^2 \rightarrow dy = - \frac{xdx}{\sqrt{R^2 - x^2}}$$

This gives

$$d\boldsymbol{l} = dx[-\hat{x} + \frac{x}{\sqrt{R^2 -x^2}}\hat{y} ]$$

For $0\le \phi \le \pi$

For $\pi \le \phi \le 2\pi$, I get

$$d\boldsymbol{l} = [\hat{x} + \frac{x}{\sqrt{R^2 -x^2}}\hat{y}]dx$$

Looking at the images, it can be seen that

$$\hat{r'} = \frac{1}{r'}[-R\cos{\phi}\hat{x} -R\sin{\phi}\hat{y} +a\hat{z}]$$

Plugging in results to Biot-Savart law and integrating from R to -R (counter-clockwise) and then from -R to R using dl for positive and negative y quadrants give me the incorrect results.

Do I have to be careful with the sine and cosine terms when integrating over the four quadrants, can I just replace the cosine and sine terms with $\frac{x}{R}$ and $\frac{\sqrt{R^2 - x^2}}{R}$?

Is the setup above correct (are my vectors correct)?

Is there Anything that needs to be done carefully?

1 Answers1

4

First I'm going to do the calculation in polar coordinates, because it is far easier to not make a mistake in this context. This will help reassure us that my calculation in Cartesian coordinates is valid.

$$d\vec{l} = R d\theta \Big( -\sin(\theta)\hat{x} + \cos(\theta)\hat{y} \Big)$$

$$ \hat{r}' = - \frac{R}{\sqrt{R^2+a^2}} \cos(\theta)\hat{x} - \frac{R}{\sqrt{R^2+a^2}} \sin(\theta) \hat{y} + \frac{a}{\sqrt{R^2+a^2}} \hat{z} $$

$$ d\vec{l}\times \hat{r}' = \left| \begin{array}{ccc} \ \hat{x} & \hat{y} & \hat{z} \\ -d\theta \ R\sin(\theta) & d\theta \ R\cos(\theta) & 0 \\ - \frac{R}{\sqrt{R^2+a^2}} \cos(\theta) & - \frac{R}{\sqrt{R^2+a^2}} \sin(\theta) & \frac{a}{\sqrt{R^2+a^2}} \end{array} \right|$$

$$ = \frac{1}{\sqrt{R^2+a^2}} d\theta \Big( Ra \cos(\theta)\hat{x} + Ra\sin(\theta) \hat{y} + R^2 \hat{z} \Big)$$

The magnetic field is then,

$$ \vec{B} = \frac{\mu_0 I }{4\pi} \int_{0}^{2\pi} \frac{ d\theta}{(R^2+a^2)^{3/2}} \Big( Ra \cos(\theta)\hat{x} + Ra\sin(\theta) \hat{y} + R^2 \hat{z} \Big)$$

$$ = \frac{\mu_0 I }{4\pi} \int_{0}^{2\pi} \frac{d\theta}{(R^2+a^2)^{3/2}} \Big( 0+0 + R^2 \hat{z} \Big)$$

$$ = \frac{\mu_0 I }{4\pi} \frac{2\pi}{(R^2+a^2)^{3/2}} \Big( R^2 \hat{z} \Big)$$

$$ = \frac{\mu_0 I }{2} \frac{R^2 }{(R^2+a^2)^{3/2}} \ \hat{z} $$


As you said the equation of the circle is $x^2+y^2=R^2$ which allows us to compute $d\vec{l}$ using derivatives.

$$d\vec{l} = dx \ \hat{x} + dy \ \hat{y} + 0 \ \hat{z} = dx \ \hat{x} + y'(x) dx \ \hat{y} + 0 \ \hat{z} = dx \ \hat{x} \mp \frac{x dx}{\sqrt{R^2-x^2}} \hat{y} + 0 \ \hat{z}$$

$$\boxed{ d\vec{l} = dx \ \Big( \hat{x} \mp \frac{x }{\sqrt{R^2-x^2}} \hat{y} + 0 \ \hat{z} \Big)}$$

Where the $-$ corresponds to $y>0$ and the $+$ corresponds to $y<0$.

Let the element of current be located at $(x,y(x),0)$ then the unit vector which points from \hat{r}' is given by,

$$ \boxed{\hat{r}' = \frac{-x \ \hat{x} \mp \sqrt{R^2-x^2} \ \hat{y} + a\hat{z}}{\sqrt{R^2+a^2}}} $$

where the $-$ corresponds to $y>0$ and the $+$ corresponds to $y<0$.

$$ d\vec{l} \times \hat{r}' = \left| \begin{array}{ccc} \ \hat{x} & \hat{y} & \hat{z} \\ dx & \mp \frac{x dx}{\sqrt{R^2-x^2}} & 0 \\ \frac{-x}{\sqrt{R^2+a^2}} & \mp \frac{\sqrt{R^2-x^2}}{\sqrt{R^2+a^2}} & \frac{a}{\sqrt{R^2+a^2}}\end{array} \right|$$

$$ = \hat{x}\Big(\mp \frac{x dx}{\sqrt{R^2-x^2}}\frac{a}{\sqrt{R^2+a^2}} - 0 \Big) - \hat{y}\Big( dx \ \frac{a}{\sqrt{R^2+a^2}} - 0 \Big) + \hat{z}\Big( \mp dx \frac{\sqrt{R^2-x^2}}{\sqrt{R^2+a^2}} \pm \frac{x dx}{\sqrt{R^2-x^2}} \frac{-x}{\sqrt{R^2+a^2}}\Big)$$

$$ \boxed{ d\vec{l} \times \hat{r}'= \mp \hat{x} \frac{xa dx}{\sqrt{R^2-x^2}\sqrt{R^2+a^2}} - \hat{y} \ \frac{a\ dx}{\sqrt{R^2+a^2}} \mp\hat{z} \ dx \frac{R^2}{\sqrt{R^2-x^2}\sqrt{R^2+a^2}} }$$

There will be two contributions to the magnetic field. One from the top semicircle and one from the bottom semicircle.

$$ \vec{B}_{top} = \frac{\mu_0 I}{4\pi} \frac{1}{R^2+a^2}\int_{R}^{-R} \Big(- \hat{x} \frac{xa dx}{\sqrt{R^2-x^2}\sqrt{R^2+a^2}} - \hat{y} \ \frac{a\ dx}{\sqrt{R^2+a^2}} -\hat{z} \ dx \frac{R^2}{\sqrt{R^2-x^2}\sqrt{R^2+a^2}} \Big) $$

$$= \frac{\mu_0 I}{4\pi} \frac{1}{R^2+a^2} \Big(0 - \hat{y} \ \frac{a\ (-2R)}{\sqrt{R^2+a^2}} - \hat{z} \ \frac{-\pi R^2}{\sqrt{R^2+a^2}}\Big) $$

$$= \frac{\mu_0 I}{4\pi} \frac{1}{R^2+a^2} \Big( \hat{y} \ \frac{2aR}{\sqrt{R^2+a^2}} +\hat{z} \ \frac{\pi R^2}{\sqrt{R^2+a^2}}\Big) $$

$$ \vec{B}_{bottom} = \frac{\mu_0 I}{4\pi} \frac{1}{R^2+a^2}\int_{R}^{-R} \Big( \hat{x} \frac{xa dx}{\sqrt{R^2-x^2}\sqrt{R^2+a^2}} - \hat{y} \ \frac{a\ dx}{\sqrt{R^2+a^2}} \hat{z} \ dx \frac{R^2}{\sqrt{R^2-x^2}\sqrt{R^2+a^2}} \Big) $$

$$ \vec{B}_{bottom} = \frac{\mu_0 I}{4\pi} \frac{1}{R^2+a^2} \Big(0 - \hat{y} \ \frac{2aR}{\sqrt{R^2+a^2}} +\hat{z} \ \frac{\pi R^2}{\sqrt{R^2+a^2}} \Big) $$

$$ \vec{B}_{bottom} = \frac{\mu_0 I}{4\pi} \frac{1}{R^2+a^2} \Big( \hat{y} \ \frac{-2aR}{\sqrt{R^2+a^2}} +\hat{z} \ \frac{\pi R^2}{\sqrt{R^2+a^2}} \Big) $$

And the complete magnetic field is,

$$\vec{B} = \vec{B}_{top}+\vec{B}_{bottom} $$

$$\vec{B} = \frac{\mu_0 I}{4\pi} \frac{1}{R^2+a^2} \Big( \ \frac{2\pi R^2}{\sqrt{R^2+a^2}} \Big)\ \hat{z} $$

$$\vec{B} = \frac{\mu_0 I}{2} \frac{R^2}{(R^2+a^2)^{3/2}} \ \hat{z} $$

Spencer
  • 12,271
  • Thanks very much, three things though. firstly, you forgot to reduce the power of R in the top polar integral in the Cartesian vector (should it not be $$(a\cos{\theta}\hat{x} + a\sin{\theta}\hat{y} + R\hat{z})$$. Second, what step did you take to get from $$(a\cos{\theta}\hat{x} + a\sin{\theta}\hat{y} + R\hat{z})$$ to $$(0 + 0 + R\hat{z})$$ in the next line? Thirdly, surely the minus (-) corresponds to $$x \lt 0$$ and the positive to $$x \gt 0$$ ? – user341469 Nov 01 '17 at 19:59
  • You are certainly correct about the first mistake. I actually double counted the R in dl. – Spencer Nov 01 '17 at 23:15
  • With regards to the second question. The integral of cosine and sine over one period is 0. – Spencer Nov 01 '17 at 23:15
  • With regards to the last question you have to clarify what you mean. I chose to break the circle in to two pieces based on the sign of the y-coordinate. You certainly have the freedom to break it differently, but I wouldn't reccomend it. When I solve for $y$ in $x^2+y^2=R^2$ I get a result which is $y=\pm \sqrt{R^2-x^2}$, this corresponds to the upper and lower halves of the circle. – Spencer Nov 01 '17 at 23:18
  • Ok, I am trying to reconcile your $d\boldsymbol{l}$ on my second picture. would your expression be in the opposite direction to how I have drawn mine then ? – user341469 Nov 02 '17 at 00:01
  • because for the $y\gt 0 $ case your expression gives a negative y component in $d\boldsymbol{l}$ when $x > 0$ – user341469 Nov 02 '17 at 00:03
  • That isn't quite right. Remember $dx$ also has a sign. When $y>0$ we integrate from $R$ to $-R$ which means the $dx<0$. – Spencer Nov 02 '17 at 00:05
  • got it, Thanks very much , so $dx$ on the bottom is positive and is negative on the top. These signs can get a bit confusing (: – user341469 Nov 02 '17 at 00:08
  • Yes they can be :). One way to get around it, if you like putting signs in by hand, is to always have your integration bounds go from the lower number to the higher number. – Spencer Nov 02 '17 at 00:15
  • What so instead of calculating $$\int_{R}^{-R}f(x)dx$$ , calculate $$-\int_{-R}^{R}f(x)dx$$ – user341469 Nov 02 '17 at 00:23
  • Yes, this makes the negative sign explicit. – Spencer Nov 02 '17 at 01:54