|
The operator acting on a vector B appears in the vector identities for the gradient of a dot product, and for the curl of a cross product. In particular, the operator appears in the identities
and
and is generally interpreted as the directional derivative of one vector taken in the direction of the other vector. Indeed, it is a form of the directional covariant derivative of differential geometry. Just as the directional derivative of a scalar leads to the definition of the gradient vector, so too does the directional derivative of a vector lead to the covariant derivative, a rank-two tensor.
Implementing this directional derivative of a vector in the confines of the VectorCalculus packages pushes these packages to their limits. In effect, the calculation can only be done in Cartesian coordinates, and that, by an artifact. Outside its DifferentialGeometry package, Maple cannot form the operator , so must first compute the gradients of each component of B, and then dot A with each such gradient.
The Physics:-Vectors package extends the applicability of its DirectionalDiff command, but unfortunately normalizes the direction vector when applied to a scalar (correct) and also when applied to a vector (problematic).
|
Cartesian Coordinates
|
|
|
VectorCalculus
|
|
• |
Tools_Load Package: Student Vector Calculus
|
• |
Set display format for vectors.
|
|
Loading Student:-VectorCalculus
|
• |
Define vector fields F and V.
|
|
|
• |
Compute by mapping the gradient onto the components of F, then mapping the dot product with V onto each component of that "vector."
|
|
|
• |
Compute by mapping DirectionalDiff onto the components of F. This then requires multiplying by because DirectionalDiff normalizes the direction vector V.
|
|
|
|
|
The syntax for mapping the DirectionalDiff command onto the components of F is far more complex than that required for mapping both the gradient and the dot product. This is for two reasons. First, the DirectionalDiff command normalized the direction vector (here, V); and second, because the Norm command in the VectorCalculus packages produces a function whose value at a point is the norm of the given vector.
A proposal to modify DirectionalDiff in the VectorCalculus packages has already been made. Under this proposal, application of the command to a vector field would be allowed, and when so applied, the direction vector would not be normalized. Maplesoft has given serious consideration to this modification, and if implemented, would allow the (2-D) Math notation to stand for .
|
|
Physics:-Vectors
|
|
Although the DirectionalDiff command in the Physics:-Vectors package automatically maps onto the components of a vector, the direction vector is normalized.
Unlike the VectorCalculus packages, the Physics:-Vectors package lets the syntax to form a valid operator that can be applied to a vector B. Hence, the notation will compute the directional derivative of B in the direction of A.
• |
Load the Physics:-Vectors package.
|
• |
Allow notational enhancements.
|
|
|
• |
Define the vector F. The basis vector i can be entered as or as .
|
|
|
• |
Define the direction vector V. The basis vector i can be entered as or as .
|
|
|
• |
Apply the DirectionalDiff command, organizing the result by components.
|
|
|
• |
Implement the notation , again organizing the result by components.
|
|
|
|
|
Since the DirectionalDiff command again normalizes the direction vector, the best implementation of the directional derivative of a vector is via the notation in the Physics:-Vectors package, at least in Cartesian coordinates.
|
|
|
Polar Coordinates
|
|
As earlier, polar coordinates are used as an example of nonCartesian coordinates.
|
VectorCalculus
|
|
In the VectorCalculus packages, the mapping artifact that works in Cartesian coordinates does not work in polar coordinates. A wrong answer results. Therefore, to obtain the directional derivative of a vector in polar coordinates, the calculation must be implemented in Cartesian coordinates.
• |
Tools_Load Package: Student Vector Calculus
|
• |
Set display format for vectors.
|
|
Loading Student:-VectorCalculus
|
• |
Define, in polar coordinates, the vector fields F and V.
|
|
|
• |
Apply the MapToBasis command to convert F and V to vector fields in Cartesian coordinates.
|
|
|
• |
Obtain the directional derivative.
|
• |
Map the result back to polar coordinates.
|
• |
Simplify: , and
|
• |
Change to , etc.
|
|
|
• |
Display the directional derivative, after having grouped the result by components.
|
|
|
|
|
In this directional derivative, the terms and in the first and second components respectively, imply that cannot be represented in nonCartesian coordinates as an operator acting componentwise on F. This is because ultimately, derivatives have to be taken of the varying basis vectors and . Indeed, let , , define a line through the Cartesian point in the direction . The polar vector F evaluated along this line is
The directional derivative is given by , in which the basis vectors and vary along the line described by . Thus, computing requires differentiating the products and , a process that would generate the Christoffel symbols of covariant differentiation. It is this differentiation process that is responsible for the non-differentiated terms in the directional derivative, and therefore the need to carry out the calculation in Cartesian coordinates.
|
|
Physics:-Vectors
|
|
As pointed out earlier, the Physics:-Vectors package uses cylindrical coordinates to implement polar coordinates. The basis vectors are and .
Unfortunately, none of , or give the correct directional derivative for vectors F and V in polar coordinates. The calculation must still be carried out in Cartesian coordinates, even in the Physics:-Vectors package.
• |
Load the Physics:-Vectors package.
|
• |
Allow notational enhancements.
|
|
|
• |
Define, in polar coordinates, the vector fields F and V.
|
|
|
• |
The following three results are not correct. The first two are missing the non-differentiated terms. The third, using syntax that worked for the scalar case, has incorrect and missing terms.
|
|
|
|
|
|
|
The correct result can be obtained by the same process used with polar coordinates in the VectorCalculus package. The following calculations bring the vectors to Cartesian coordinates, compute the directional derivative, and return the results to polar coordinates.
Apply the ChangeBasis command to convert F and V to vectors in Cartesian coordinates.
|
|
• |
Obtain the directional derivative and simplify:
|
• |
Map the result back to polar coordinates.
|
• |
Force
|
• |
Change to , etc.
|
|
|
• |
Display the directional derivative, after having grouped the result by components.
|
|
|
|
|
|
|
DifferentialGeometry
|
|
There is considerable overhead in setting up a calculation of the directional derivative in the DifferentialGeometry package. Moreover, the notation is ill-adapted for math-mode entry or display of the basic objects of the subject, as demonstrated in greater detail in the earlier Reporter article Tensor Calculus with the Differential Geometry Package, available in the Maple Application Center.
If and are the contravariant components of the vectors F, and V, respectively, then the directional covariant derivative is given by , where is the covariant derivative of F. The following manipulations leading to the invocation of the DirectionalCovariantDerivative command generate the directional covariant derivative of F in the direction of V.
• |
Load the package and the necessary subpackages.
|
• |
Avail of notational compression.
|
|
|
• |
Define R2 as a Cartesian frame.
|
• |
Define P as a polar frame.
|
|
|
• |
Define the covariant (tangent) basis vectors .
|
|
|
• |
Define the contravariant (gradient) basis vectors .
|
|
|
• |
Define the metric tensor for the Euclidean frame.
|
|
|
The metric tensor for the polar frame is obtained by transforming the Cartesian one
|
• |
Equations defining the inverse map from polar to Cartesian.
|
|
|
• |
Define the inverse map as a DifferentialGeometry object.
|
|
|
• |
Obtain the metric tensor for polar coordinates.
|
|
|
• |
Connection for polar coordinates.
|
|
|
|
• |
List the nonzero Christoffel symbols:
|
|
|
• |
Define the contravariant vector F.
|
|
|
• |
Define the contravariant vector V.
|
|
|
• |
Apply the DirectionalCovariantDerivative command to obtain the directional derivative of F along V.
|
|
|
• |
Write the directional covariant derivative as a column vector.
|
|
|
• |
Write the covariant derivative of F as an array.
|
|
|
|
|
At first glance, the result produced by the DirectionalCovariantDerivative does not agree with the earlier result
This is because the VectorCalculus and Physics:-Vectors packages use unit basis vectors, so components of vectors are the so-called physical components. The DifferentialGeometry package uses the natural basis vectors, which are not necessarily of unit length. Consequently, to make the results agree, consider the following.
• |
Let R be the position vector for polar coordinates.
|
|
|
• |
Natural basis vectors:
|
• |
Unit basis vectors:
|
|
=
=
|
• |
Express with unit vectors
|
• |
Express with unit vectors
|
|
|
• |
Match physical components with "natural" components.
|
|
|
• |
Replace physical components and unit basis vectors with natural components and natural basis vectors.
|
|
|
|
|
Thus, using either the VectorCalculus or Physics:-Vectors packages to compute in polar coordinates by mapping back to Cartesian coordinates produces the same result as computing the directional covariant derivative in the DifferentialGeometry package. Perhaps one day these Maple packages will become more interconnected.
|
|
|