MathGroup Archive 2011

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

Search the Archive

Re: Curl and Div problems

  • To: mathgroup at
  • Subject: [mg115505] Re: Curl and Div problems
  • From: Murray Eisenberg <murray at>
  • Date: Thu, 13 Jan 2011 03:25:15 -0500 (EST)

Take a look at the VectorAnalysis tutorial in the Documentation Center. 
The issue is with the symbols denoting the coordinates. By default:


{Xx, Yy, Zz}

And by default the coordinate system is cartesian:


Those "unusual" names are for your own protection, I think

If you want to use {x, y, z} as the coordinates, you must explicitly 
specify so:

   SetCoordinates[Cartesian[x, y, z]]

Now Curl and Div will work as you expected, e.g.:

   (* for convenience, use named vector field *)
   F[x_, y_, z_] := {x^2 y, x z, x^2 y^3}

   Div[F[x, y, z]]
2 x y
   Curl[F[x, y, z]]
{-x + 3 x^2 y^2, -2 x y^3, -x^2 + z}

The pink coloring of "Curl" is another matter. This is still common, it 
seems, with some names in some packages and still needs to be fixed by WRI.

I'm reporting that as a bug to support at

On 1/12/2011 4:07 AM, sean k wrote:
> I'm having problems with VectorAnalysis package.
> Within the documentation center, the package loads and works fine.
> But in a notebook, it seems to highlight Curl in red and neither Div
> or Curl works properly.
> Needs["VectorAnalysis`"]
> {D[x^2 y, x] + D[ x z, y] + D[ x^2 y^3, z]}
> Div[{x^2 y, x z, x^2 y^3}]
> gives different answers.
> {2 x y}
> 0
> Curl[{x^2 y, x z, x^2 y^3}]
> gives
> {0,0,0}

Murray Eisenberg                     murray at
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

  • Prev by Date: Re: FindInstance does not abort with TimeConstrained
  • Next by Date: Re: FindInstance for sum of primes
  • Previous by thread: Re: Curl and Div problems
  • Next by thread: Re: Curl and Div problems