Using Mathematica's built-in coordinate systems

Mathematica supports a very wide range of 3-dimensional coordinate systems.  (Double-click on VectorAnalysis and then hit function key F1 to go to the place in the Help Browser where these are discussed.)  This can be very useful, but it can also be very confusing.  How do you know what these different coordinate systems "look like" and when to use each one?

Well, this lab won't teach you that.  However, it will show you some techniques to investigate this question and how to work with these alternate coordinate systems in Mathematica.

First, we will work through an investigation of some properties of different coordinate systems using the two main non-Cartesian systems that we are most familiar with.  Then, you will apply these techniques to some less familiar ones.  (For all the work that follows, you must load the library module Calculus`VectorAnalysis`.  In this notebook, it is done automatically when you execute the first command.)

Since we are in 3 dimensions here, we need 3 coordinates to specify a point in space.  To find out what names Mathematica gives to these coordinates by defaulty, use:

Coordinates[Cylindrical]

{Rr, Ttheta, Zz}

So, what are the transformation equations to convert from Cylindrical to Cartesian coordinates?

CoordinatesToCartesian[{r, θ, z}, Cylindrical]

{r Cos[θ], r Sin[θ], z}

(Notice that I used my own variable names here.  This makes the formulae look nicer. It can get you in trouble on occasion, however.  More on that later.)

So, what about Spherical coordinates?

Coordinates[Spherical]

{Rr, Ttheta, Pphi}

We can get some further info on the possible ranges of these coordinates:

In[5]:=

CoordinateRanges[Spherical]

Out[5]=

{0≤Rr<∞, 0≤Ttheta≤π, -π<Pphi≤π}

CoordinatesToCartesian[{ρ, ϕ, θ}, Spherical]

{ρ Cos[θ] Sin[ϕ], ρ Sin[θ] Sin[ϕ], ρ Cos[ϕ]}

Just a warning here:  For some reason, Mathematica reverses the standard roles of θ and φ in spherical coordinates.  In Mathematica, θ stands for the angle from the Z axis, while φ is the angle of the projection into the XY plane from the X axis.  This isn't all that hard to deal with (just always remember to enter points in {ρ,φ,θ} format, rather than the more usual {ρ,θ,φ} form, using our standard θ and φ), but you do have to be careful to remember it.  Also, notice that they have chosen the range for their φ (our θ) to be [-π,π] rather than [0,2π].


Created by Mathematica  (April 3, 2007) Valid XHTML 1.1!