The vector calculus operators div, grad and curl are recognised. The Laplacian operator is also available and may be applied to scalar and vector arguments.

These operators may be used in any orthogonal curvilinear coordinate system. The user may alter the names of the coordinates and the values of the scale factors. Initially the coordinates are X, Y and Z and the scale factors are all unity.
There are two special vectors : COORDS contains the names of the coordinates in the current system and HFACTORS contains the values of the scale factors.
The coordinate names may be changed using the COORDINATES operator.
COORDINATES R,THETA,PHI;
This command changes the coordinate names to R, THETA and PHI.
The scale factors may be altered using the SCALEFACTORS operator.
SCALEFACTORS(1,R,R*SIN(THETA));
This command changes the scale factors to 1, R and R SIN(THETA).
Note that the arguments of SCALEFACTORS must be enclosed in parentheses. This is not necessary with COORDINATES.
When vector differential operators are applied to an expression, the current set of coordinates are used as the independent variables and the scale factors are employed in the calculation. (See, for example, Batchelor G.K. 'An Introduction to Fluid Mechanics', Appendix 2.)
Several coordinate systems are pre-defined and may be invoked by name. To see a list of valid names enter
SYMBOLIC !*CSYSTEMS;
and REDUCE will respond with something like
(CARTESIAN SPHERICAL CYLINDRICAL)
To choose a coordinate system by name, use the command GETCSYSTEM.
To choose the Cartesian coordinate system :
GETCSYSTEM 'CARTESIAN;
Note the quote which prefixes the name of the coordinate system. This is required because GETCSYSTEM (and its complement PUTCSYSTEM) is a SYMBOLIC procedure which requires a literal argument.
REDUCE responds by typing a list of the coordinate names in that coordinate system. The example above would produce the response
(X Y Z)
whilst
GETCSYSTEM 'SPHERICAL;
would produce
(R THETA PHI)
Note that any attempt to invoke a coordinate system is subject to the same restrictions as the implied calls to COORDINATES and SCALEFACTORS. In particular, GETCSYSTEM fails if any of the coordinate names has been assigned a value and the previous coordinate system remains in effect.
A user-defined coordinate system can be assigned a name using the command PUTCSYSTEM. It may then be re-invoked at a later stage using GETCSYSTEM.
We define a general coordinate system with coordinate names X,Y,Z and scale factors H1,H2,H3 :
COORDINATES X,Y,Z; SCALEFACTORS(H1,H2,H3); PUTCSYSTEM 'GENERAL;
This system may later be invoked by entering
GETCSYSTEM 'GENERAL;
see also: REDUCE Home Page