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=rsinθcosφ
y=rsinθsinφ
z=rcosθ
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
withPhysicsVectors
&x,`+`,`.`,Assume,ChangeBasis,ChangeCoordinates,CompactDisplay,Component,Curl,DirectionalDiff,Divergence,Gradient,Identify,Laplacian,∇,Norm,ParametrizeCurve,ParametrizeSurface,ParametrizeVolume,Setup,Simplify,`^`,diff,int
Setupmathematicalnotation=true
mathematicalnotation=true
A cartesian projected vector
R≔x_i+y_j+z_k
R≔xi∧+yj∧+zk∧
Vector R projected onto the cartesian basis. Rewrite x,y,z entering R in terms of cylindrical and spherical coordinates
ChangeCoordinatesR,2
i∧ρcosφ+j∧ρsinφ+zk∧
ChangeCoordinatesR,spherical
rsinθcosφi∧+rsinθsinφj∧+rk∧cosθ
Change also the basis of unit vectors
ChangeCoordinatesR,cylindrical,alsothebasis
zk∧+ρρ∧
ChangeCoordinatesR,3,alsothebasis
rr∧
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