Re: Magnetic field for a straight conductor with finite

*To*: mathgroup at smc.vnet.net*Subject*: [mg91663] Re: [mg91660] Magnetic field for a straight conductor with finite*From*: "Curtis F. Osterhoudt" <cfo at lanl.gov>*Date*: Wed, 3 Sep 2008 06:44:56 -0400 (EDT)*References*: <200809021118.HAA09857@smc.vnet.net>*Reply-to*: cfo at lanl.gov

Hi, Robert, The imaginary parts of that first expression are easily taken care of: They refer to the imaginary parts of the coordinates x, y, and z, and since you're [presumably] working the problem in real space, those parts all go to zero. Thus, the general math has to be tweaked a little bit to get the specific physics. Once that is done (perhaps by having Mathematica evaluate Assuming[x\[Element]Reals && y\[Element]Reals && Im[z] ==0, Simplify[Re[sol1]]] ), you'll get the usual expression for the magnetic field due to an infinite, straight, steady current in free space. If you leave out the "GenerateConditions -> False" options, you'll get a more complicated expression, but it will reduce to the one you want with the "Assuming" line above, so long as either x or y are greater than zero. The same trick may be used to get your sol2, but you'll also have to eventually tell Mathematica that L>0. Hope that helps, C.O. P.S. It turns out to be a pretty interesting exercise to get that current to suddenly appear and disappear at the origin and L. Assuming conservation of charge and then splitting the wire into many at the ends so that the current density goes way down there is one (problematic) way. Another is to shield the ends (containing charge source and sink), where I think one finds that accelerating and decelerating charges leads to fun radiation problems. > I am trying to create a plot which shows the magnetic field around a > straight line of finite length. I started by looking online at Michael > Trott's Mathematica Guidebook for Numerics which gives an example of how > Mathematica can solve the Biot-Savart equation for the case of an infinite > line running along the Z-axis: > > infiniteWire[t_] = {0, 0, t}; > sol1 = Integrate[ > Cross[D[infiniteWire[t], t], {x, y, z} - infiniteWire[t]]/ > Norm[{x, y, z} - infiniteWire[t]]^3, {t, -Infinity, Infinity}, > GenerateConditions -> False] > > > However, if you evaluate the expression above using Mathematica 6 the > output is different to the book in that it includes Im[] terms. Can > someone explain why, and how do I get rid of them? I tried Re[] but result > is left unevaluated if expr is not a numeric quantity. Note I have used > the built in Norm[] function, not a user defined function like Michael. > > Ultimately, what I need is the solution for the Integral below: > > > sol2 = Integrate[ > Cross[D[infiniteWire[t], t], {x, y, z} - infiniteWire[t]]/ > Norm[{x, y, z} - infiniteWire[t]]^3, > {t, 0, L}, > GenerateConditions -> False] > > > This corresponds to the case where current flows in a straight line from > the origin in x-y-z space to a point at a distance L along the Z axis. > > > Robert > > > > >

**References**:**Magnetic field for a straight conductor with finite length - Biot-Savart Integral***From:*robert prince-wright <robertprincewright@yahoo.com>