# Magnetic field

1. Aug 10, 2009

### iontail

1. The problem statement, all variables and given/known data

the current density is given by J(p) = (I/pi) * p^2 * e^(-p^2) in z direction
The question is to first show that the cureent flowing through the wire is 'I' and then to find then to find the B field.

2. Relevant equations

stokes theorem.
integral of B.dl = I

I = J.dS

3. The attempt at a solution

i can find the magnetic field. however i am stuck on the first part that requires me to proof the total current is I.
I set up the problem in cylindrical coordinates and tired the double integration between 0 to 2pi and o to a(arbitsry distance) however this does not give the correct result. plese point me in the right direction

Last edited: Aug 10, 2009
2. Aug 10, 2009

### alphysicist

Hi iontail,

Can you verify your equation? You have:

J(p) = (I/pi) * p^2 * e^(-x^2)

Is that supposed to be p^2 in the exponential instead of x^2? Also, can you show your work for the integration?

3. Aug 10, 2009

### iontail

sorry about that it is supposed to b p^2, a typo. I tried integrating by parts on the ,p, terms and using the cylindrical coordinates formula for for dS. I get e^-p(p+3) as result

4. Aug 10, 2009

### iontail

i updated the question as well

5. Aug 10, 2009

### alphysicist

I don't believe the integral should be cut off at an arbitrary limit (like you are doing with the quantity a); instead the radial varible p should be integrated from 0 to infinity. If you are still getting the wrong answer, please post the integration steps you are taking.