VectorCalculus
AddCoordinates
add a new coordinate system
Calling Sequence
Parameters
Description
Examples
AddCoordinates(newsys, eqns, owrite, global)
newsys
-
symbol[name, name, ...]; specify the name of the new coordinate system indexed by the names of the new coordinates
eqns
list(algebraic); specify the expressions relating the new coordinate system to cartesian coordinates
owrite
(optional) equation of the form overwrite=t where t is either true or false; specify whether to overwrite an existing system in the coordinate tables
global
(optional) equation of the form addtoglobal=t, where t is either true or false; specify whether to add coordinate system to the global coordinate system tables
The AddCoordinates(newsys, eqns, owrite, global) command adds a new orthogonally curvilinear coordinate system to the VectorCalculus package. This new system can be used in the same way as the other built-in coordinate systems.
If the owrite argument is specified, it must be the name overwrite or an equation of type identical(overwrite)=truefalse. The default is overwrite=false.
If a coordinate system already exists with the same name as in newsys, the owrite parameter determines whether the old system is overwritten. If the old system is not overwritten, an error is raised.
If the global argument is specified, it must be an equation of type identical(addtoglobal)=truefalse. The default is addtoglobal=true.
If addtoglobal=true, then the specified coordinate system is also added to the global coordinate system tables and in consequence will be available in the plots package.
Note that the global coordinate system table only supports 2 or 3-dimensional coordinate systems with a maximum of 3 parameters.
Before calling AddCoordinates, place assumptions on the variables or use the assuming keyword. This assists computations, as more information is recognized for the possible values of the coordinates of the new system.
with⁡VectorCalculus:
assume⁡0<r,0≤θ,θ<2⁢π
AddCoordinates⁡mypolarr,θ,r⁢cos⁡θ,r⁢sin⁡θ
mypolar
Laplacian⁡f⁡r,θ,mypolarr,θ
∂∂r~f⁡r~,θ~+r~⁢∂2∂r~2f⁡r~,θ~+∂2∂θ~2f⁡r~,θ~r~r~
assume⁡0≤u,0≤v
AddCoordinates⁡foou,v,u2+v2,u2−v2
foo
F≔VectorField⁡f⁡u,v,g⁡u,v,foou,v
Divergence⁡F
2⁢v~⁢∂∂u~f⁡u~,v~⁢2+2⁢u~⁢∂∂v~g⁡u~,v~⁢28⁢u~⁢v~
See Also
assume
assuming
VectorCalculus[Divergence]
VectorCalculus[GetCoordinates]
VectorCalculus[Laplacian]
VectorCalculus[SetCoordinates]
VectorCalculus[VectorField]
Download Help Document