# A vector calculus question

I realize that this sounds like a physics question, but what I am stuck on is a mathematical issue, so I hope you won't mind me posting this question here.

I have a cylinder given by the equation $(x-l)^2+y^2\leq b$. There is a hollowed-out cylinder in it given by $x^2+y^2<a$. We are given that $l\in(0,b-a)$.

In the non-hollow region of the tube flows a current $I$. I wish to find the magnetic field in the hollow where the answer says that the magnetic field is uniform and its magnitude is proportional to $l\over (b^2+a^2)$.

I have previously found that the magnitudes of the magnetic fields at a point $(x,y)$ in the hollow are ${\mu_0I\over 2\pi b^2}\sqrt{(x+d)^2+y^2}$ and ${\mu_0I\over 2\pi a^2}\sqrt{x^2+y^2}$ respectively. And they are in the directions perpendicular to the vectors $(x+d,y)$ and $(x,y)$ respectively , and by the right hand rule, I believe they should be in the directions ${1\over \sqrt{(x+d)^2+y^2}}(y,-x-d)$ and ${1\over \sqrt{x^2+y^2}}(-y,x)$ respectively. It is clear from symmetry that the $\hat{x}$-component should be $0$, but I can't make it so. Also I can't get the right magnitude either. I think there is something wrong with the vectors I have found, but I really don't know what is wrong. Please help me :( Thank you.

-
After "I have previously found", you're suddenly talking about two different magnetic fields. What's up with that? – Henning Makholm Mar 1 '12 at 0:02
Also, if the answer is that the magnetic field inside is uniform, then the current in the pipe will have circle the pipe rather than flow along with it. Do you have an explicit specification of the direction of $I$? – Henning Makholm Mar 1 '12 at 0:06
@HenningMakholm: Sorry about the ambiguities. I am referring to the magnetic fields caused by the bigger cylinder and that caused by the smaller cylinder. We subtract the latter from the former when superposing the solutions. Nothing flows in the hollow, only in the region between $(x−l)^2+y^2=b$ and $x^2+y^2=a$. And the current flows in the $z$ direction. The magnetic field in the hollow should point in the $y$ direction due to symmetry... – Arghhhh Mar 1 '12 at 0:11
I think Henning's answer clears up most of the problems. It seems you've used $d$ instead of $l$ in the second part of the question. And the denominator in the result should be $b^2-a^2$, as in Henning's cross section, not $b^2+a^2$. – joriki Mar 1 '12 at 0:33
@joriki: Thank you! :) – Arghhhh Mar 1 '12 at 1:00

However, then you shouldn't be using the same current for the two cylinders. The given $I$ is the net current, which is originally distributed over a cross section of $\pi(b^2-a^2)$. This should not change when we plug the hole and calculate on cylinders with cross sections $\pi b^2$ and $\pi a^2$. So the current to use in the solid-cylinder formulas should be $\frac{b^2}{a^2-b^2}I$ and $\frac{a^2}{a^2-b^2}I$, respectively -- which happens to cancel out the cross sections in the denominators nicely.
Once that is done with, don't bother to separate the fields into magnitude and direction. The square roots will look ugly and just cancel out anyway. Just compute directly with vector-valued quantities proportional to $(-y,x)$ and $(-y,x+l)$ in Cartesian coordinates.