       Vector Analysis

• To: mathgroup at smc.vnet.net
• Subject: [mg15605] Vector Analysis
• Date: Thu, 28 Jan 1999 04:23:33 -0500 (EST)
• Organization: Deja News - The Leader in Internet Discussion
• Sender: owner-wri-mathgroup at wolfram.com

```I am using Mathematica Ver. 3 and am teaching a course in
Electromagnetism which relies heavily on the del operator.  The use of
the <<Calculus`VectorAnalysis` package has been quite useful as far as

However, in trying to confirm some often cited identities (see any book
on Electromagnetism) such as:

Grad[A.B] = Cross[A,Curl[B]] + Cross[B,Curl[A]] + (A.Del)B + (B.Del)A
where A and B are vectors with 3 components that are functions of
Cartesian components x, y and z.

I have not been able to come up with an elegant method for representing
things with the form of the last 2 terms, i.e. (A.Del)B.  I have used
the brute force method below:

a = {x,2 y, 3 z}
b = {3 y, -2 x,0}

adotdelb = {(a[]*D[b[],x] + a[]*D[b[],y] +
a[]*D[b[],z]),
(a[]*D[b[],x] + a[]*D[b[],y] + a[]*D[b[],z]),
(a[]*D[b[],x] + a[]*D[b[],y] + a[]*D[b[],z])}

Can anyone tell me a way of defining a function that I can input any 2
vectors and do this.  What I have in mind is something like