Physics[Vectors][ChangeCoordinates] - change the coordinates in an expression to one of Cartesian, cylindrical and spherical coordinates
Calling Sequence
ChangeCoordinates(A, coordinates)
ChangeCoordinates(A, coordinates, alsothebasis)
Parameters
A
-
any valid Maple expression
coordinates
one of the coordinates identifiers {1, 2, 3}, or one of the related keywords cartesian, cylindrical, or spherical
alsothebasis
optional, to indicate that the unit vectors present in A should also be expressed in terms of the unit vectors associated to coordinates
Description
ChangeCoordinates changes the coordinates of a given expression, possible a vector function, to the indicated system of coordinates. Optionally, when the argument alsothebasis is given, the unit vectors present in A are also rewritten in terms of the unit vectors associated to the system of coordinates indicated. ChangeCoordinates is thus complementary to ChangeBasis. For the conventions used in the Physics[Vectors] subpackage to represent vector functions, see conventions.
The coordinates are changed according to the following. From cartesian x,y,z to cylindrical ρ,φ,z:
x=ρ⁢cos⁡φ
y=ρ⁢sin⁡φ
From cartesian x,y,z to spherical r,θ,φ (note the ordering of the angles):
x=r⁢sin⁡θ⁢cos⁡φ
y=r⁢sin⁡θ⁢sin⁡φ
z=r⁢cos⁡θ
For the formulas used to change the unit vectors when alsothebasis is passed, see ChangeBasis.
The %ChangeCoordinates is the inert form of ChangeCoordinates, that is: it represents the same mathematical operation while holding the operation unperformed. To activate the operation use value.
Examples
with⁡PhysicsVectors
&x,`+`,`.`,Assume,ChangeBasis,ChangeCoordinates,CompactDisplay,Component,Curl,DirectionalDiff,Divergence,Gradient,Identify,Laplacian,∇,Norm,ParametrizeCurve,ParametrizeSurface,ParametrizeVolume,Setup,Simplify,`^`,diff,int
Setup⁡mathematicalnotation=true
mathematicalnotation=true
A cartesian projected vector
R≔x⁢_i+y⁢_j+z⁢_k
R≔x⁢i∧+y⁢j∧+z⁢k∧
Vector R projected onto the cartesian basis. Rewrite x,y,z entering R in terms of cylindrical and spherical coordinates
ChangeCoordinates⁡R,2
i∧⁢ρ⁢cos⁡φ+j∧⁢ρ⁢sin⁡φ+z⁢k∧
ChangeCoordinates⁡R,spherical
r⁢sin⁡θ⁢cos⁡φ⁢i∧+r⁢sin⁡θ⁢sin⁡φ⁢j∧+r⁢k∧⁢cos⁡θ
Change also the basis of unit vectors
ChangeCoordinates⁡R,cylindrical,alsothebasis
z⁢k∧+ρ⁢ρ∧
ChangeCoordinates⁡R,3,alsothebasis
r⁢r∧
See Also
convert,VectorCalculus, Physics, Physics conventions, Physics examples, Physics Updates, Tensors - a complete guide, Mini-Course Computer Algebra for Physicists, Physics/Vectors/ChangeBasis, Physics/Vectors/Identify, Physics/Vectors/operations, Physics[Vectors]
Download Help Document