# Components of a magnetic field in a uniform wire

by ItsFootballNo
Tags: ampere's law, magnetic field, wire
 P: 5 1. The problem statement, all variables and given/known data A straight wire, of current I, radius a is centred at (α,β). What are the x and y components of the magnetic field B inside one of the wires? 2. Relevant equations ∮B.dl = μ I_enc ∫∫J.dS = I 3. The attempt at a solution Any point (x,y) in the wire has a constant current density J. Hence: ∫∫J.dS = J pi r^2 = J pi ((x-α)^2 + (y-β)^2) The wire has total current I and the current density J is uniform, hence: J = I / (pi a^2) Therefore: I_enc = ∫∫J.dS = I ((x-α)^2 + (y-β)^2)/a^2 Therefore: ∮B.dl = μ I ((x-α)^2 + (y-β)^2)/a^2 It is from here that I get stuck, mostly how to evalutate the integral without it becoming one big equation without staying in its components. If I was just looking at magnitude of the magnetic field, I know we could show: ∮B.dl = B (2 pi r) => B = μ I r / (2 pi a^2) But looking at the answers, just the y component comes out as: B_y = μ I (x-α) / (2 pi a^2) - μ I x / (2 pi [(x+α)^2 + (y+β)^2]) Am I going about this the wrong way or are there any tips on how to get to the next step? Any help is greatly appreciated!
Emeritus