RE: Re: RE: Re: Dot Product in Cylindrical Coordinates

• To: mathgroup at smc.vnet.net
• Subject: [mg69362] RE: [mg69351] Re: [mg69301] RE: [mg69276] Re: Dot Product in Cylindrical Coordinates
• From: "David Park" <djmp at earthlink.net>
• Date: Sat, 9 Sep 2006 03:26:39 -0400 (EDT)

```Pratik,

Your example does not work for me.

Needs["Calculus`VectorAnalysis`"]
SetCoordinates[Cylindrical[r, theta, z]];

g = {gr[r, theta, z], gtheta[r, theta, z], gz[r, theta, z]};
f = {fr[r, theta, z], ftheta[r, theta, z], fz[r, theta, z]};

gr[r_, theta_, z_] := r
gtheta[r_, theta_, z_] := theta
gz[r_, theta_, z_] := z
fr[r_, theta_, z_] := r^2
ftheta[r_, theta_, z_] := theta
fz[r_, theta_, z_] := Cos[z]

If we use CrossProduct and DotProduct along with a standard identity using
Div and Curl, which should always be true, then it does not work.

Div[CrossProduct[g, f]] ==
DotProduct[Curl[g], f] - DotProduct[Curl[f], g] // Simplify
(r^2 + 3*r^4*z^2 - 5*r^3*z*Cos[z] +
Sqrt[r^2*((-r)*z + Cos[z])^2] + r^2*Cos[2*z])/
(r*Sqrt[r^2*((-r)*z + Cos[z])^2]) ==
(theta*(-z + Cos[z]))/r

However if we use the standard Dot and Cross functions the identity is
verified.

Div[Cross[g, f]] == Dot[Curl[g], f] - Dot[Curl[f], g] // Simplify
True

The point here is that the package functions DotProduct and CrossProduct are
rather special and have NOTHING to do with standard vector calculus. Users
should not stumble into using them where they do not apply.

In standard vector calculus, in a coordinate system, an orthonormal frame is
erected at each point in the space. The axes of the frame point along the
coordinate directions. The components of vectors are specified in terms of
this orthonormal frame. Since the frame is orthonormal, at any point we can
simple use the standard Dot and Cross product for combining two vectors at
that point. Curl and Div demand vector components in terms of an orthonormal
frame.

If businessmen can jump on computerized inventory control, lasers and
barcodes and DVDs and other technology all within a decade or so of their
invention, why or why can't engineering and physics schools dump the
misbegotten vector calculus of over a century ago?

David Park

From: Pratik Desai [mailto:pratikd at wolfram.com]
To: mathgroup at smc.vnet.net

I think it is quite imperative to note here that

"There are often conflicting definitions of a particular coordinate
system in the literature. When you use a coordinate system with this
package, you should look at the definition given below to make sure it
is what you want." --Mathematica Documentation

So for cylindrical coordinate system one must define the system as:

g = {g?[r, theta, z], g?[r, theta, z], gz[r, theta, z]}
f = {f?[r, theta, z], f?[r, theta, z], fz[r, theta, z]}
g?[r_, theta_, z_] = r
g?[r_, theta_, z_] = theta
gz[r_, theta_, z_] = z
f?[r_, theta_, z_] = r^2
f?[r_, theta_, z_] = theta
fz[r_, theta_, z_] = Cos[z]

Then everything works fine:

In[20]:=
Div[CrossProduct[g,f]]===DotProduct[Curl[g],f]-DotProduct[Curl[f],g]

Out[20]=
True

Hope this helps

Pratik

```

• Prev by Date: Re: numerical integration
• Next by Date: Re: Re: Simplify UnitStep expressions
• Previous by thread: Dot Product in Cylindrical Coordinates
• Next by thread: Re: Re: RE: Re: Dot Product in Cylindrical Coordinates