# Homework Help: Magnetic field of an infinite cyliner of fixed magnetization

1. Oct 6, 2008

### insynC

I'm taking a second year undergraduate course in electromagnetism and have a question that has arisen in the course of my studies.

I'm normally reluctant to seek help on such matters, but this question has caused me a lot of grief.

The question is as follows:

An infinitely long cylinder, radius R, has a fixed magnetization, parallel to the cylinder axis: $$\vec{M}$$ = kr $$\hat{z}$$ , where k is a constant, and r is the distance from the axis of the cylinder (the z-axis).

(a) Determine the bound volume currents and bound surface currents, and hence determine the magnetic field inside and outside the cylinder.

(b) Use Ampere's Law (for H and then determine B) to check the result of part (a).

Attempted solution:

In approaching (a) I reckon the right way is to use the following expression for the magnetic potential, which is derived from the most general expression:

A = (\mu)/(4\pi)*(integral(dV curl(M)/R) + integral(dV M\timesdS/R))

This is because the volume current is in the first integral and the surface current in the second.

I can determine R using a diagram of the cylinder, and by using cylindrical coordinate expressions I can convert everything into seemingly only an integral problem. Nonetheless my integrals keep diverging because of the integral over all z in both terms.

A possible way around this I thought was to integrate A from -z to z, and set the limit as z goes to infinity and then find B=curl(A), hoping the z's would disappear. No such luck and I'm rather stumped as to how to figure this out.

Ran into same integration problems in (b).

I'm sure the problem lies in a misunderstanding of the setup of the problem - I've found setting up the integrals in this electromag course to be very challenging.

Thanks to anyone who can help.

Last edited: Oct 6, 2008
2. Oct 6, 2008

### granpa

if M isnt the current and isnt the field then what is it? what does z hat stand for?

3. Oct 6, 2008

### gabbagabbahey

@ granpa, $\vec{M}$ is the magnetization and $\hat{z}$ is the unit vector pointing in the z-direction.

@insync, Start with your expressions for the volume current and surface current, what do you get? What expression are you using for R?

4. Oct 6, 2008

### granpa

Magnetic moment can be visualized as a bar magnet which has magnetic poles of equal magnitude but opposite polarity. Each pole is the source of magnetic force which weakens with distance. Since magnetic poles always come in pairs, their forces partially cancel each other because while one pole pulls, the other repels. This cancellation is greatest when the poles are close to each other i.e. when the bar magnet is short. The magnetic force produced by a bar magnet, at a given point in space, therefore depends on two factors: on both the strength p of its poles, and on the distance d separating them. The force is proportional to the product \vec{\mu}=\mathbf{p}\mathbf{d}, where \vec{\mu} describes the "magnetic moment" or "dipole moment" of the magnet along a distance R and its direction as the angle between R and the axis of the bar magnet. These equations are completely analogous to the case of electric dipole moment.

so is it an infinitely small dipole (made of magnetic hypothetical monopoles) or an infinitely small current loop?

edit:its a loop

Last edited: Oct 7, 2008
5. Oct 6, 2008

6. Oct 7, 2008

### insynC

gabbagabbahey - upon reflection I can see that since R is defined as the radius of the cylinder in the question, it was poor notation for me to also use it in my expression for A. I'll refer to the R in the expression for A as r''. Clearly r'' is the magnitude of the distance from either a differential volume or surface element to the point of interest, where A is measured.

To be honest I'm not exactly sure how to express r''. Initially I considered a 2-dimensional cross section of the cylinder looking at the distance from point A, say (r, $$\phi$$, z) to a point dS or dV, say (r', $$\phi$$', z'). From that I could quite simply see:

|r''|^2=(r-r')^2 + (z-z')^2

But I'm pretty sure this is incorrect as I think r'' should also depend on $$\phi$$. I'm really struggling in picturing how to set up this integral.

Granpa - thanks for the expressions, though I didn't have any difficulty determining the bound and volume currents from the expression for the magnetisation.

I found the surface current density to be: kr$$\hat{}\phi$$ and the volume current density to be -k$$\hat{}\phi$$.

I'm pretty sure because of this precursor to the question, the way to find B is by using the expression for A I referred to in my original post. Furthermore it's an expression I've found in nearly all textbooks on electromagnetism - e.g. Jackson 3rd ed, bottom of page 197.

What is causing me grief is using my knowledge of the geometry of the situation to convert this expression into an integral that can be determined without diverging.

7. Oct 7, 2008

### granpa

you know the field outside the cylinder will be zero, right?

8. Oct 7, 2008

### gabbagabbahey

insync, let's start with the volume terms; your expressions for r'' and $\vec{J}_b$ look good to me. However, your volume integral shouldn't diverge; are you treating $\hat{\phi}$ as a constant?

9. Oct 7, 2008

### insynC

Inasmuch as you can approximate the infinite cylinder as an infinite solenoid I was certainly expecting B=0 for r>R. Nonetheless I was more hoping that by setting up the integral correctly, results like this would fall out of the mathematics rather than trying to justify them heuristically.

I'm pretty sure that if I can work out r'' (distance from infinitesimal volume/surface element to point where A is measured) the problem will be resolved. Trying to determine it in terms of (r, phi, z) though is proving difficult.

10. Oct 7, 2008

### insynC

gabbagabbahey - initially I was treating $$\vec{}\phi$$ as constant and said |r''|^2=(r-r')^2 + (z-z')^2. But I now think this is wrong, as $$\vec{}\phi$$ changes for different values inside the volume/on surface, so will change over integral. I'm currently trying to determine how I can resolve this, but no luck yet.

11. Oct 7, 2008

### gabbagabbahey

Express it in terms of the Cartesian unit vectors, which are always constant (cylindrical and spherical unit vectors vary with position and shouldn't be treated as constants when integrating)

12. Oct 7, 2008

### granpa

am I correct in believing that the current flowing around the center is constant at every distance from the center and that the surface current is in the opposite direction and equal to all the other currents combined?

13. Oct 7, 2008

### gabbagabbahey

granpa, yes, you are; but that only tells you that the field outside is zero, it doesn't give you the field inside the cylinder.

14. Oct 7, 2008

### insynC

Thanks for you help so far gabbagabbahey, I've certainly made progress. I've hit another snag though:

I firstly considered the cylinder in the r/phi plane (so cross section is a circle) with an arbitrary point for A and an arbitrary point for dV. Then I set up Cartesian coordinates so that A lay on the y axis and the x axis was orthogonal. I measured phi from the y axis around to the radius from the center to dV. I could then see that:

$$\hat{}\phi$$ = sin($$\phi$$) $$\hat{}y$$ - cos($$\phi$$) $$\hat{}x$$

If |O to dV| = r', and |OA| = r, I could also see:

|dV to A|^2 = r^2 + (r')^2 - 2rr'cos($$\phi$$) , by the cosine rule.

Then considering the cylinder in the r/z plane I could see the full distance from dV to A, r'' is given by:

|r''|^2 = (z-z')^2 + r^2 + (r')^2) - 2rr'cos($$\phi$$)

I'm just trying to work out the volume integral at the moment, so I subbed in all these values into the integral. I ran into the integral:

integral(cos($$\phi$$)/SQRT(a-2bcos($$\phi$$))d$$\phi$$) , for constants a & b (they involve z and r).

I couldn't solve this integral, I might try integrating wrt to r first.

Am I on the right track? At least now I'm integrating with vector x & y, so it makes more sense in that way.

15. Oct 7, 2008

### gabbagabbahey

Your original expression for r'' was correct; a simple vector subtraction gives

$$\vec{r}''=\vec{r}-\vec{r'}=(r\hat{r}+z\hat{z})-(r'\hat{r}+z'\hat{z})=(r-r')\hat{r}+(z-z')\hat{z}$$

the cylindrical unit vector $\hat{r}$ is perpendicular to $\hat{z}$, so

$$r''=\sqrt{\vec{r} \cdot \vec{r}}=\sqrt{(r-r')^2+(z-z')^2}$$

Your expression for $$\hat{\phi}$$ is correct; but what happens when you integrate $sin(\phi)$ or $cos(\phi)$ from 0 to 2pi?

16. Oct 7, 2008

### insynC

If I take:

r'' = SQRT( (z-z')^2 + (r-r')^2 )

Then when I integrate the sin and cos components from 0 to 2pi, as you suggest, I will get 0. I feel it hard to believe that the answer is in fact A = 0 everywhere, so there must then be another phi dependence somewhere. If it is not in r'', then I'm not really sure where it is coming in from.

17. Oct 7, 2008

### gabbagabbahey

Actually, I'm pretty sure that it is zero everywhere for the specified magnetization. Of course, you can check this using Ampere's Law in part (b).

18. Oct 7, 2008

### insynC

Fair enough, I guess I just need to trust the maths is right - which it seems to be. I'll have a look at (b) to see if I can confirm this.

19. Oct 7, 2008

### gabbagabbahey

Yes, for a finite cylinder, it wouldn't necessarily be zero because you would have to add the surface terms at the ends of the cylinder. But for the infinite cylinder, I think it is zero.

20. Oct 7, 2008

### granpa

normally you think of the field as decreasing as a function of distance from the wire but in the case of an infinite solenoid, due to the symmetry of the situation, the external field due to the current on each side would be inversely proportional to distance from the center. and of course equal and opposite to each other.

thats weird

Last edited: Oct 7, 2008