A very long cylinder of radius
Where
Find the magnetic field due to
Let's start by calculating the volume and surface currents due to
So
Similarly,
Where the negative sign comes from the orientation of that cross product.
We have cylindrical symmetry, so we can use Ampere's law. Inside, the current enclosed is:
So Ampere's law follows:
Now, if we are inside, the charge enclosed will be the total from inside (
So the total current enclosed is 0, meaning that outside