MathGroup Archive 1992

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

Search the Archive

VectorAnalysis Package (bugs?)

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: VectorAnalysis Package (bugs?)
  • From: miner at hagar.ph.utexas.edu (Buff Miner)
  • Date: Wed, 5 Aug 1992 10:45:22 -0500

A colleague of mine found some apparently serious peroblems in the
VectorAnalysis Package. The two examples shown below display errors in the
two functions CrossProduct and ScalarTripleProduct. We are relatively new
Mathematica users and could be making a simple mistake. The kernel was run
on a MacIIci and an IBM RS/6000. My questions are:

1. Are these well known bugs?

2. Has anyone already fixed this problem?

<<Calculus`VectorAnalysis`

Coordinates[]

{x, y, z}

SetCoordinates[Cylindrical]

Cylindrical[r, theta, z]

a = Grad[r]

{1, 0, 0}


b = Grad[theta]

    1
{0, -, 0}
    r

c = Grad[z]

{0, 0, 1}

(* So far so good *)

CrossProduct[a,b]

{0, 0, 0}

(* OOPS! Should have been {0, 0, 1/r} *)

ScalarTripleProduct[Grad[r],Grad[theta],Grad[z]]

0

(* OOPS! Should have been  1/r *)


(* The same problems arise in spherical coordinates (as expected)!

SetCoordinates[Spherical]

Spherical[r, theta, phi]

d = Grad[r]

{1, 0, 0}

e = Grad[theta]

    1
{0, -, 0}
    r

f = Grad[phi]

       Csc[theta]
{0, 0, ----------}
           r

CrossProduct[Grad[r],Grad[theta]]

{0, 0, 0} (* Wrong again! *)

ScalarTripleProduct[Grad[r],Grad[theta],Grad[phi]]

0 (* Wrong again! *)


Thanks,

Buff Miner


William H. Miner, Jr. 
Fusion Research Center and
Institute for Fusion Studies
The University of Texas at Austin   phone: (512) 471-5548
Austin, Texas 78712                   FAX: (512) 471-6715
miner at hagar.ph.utexas.edu Internet
miner at utxvms              bitnet







  • Prev by Date: Two questions
  • Next by Date: regress.m package
  • Previous by thread: Two questions
  • Next by thread: regress.m package