MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Curl


Hi,

curl include a cross product.
The cross product is
written with the  epsilon[] tensor,

Sum[epsilon[i,j,k] D[f[j],x[k]],j,k]

The epsilon tensor is 1 for an
even permutation of {i,j,k} and -1 for an odd permutation
of {i,j,k} and zero otherwise.  In three dimensions this
gives just a three dimensional vector. In higher dimensions
you get tensors of higher rank.

In Mathematica you can define 

epsilon[index__Integer] := Signature[{index}]

dpos[i_, n_] := Table[If[k == i, 1, 0], {k, n}]

CurlN[f_, x_, n_Integer] :=
  Module[{index, run},
     index = {Sequence @@ Table[Unique[], {n - 2}], j, k}; 
    run = {#, n} & /@ Drop[index, -2];
    Table[
      Sum[epsilon[Sequence  @@ index]Derivative[f[j]][Sequence @@
dpos[k, n]][
            x], {j, n}, {k, n}], Evaluate[Sequence @@ run]]
    ]

that gives for n=3 the usual curl but for higher dimensions  n you 
get a tensor of rank n-2.

Regards
  Jens


Carlo Gabrieli wrote:
> 
> Hi,
> I found on Roman Maeder "Computer Science with Mathematica" elegant
> implementations of Grad, Div, Laplacian, Jacobian but not of Curl. I
> know that the Mathematica package VectorAnalysis has a Curl function
> but I'd like to learn how to implement a Curl function for an
> arbitrary number of Cartesian coordinates
> 
> Thanks in advance to all
> Best Regards
> Carlo Gabrieli


  • Prev by Date: Point Size and Plot Symbols
  • Next by Date: Re: a problem with taylors expansion
  • Previous by thread: Curl
  • Next by thread: Re: Curl