My professor had an example in class the other day where we had an infinite line of current uniformly distributed over a circular wire with radius R. He wanted to look at the energy of the B field produced by this current. He did the normal thing and integrated 1/2u*B^2 over all space. It obviously diverges since it is an infinite wire. But the interesting thing is that it also diverges if you look the energy per unit length. (it ends up being some constants *(ln infinite - lnR) for the energy of the field outside the wire) My intuition (which is often not right) felt that it shouldn't be infinite per unit length. I looked at how Griffiths derived the B^2 energy equation and it looks like it uses the assumption that the surface integral of AXB goes to zero as the radius of the surface goes to infinite... I have two big questions: 1) which formula for energy of a mag field is more fundamentally right? (less assumptions about the nature of the problem) (my proff said the 1/2u*B^2 is most fundamental but it seems like all the proofs i can find do integration by parts and assume the surface integral goes to zero as space goes to infinite to get that equation) 2) When you solve for A you get an integration constant in both parts. (inside and outside the wire) How do you decide what the integration 2nd constant should be? Obviously A needs to be continuous a have a continuous derivative (since there are no surface currents) over all space. The 2 functions I got for A were an S^2 function and an ln(s) function The functions as calculated I had 2 constants and one boundary condition A (must be continuous) so there is another constant that we cant calculate. In electrostatics we often say V=0 at the surface for a problem like this but since A does not have much of a physical meaning. This A constant DOES matter though because of the equation W=.5*(intigral of A*J over all space) (Griffiths 7.31 pg 318) . J is our current density so it is constant and 0 outside of R. But if A has an arbitrary integration constant this integral is completely dependent on that constant which makes no sense since there would be different amounts of energy depending on an arbitrary integration constant. Also I may as well show my equations for A and B: u=mu not I= total current R=Radius of wire s is the radius for cylindrical coordinates C1 and C2 are the integration constants was asking about Inside: A =-u*I*s^2/(4*pi*R^2)+C1 in the Z direction (assuming current is flowing up) B = u*s*I/(2*pi*R^2) in the phi direction Outside: A = -u*I*ln(s)/(2*pi)+C2 in the z direction B = u*I/(2*pi*s) in the phi direction I hope that was reasonably clear..... Thanks in advance for the help!