# Magnetic field of an n-side regular polygon

I tried to calculate the magnetic field due to a n-side regular polygon (with $R$ as a "radius" of the polygon, that is, $R$ is the perpendicular distance from the center of polygon to a side), a distance $z$ above its center, so this is that I did:
Because I can see the loop as an infinite wire, first I calculated the magnetic fiel of a infinite wire as follows:
I put the wire lying on the $x$-axis at a distance $R$ from the origin, as in the figure but in my case point P is at a distance $z$ above $xy$-plane and I found, using Biot-Savart Law, $$\vec{B}=\frac{\mu_{0}I}{4\pi}\frac{(\sin\theta_{2}-\sin\theta_{1})}{\sqrt{z^{2}+R^{2}}}\hat{z}$$ for a segment of infinite wire, where $\theta_{1}$ and $\theta_{2}$ are the angles that position vector travel along the segment. It is clear for the whole wire $\theta_{2}=\pi/2$ and $\theta_{1}=-\pi/2$.
So if the polygon has $n$ sides I'll have $n$ contributions like these but the angles are $\theta_{2}=2\pi/n$ and $\theta_{1}=0$ then $$\vec{B}_{pol}=\frac{n\mu_{0}I}{4\pi}\frac{\sin(\frac{2\pi}{n})}{\sqrt{z^{2}+R^{2}}}\hat{z}$$ This expresion gives the correct result but if a want to check the limit $n\rightarrow\infty$ it must give me the magnetic field due to a circular loop, but it doesn't happen. Then, the correct expresion has a $\frac{R^{2}}{(z^{2}+R^{2})^{3/2}}$ but I don't know how to obtain this. I'll leave some images as an example.

• I've added the homework-and-exercises tag. In the future, please use that tag on this type of question.
– user4552
Commented May 9, 2018 at 3:29

Suppose we consider the magnetic field due to an $n$-sided polygon of radius $R$ carrying a current $I$. We orient our frame such that a magnetic field out of the page is in the $+z$-direction, and therefore a counter-clockwise current is a positive one.

First, we need to calculate the length of the wire from the information we have. An $n$-sided polygon can be divided into $n$ slices (like a pizza), so the central angle of a side is $2\pi \over n$. We can bisect it and draw the following picture: Therefore we know the following: $$\frac{L/2}{R} = \tan(\frac{\pi}{n})$$ where $L$ is the side length, represented by the bottom line in the picture. Therefore, we know: $$L = 2R\tan(\frac{\pi}{n})$$

Due to the symmetry of the shape, each side will contribute equally, and so your total magnetic field will have $n$ contributions of a wire of length $L$. The magnetic field at a point located a distance $z$ above the origin due to a wire of length $L$ located a distance $R$ from the origin in the $xy$-plane can be found via the Biot-Savart Law. The distance from the side of the shape to the point $P$ is $\sqrt{R^2 + z^2}$, so the Biot-Savart Law tells us that the magnitude of the magnetic field is: $$B =\frac{\mu_0 I}{4\pi}\frac{L}{\sqrt{R^2 + z^2}\sqrt{R^2 + z^2 + (L/2)^2}}$$ This magnetic field is pointing perpendicular to the line from $P$ to the center of the side. Since all the sides will sum, the component in the $xy$-plane will cancel out, and we can find the contribution in the $z$-direction.

It can be shown that the angle between $\vec{B}$ and $\vec{B_z}$ is the same as the angle opposite $z$. The magnitude of $\vec{B_z}$ is therefore just the magnitude of $\vec{B}$ times the cosine of this angle, which from analyzing the diagram, is also equal to $\frac{R}{\sqrt{z^2+R^2}}$. Therefore:

$$B_z = \frac{n\mu_0 I}{4\pi}\frac{L}{\sqrt{R^2 + z^2}\sqrt{R^2 + z^2 + (L/2)^2}}\frac{R}{\sqrt{z^2+R^2}}$$

$$= \frac{n\mu_0 I}{4\pi}\frac{LR}{(R^2 + z^2)\sqrt{R^2 + z^2 + (L/2)^2}}$$

Substituting for L:

$$=\frac{n\mu_0 I}{4\pi}\frac{2R\tan(\frac{\pi}{n})R}{(R^2 + z^2)\sqrt{R^2 + z^2 + (2R\tan(\frac{\pi}{n})/2)^2}}$$

$$=\frac{n\mu_0 I}{4\pi}\frac{2R^2\tan(\frac{\pi}{n})}{(R^2 + z^2)\sqrt{R^2 + z^2 + (R\tan(\frac{\pi}{n}))^2}}$$

Taking the limit of this as $n \rightarrow \infty$ using Mathematica:

Which is the formula for the magnetic field located at a point of distance $z$ above the origin due to a circular loop of radius $R$ centered at the origin in the $xy$-plane.

• When you put the magnitude of the magnetic fiel, why do you have a $\frac{1}{\sqrt{R^{2}+z^{2}}}$? I think should be $\frac{L/2}{\sqrt{R^{2}+z^{2}}}$ Commented May 9, 2018 at 5:47
• The solution to the Biot-Savart Law for the magnetic field at a point located a distance $x$ from the center of a current-carrying segment of length $2a$ is $\frac{\mu I}{4\pi}\frac{2a}{x\sqrt{x^2 + a^2}}$. I took this from Young and Freedman's "University Physics" (14 ed., p. 927) but you can prove it yourself if you wish. You then simply evaluate this expression for $a \rightarrow \frac{L}{2}$ and $x \rightarrow \sqrt{R^2 + z^2}$ Commented May 9, 2018 at 5:53
• I've got it! I made a mistake in the calculation, thanks! Commented May 9, 2018 at 6:05
• No problem! If my answer helped you please consider accepting it as an answer. Commented May 9, 2018 at 6:05