Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
Physics[Vectors][VectorDiff] - differentiate expressions taking into account the geometrical relations between curvilinear unit vectors and coordinates of different types
Calling Sequence
VectorDiff(A, x1, x2, ..., xn)
Parameters
A
-
an algebraic expression
x1, x2, ..., xn
names
Description
VectorDiff computes the partial derivative of the expression , taking into account the geometrical relation existing between cartesian, cylindrical and spherical coordinates, as well as the coordinate dependence of curvilinear unit vectors. Though for people usually working with vectors VectorDiff works "as expected", from the computational point of view its user must take some care: does not return 0, for instance, even when has() returns false.
The %VectorDiff is the inert form of VectorDiff, that is: it represents the same mathematical operation while holding the operation unperformed. To activate the operation use value.
The result of VectorDiff is always expressed in the coordinate system of the differentiation variable. When that is ambiguous (e.g. may be cartesian or cylindrical), the ambiguity is resolved looking at the derivand, whether it is a cartesian or cylindrical vector, and when it is neither, then cartesian coordinates are used. The same approach is used when the differentiation variable is , that could be cylindrical or spherical.
In the derivand, the cylindrican and spherical coordinates and related unit vectors can have functional dependency, say as in , or for a unit vector, , and the differentiation variables can be names or functions, as it is the case when using the Physics[diff] command. This permits computing things for instance like taking into account that .
In the results, all unevaluated , where is in turn a non-projected vector, are substituted by unevaluated . So the differentiation knowledge of the standard diff is taken into account when evaluating derivatives using VectorDiff. Note however that, though high order derivatives w.r.t coordinates of the same type commute, this is not true w.r.t coordinates of different types. Thus, when evaluating high order derivatives with VectorDiff, the order of the differentiation variables is respected and the evaluation happens from the inside to the outside.
The computation of VectorDiff(A, q) is performed as follows.
If does not belong to (the geometrical coordinates - see conventions), then send the task to diff returning .
Otherwise, if is a projected vector then
is reprojected in the cartesian orthonormal basis (using ChangeBasis), where unit vectors are constant;
a change of variables if performed on the components of (using dchange), in order to express in the coordinate system to which belongs;
the differentiation is performed using the standard diff;
the result is reprojected into the original orthonormal basis and returned.
If is a non projected vector or a scalar function, the task is restricted to steps 2. and 3. above.
For the conventions about the geometrical coordinates and vectors see Identify
Examples
The radial cylindrical unit vector
Note the difference when you change the order in which derivatives are computed in a 2nd order derivative
Curvilinear coordiantes and related unit vectors can have functional dependency, and so can the differentiation variable. Consider for instance the radial unit vector in cylindrical coordinates as a function of the polar angle which in turn is a function of
The derivative with respect to takes into account the geometrical dependency of with respect to , while keeping, in the result, the dependency with respect to of the derivand
The derivative with respect to uses the chain rule taking the result above into account
See Also
Identify, operations, Physics, Physics conventions, Physics examples, Physics/Vectors
Download Help Document