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
|
|
|
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.
|
•
|
The computation of VectorDiff(A, q) is performed as follows.
|
|
Otherwise, if is a projected vector then
|
1.
|
is reprojected in the cartesian orthonormal basis (using ChangeBasis), where unit vectors are constant;
|
3.
|
the differentiation is performed using the standard diff;
|
4.
|
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
|
|
>
|
|
| (1) |
>
|
|
| (2) |
The radial cylindrical unit vector
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
Note the difference when you change the order in which derivatives are computed in a 2nd order derivative
>
|
|
| (7) |
>
|
|
| (8) |
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
>
|
|
| (9) |
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
>
|
|
| (10) |
The derivative with respect to uses the chain rule taking the result above into account
>
|
|
| (11) |
>
|
|
|
|