The divergence and curl in arbitrary basis

In this work, the divergence and curl operators are obtained using the coordinate free non rigid basis formulation of differential geometry. Although the authors have attempted to keep the presentation self-contained as much as possible, some previous exposure to the language of differential geometry may be helpful. In this sense the work is aimed to late undergraduate or beginners graduate students interested in mathematical physics. To illustrate the development, we graphically present the eleven coordinate systems in which the Laplace operator is separable. We detail the development of the basis and the connection for the cylindrical and paraboloidal coordinate systems. We also present in [1] codes both in Maxima and Maple for the spherical orthonormal basis, which serves as a working model for calculations in other situations of interest. Also in [1] the codes to obtain the coordinate surfaces are given.


Introduction
At the undergraduate level, it can be noticed that in the majority of the books on classical mechanics [2], and also in electromagnetism [3], use is made of the famous unit vectorsr,θ,φ, orρ,θ,ẑ, respectively in the spherical and cylindrical cases. Both these bases are called non coordinate. In contrast, the cartesian basisx,ŷ andẑ is called a coordinate basis. We will get to this point in section 2.
The intention of this work is to provide a coordinate independent expression for the vector operators, imposing the orthonormality condition. The subject is not new as we will discuss just in the following. It is a formalism, such that it will result in the same equations, written in a different form. We also present the 11 coordinate systems for which Laplace operator is separable [4].
On the other hand, vector calculus, as we know it, was developed by Josiah W. Gibbs in Yale in the second half of the XIX century which ended up with the famous book, Vector Analysis written together with Edwin B. Wilson in 1901, [5]. Gibbs's book only addresses coordinate basis.
Sommerfeld's book [6] is the older reference that we know of, in which the vector operators in curvilinear systems are presented. In this book, the operators are obtained through their integral definition. Circulation of a vector V in a closed loop γ, γ V .d r, is used to obtain the curl ∇ × V . And flux over a closed surface Σ, Σ V .d σ to obtain the divergence ∇. V . All other textbooks on mathematical physics in which we were able find the vector operators in curvilinear systems [7,8,9,10,11,12], follow the same technique as in Sommerfeld's book.
In this present work, there is no intention to develop a systematic review in differential geometry. Anyway, in order to have a mostly self contained text, we shall briefly introduce the concepts of tensors and the covariant derivative. Many modern textbooks on mathematical physics do present differential geometry as a standard subject in which the interested reader can look into, for example [7,8,10].
Looking into many General Relativity (GR) textbooks, it is possible to find the use non coordinate orthonormal basis, which in the GR context are known as tetrads, see for example [13,14]. In [15], the vector operators are obtained using differential forms. For example, in [16] page 213 in exercise 8.6, it is presented the divergence of a vector field in spherical coordinates using the same technique which we are presenting here in our work. In some sense, the examples carried out by us complement the ones in the book of Misner, et al. [16], since both the divergence and curl of a vector field are developed here.
The subject is not new, as it is well known that attached to each curve there's a locally orthogonal frame which was independently discovered by Jean F. Frenet and Joseph A. Serret, respectively in 1847 and 1851. During the XIX century, Jean G. Darboux generalized the Frenet-Serret frame to surfaces, developing the trìedre mobile which culminated with the four volumes published during the years 1887-1896, [17]. Moving frames were latter addressed by Élie Cartan in connection to Lie Groups in 1937, [18]. The equations governing Darboux frame, in modern language, are called Cartan structure equations, see for example [19].
We must mention that there is a very interesting previous work on divergence and curl for electromagnetism for some particular cases [20]. As an application of the formalism, we show analytically how to obtain the divergence and curl of a vector for the cylindrical and a non trivial example, the paraboloidal orthonormal basis. We also present in [1], codes both in Maxima [21], [22] and Maple [23] to obtain the operators for the spherical orthonormal basis, and also the codes to obtain the coordinate surfaces. It is very easy to adapt the code to the other coordinate systems, or to any other situation of interest. The work is aimed at the second half of the physics course or beginning graduate students. The subject could be easily mastered to anyone interested to include this formalism in a ordinary course of mathematical physics to be given in the classroom to the students.
The article is organized as follows: in section 2 the coordinate free formulation is developed; also in this section, the appropriate connection for an arbitrary basis is given. In section 3 we list a set of coordinates for which Laplace operator is separable, and we show how to find the appropriate orthonormal basis adapted for each frame. The divergence and curl of a vector for the cylindrical, and paraboloidal orthonormal bases are also presented in this section. Our final remarks are presented in the conclusions.

Bases
We begin the discussion by first clarifying some facts about bases through an example, after which getting more formal. Despite the attempt to keep the text self-consistent, prior knowledge in differential geometry may be useful. The Figure 1 shows the very example of the orthonormal unit basis vectors important to physics. It can be seen there, that all the basis vectors get modified 1 under translations in φ. Whiler andθ depend on θ and all the basis 1 Except forθ at the equator andr at the poles, which do not depend on the coordinate φ vectors do not depend in modifications in r. Therefore, only the vectorr can be integrated in the same sense of a velocity vector to give the coordinate line r. It is not possible to integrate the other two basis vector. This is an example of an orthonormal non coordinate basis. It is not possible to integrate all the coordinate basis vectors to give rise to the coordinate lines.
The intention of this work is to develop the vector operators for arbitrary orthonormal non coordinate bases. We choose a very traditional path, introducing first coordinate bases and then arbitrary orthonormal bases. There is a strong reason for this, since restricting to Euclidean space, it is always possible to choose the cartesian basis, which is the sole example in which a coordinate basis is also orthonormal.Both bases can be used for spherical coordinates, being the orthonormal the more important to physics. Now we turn to the general case, such that latin indices i, j, k, etc. run from 1 to 3 and concern coordinate basis, while latin indices a, b, c, etc label each orthonormal vector.
For us, an arbitrary vector V is always connected to the directional derivative, in the sense that where ∂ i = ∂ ∂x i are the partial derivative operators in the coordinate directions, which, when interpreted as vectors, form the coordinate basis. Here x ∈ E 3 is point in Euclidean space, f (x) is any scalar function and it is used the usual convention of summation over repeated indices. Therefore, a vector V can be written as Now we define a change of basis. Starting with any of the coordinate bases, we change to an arbitrary basis e a where necessarily the basis transformation matrix M i a must be invertible and cover all the space, except for sets of measure zero.
Therefore in an arbitrary basis, the components of a vector transform as Coordinate transformations are particular cases of basis transformations. Suppose we have a coordinate transformation Due to the chain rule so that the transformation matrix is the Jacobi matrix. Now we define the commutator between to vectors, say A and B this last line follows from the fact that when [A, B] is applied to differentiable functions, Therefore the commutator between two vectors must be itself also a vector, The commutator between two vectors measure their independency and a basis is called coordinate if all the commutators between them vanish, for instance For example, in the cartesian orthonormal case, we havex = 1∂ x + 0∂ y + 0∂ z = ∂ x ,ŷ = 0∂ x + 1∂ y + 0∂ z = ∂ y and z = 0∂ x + 0∂ y + 1∂ z , = ∂ z and we can easily convince ourselves that all the commutators betweenx ,ŷ andẑ are zero.

Metric and connection
In this section the concepts of metric and the covariant derivative are briefly introduced, so that we have the appropriate geometrical operators necessary to obtain the divergence and curl. For a much more complete and detailed approach on differential geometry, see for example [7]. The orthonormal basis can be expanded with respect to the coordinate basis ∂ i , e a = e i a ∂ i , such that the i enumerates the components of the vector and a labels each of the basis element. There is no intention to emphasize differential forms in this text, so we just present the dual basis ω b i such that ω b i e i a = δ b a and the corresponding coordinate basis dx j , such that the scalar product is dx i ∂ j = δ i j . We will define the connection through the metric tensor, although we know this is not a necessary condition. Only Euclidean geometry is going to be addressed in this present work, which in cartesian coordinates reproduces Pythagora's theorem Therefore, the Euclidean metric is 2 The line element ds 2 turns into in an arbitrary coordinate basis dx i , such that the components of the metric transform as As we said before the matrix ∂x m ∂x i is called Jacobian since it involves the change between two coordinate bases. First by a coordinate change the components of the metric transform tog ij as (14). After the coordinate change, the orthonormal basis is the one that brings theg ij given in (14) to the Euclidean metric This is the orthonormal basis chosen, such that the tensor and vector components in both bases are related as is not invariant through a change of basis, because there will be necessarily the derivative of the basis transformation matrix M −1 j a associated to the components V j = M −1 j aṼ a .
The derivative ∂ i in (16) must be modified to achieve the desired invariance, which is called the covariant derivative ∇ i . Necessarily the covariant derivative of the basis vector ∂ i must be a linear combination of the basis vectors, Keeping in mind the above equation (17), (16) must be modified to which satisfies the linearity condition Now it is possible to define the the covariant derivative ∇ a , as an operator acting on vectors. This covariant derivative is the appropriate one that must be used in order to obtain the divergence and curl, which is the purpose of this work. First the covariant derivative ∇ a is the projection of the derivative ∇ i into the arbitrary basis e i a ∇ a ≡ e i a ∇ i , where in order to shorten notation we write ∇ a instead of ∇ ea . Then, the covariant derivative of a scalar function coincides with the directional derivative where again in order to shorten notation and in accordance with the directional derivative (1), we write |a instead of |e a . While the covariant derivative of the product of a scalar and a vector f V i satisfies the product rule where ∇ i (V j ) is given by (18). Recall that V j = e j a V a , such that V j is a linear combination of vectors labeled by a, e i a multiplied by scalars V a so that according to (22) Now remind that e i b ∇ i = ∇ b so that the projection of (23) gives Again, necessarily the covariant derivative of an element of the basis, must be a linear combination of the elements of the basis which results in the definition of the operator ∇ b acting on a vector V a as the a−component of (24) By applying the covariant derivative to the scalar product A a B a results in the covariant derivative acting on a covariant vector The covariant derivative generalizes the parallel transport of a vector A a along a direction B a where θ is a parameter along the vector B a , [7]. We have the following two properties: • metricity ∇ c g ab = 0 which states that the metric is invariant under parallel transport Γ a bc + Γ b ac = g ab|c = 0, since our basis is orthonormal (15), g ab = diag[1, 1, 1], all its directional derivatives vanish g ab|c = 0.
• and zero torsion, which means that the commutator of two vectors coincide with their deficit upon interchange in parallel transport If the basis e i a is coordinate, all the commutators must vanish, and we recover that the connection in the coordinate basis Γ i jk = Γ i kj is symmetric in the lower indices.
The above two items completely define the Levi-Civita connection 3 The indices are raised and lowered using Euclide's metric g ab = g ab = δ ab which is the identity, for example, raising the d index in (32) results in Therefore, the commutators between the elements of the basis define the coefficients D a bc which give raise to the connection. The covariant derivative, ∇ a , finally define the divergence and curl of a vector where cab is Levi-Civita's skew symmetric tensor.

Different orthonormal basis
The intention now is to apply the preceding formalism to obtain the divergence and curl in orthonormal basis for other coordinate systems. There are 11 coordinate systems in which is possible to separate variables for the Laplace operator in Euclidean space [4]. Laplace operator appears in hyperbolic elliptic and parabolic differential equations, which comprise most of the cases of interest in mathematical physics.
As an example we work out analytically in details the cylindrical coordinates, and also the paraboloidal system as a non trivial case. The same proceeding for the spherical coordinates is presented as codes both in Maple and Maxima in [1]. The other coordinates systems are presented and also shown graphically, with the intention that the reader himself can adapt the codes in Maple or Maxima and carry out the divergence and curl for each one of them.

Cylindrical coordinates
As an example we choose the cylindrical coordinates The line element is the following In this section the indices ρ, θ and z are to be understood as the labeling of each one of the basis elements. With this in mind, the orthonormal basis is The only non null commutator is the following Resulting in the only non null component The divergence and curl are Here, for instance,

Paraboloidal Coordinates
These coordinates can be defined either through Jacobi elliptic functions or through more simple functions, see for example [24] x where λ < b < µ < a < ν. The entire space is covered using the ± signs. The advantage of using Jacobi elliptic functions is that their arguments corresponds to generalized angles. We used the maple code in [1] with the coordinates defined in (49). The metric in the coordinate basis reads The orthonormal basis vectors are Their commutators are The divergence is where the g i are defined in (50). The curl in components is given by

Other coordinate systems
The Cartesian coordinate system is the trivial one in which the orthonormal basis is identical to the coordinate basis and all commutators are zero. The spherical coordinate system is one of the more important cases. To illustrate the use of programming codes in obtaining these operators in a very simple procedural way, in [1] we make available a code to obtain the divergence and curl for the free software Maxima and also for Maple. Moreover, we also include a code to draw general coordinate systems both for Maxima and Maple [1].
All other coordinate systems are plotted and given in the following Table 1. In this Table some of the coordinate systems are described by Jacobi's elliptic functions. These same coordinate systems could be described by square roots instead, the disadvantage is that it will be necessary a greater amount of charts to cover the Euclidean E 3 space.

Final remarks
In the present work we approach the vectorial calculus through the use of the concept of non coordinate basis, especially the tetrad basis. We present here a practical development to obtain the divergence and curl, that have direct applications in physical problems, for example, in Electromagnetism, Fluid Mechanics, Gravitational Theories and other areas of Physics. The approach is restricted to Euclidean geometry, however, it can be easily extended to curved spaces, which also include situations with gravitational field. In this sense, the purpose of this work complements the literature and at the same time introduces sophisticated mathematical concepts with direct applications. It is worth noting that the connection given by (26) and (33), could also be obtained through the Fock Ivanenko operator as a particular case when the spin is 1 [25]. Therefore, it is presented to the students, either late undergraduate or beginners graduate, a formalism more adapted to differential geometry and theoretical physics.
We thus consider the application of this method for the eleven coordinate systems mentioned in [4], for which the separation of variables can be applied to Laplace's operator. For each of the eleven coordinates there is a corresponding metric tensor, and tetrad basis and through the commutator of this basis the connection is obtained. With the appropriate connection, the divergence and curl for each of these eleven cases can be obtained. We work out in detail the case for the well known polar coordinates in section 3.1. In [1] we show an example code both for the algebraic manipulator Maple [23] an the free software Maxima [21], [22] to obtain the divergence and curl also for the well known spherical coordinates. Calculations can be made by the reader, either manually, or by adapting the example code to the situation of interest.