Use Ampère's law:
http://en.wikipedia.org/wiki/Amp%C3%A8re's_circuital_law
2 pi r B(r) =
Integral from r' = 0 to r of
2 pi r' j(r') dr
A wire of radius R carries a non-uniform current: the current density, j, (current per unit area) varies as a function of distance r from the central axis of the wire according to j = j0(R/r) (and j = 0 outside the wire, of course). Find expressions for the strength of the magnetic field in the regions 0 < r < R and R < r.
2 answers
Typo:
2 pi r B(r) =
µ_0 Integral from r' = 0 to r of
2 pi r' j(r') dr
2 pi r B(r) =
µ_0 Integral from r' = 0 to r of
2 pi r' j(r') dr