Re: Linear integral along a given curve.
- To: mathgroup at smc.vnet.net
- Subject: [mg44495] Re: Linear integral along a given curve.
- From: "Peltio" <peltio at twilight.zone>
- Date: Wed, 12 Nov 2003 08:01:46 -0500 (EST)
- References: <bk9iia$t4b$1@smc.vnet.net>
- Reply-to: "Peltio" <peltioNOSP at Miname.com.invalid>
- Sender: owner-wri-mathgroup at wolfram.com
(I am sending this again since it did not show up to the group - I've
noticed that since I've changed provider I forgot to add a valid (though
munged) e-mail address in reply-to, maybe that was the problem)
"Jun Lin" wrote
>Hi Everybody, I've just realized that I can't find any example of the
>linear integral along a given or fixed curve. Does anyone have
>experience of doing linear integral with Mathematica? Thanks.
You might want to have a look at Bahder's "Mathematica for scientists and
engineers" (a little bit outdated since it refers to version 2, but one of
the best introductions to 'Mathematica thinking' I've ever read [*]).
There you will find the following function
LineIntegrate[
f:Literal[ _ Dt[_] | Plus[(_ Dt[_])..] ],
path:{__Equal}, params:{t_,_,_},
vars:{__} ] :=
Integrate[
f /. First[Solve[path, vars]] /. Dt[t] -> 1, params] /;
Length[path] === Length[vars]
which should answer your needs as long as Solve can find a solution.
For example the work made by a charge Q in the field generatet by
a charge q
Ef = -1/(4*Pi*e0)*q/(x^2 + y^2 + z^2)*({x, y, z}/Sqrt[x^2 + y^2 + z^2])
while moving along an elicoidal path described by the parametric equations
x == Cos[u],
y == Sin[u],
z == 1 + 3 u/(2 Pi)
0 <= u <= 2 Pi
can be found in this way:
dl = Dt /@ {x, y, z};
F = Q Ef //Expand;
LineIntegrate[F . dl ,
{x == Cos[u], y == Sin[u], z == 1 + 3*(u/(2*Pi))}, {u, 0, 2*Pi},
{x, y, z}
]
cheers,
Peltio
invalid address in reply-to. demunging required to e-mail me
[*] I wonder whether there will be a second edition. It'd be a must have.