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. 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.