# Homework Help: Magnetic field in a cavity

1. Feb 29, 2012

### c299792458

1. The problem statement, all variables and given/known data
We are given an infinitely long cylinder of radius b with an empty cylinder (not coaxial) cut out of it, of radius a. The system carries a steady current (direction along the cylinders) of size I. I am trying to find the magnetic field at a point in the hollow. I am told that the answer is that the magnetic field is uniform throughout the cavity. and is proportional to $d\over b^2-a^2$ where $d$ is the distance between the centers of the cylinders.

3. The attempt at a solution

I have found by using Ampere's law that the magnetic field at a point at distance r from the axis in a cylinder of radius R carrying a steady current, I, is given by $\mu_0 I r\over 2\pi R^2$. So I thought I would use superposition. But what I get is ${\mu_0 I \sqrt{(x-d)^2+y^2}\over 2\pi b^2}-{\mu_0 I \sqrt{(x)^2+y^2}\over 2\pi a^2}$. However this is not the given answer!

2. Feb 29, 2012

### M Quack

You are on the right track, but you have to superpose the magnetic field vectors.

3. Feb 29, 2012

### c299792458

@M Quack: Thank you. I don't know how to change these into vectors, could you please kindly give me another nudge? Thanks again.

4. Feb 29, 2012

### M Quack

The magnetic field generated by a long wire goes right around the wire. So it is perpendicular to the raidal vector.

If the wire is along (0,0,z) and your point at (x,y,z), you know that B_z=0 and that
B is perpendicular to (x,y,0). What vector has these properties?