## Finding the B field in a long cylindrical hole in a long wire

So, I'm trying this problem and just want to make sure my attack is correct. We have an infinitely long cylindrical hole in an infinitely long cylindrical wire, like in this picture:

(Here, they call the radius of the hole 'a'. I'm going to call it r.)

There's an electric current I in the wire and the current density is uniform. I want to find the B field anywhere in the cavity. First, I find J, the current density:

$J = \frac{I}{\pi (R^2 - r^2)}$

So, the step I'm most worried about is this: I want to find the vector potential A in the hole, but it's pretty hard to integrate around a hole. So I'm going to find the vector potential due to the whole cylinder (as if there were no hole), and then the vector potential due to a current of the same density going through the hole, and then subtract the latter from the former (because it's just a superposition, like electric potential, right?).

I'm doing this in polar coordinates, where the z axis goes along the center of the wire. So, typically you have to integrate over a volume to get A, but we don't actually care about the z direction here, so we just integrate it from 0 to z, and it should cancel out at the end:

$\vec{A}(\vec{x}) = Jz \int_0^R r'dr' \int_0^{2\pi} d\phi' \frac{1}{\left|\vec{x} - \vec{x'}\right|}$

So, I say that our observation point $\vec{x}$ is (x,0,z), and the point $\vec{x'}$ we're integrating at is (x',y',z). Then, in polar coordinates, we have $\vec{x'} = (r'cos(\phi'),r'sin(\phi'),z)$. Plugging this in, I get:

$\vec{A}(\vec{x}) = Jz \int_0^R r'dr' \int_0^{2\pi} d\phi' \frac{1}{\sqrt{(x - r'cos(\phi'))^2 + (r'sin(\phi'))^2}} = Jz \int_0^R r'dr' \int_0^{2\pi} d\phi' \frac{1}{\sqrt{x^2 -2xr'cos(\phi') + r'^2}}$

Now, I integrate. I actually first integrate over r'. I do a kind of completing the square thing in the denominator, and then integrate:

$\vec{A}(\vec{x}) = Jz \int_0^R r'dr' \int_0^{2\pi} d\phi' \frac{1}{\sqrt{(r' - cos(\phi'))^2 + x^2sin^2(\phi')}}$

I integrated this in wolfram, and it simplifies a little. But now I have to integrate over phi, and it gives me an elliptic integral of the first kind. Academia has ruined me so I get afraid when an answer doesn't boil down to three terms or less, so I'm just wondering if this seems right or not.

Also, is my general idea a good one or is there a much easier way?

Thanks!!
 So, it has been pointed out to me that I am functionally retarded: You use the premise I'm using (subtracting the current due to a cylinder in place of the hole), but you don't do the whole silliness with the vector potential. Because you're calculating them separately, you can just use Ampere's law. Yayyy, I'm stupid.