Introduction To Tensor Calculus
Introduction To Tensor Calculus
A.V.Smirnov
c Draft date November 6, 2003
Contents
1 Coordinates and Tensors 4
2 Cartesian Tensors 7
2.1 Tensor Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Tensor Derivatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3 Curvilinear coordinates 15
3.1 Tensor invariance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2 Covariant differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.3 Orthogonal coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3.1 Unit vectors and stretching factors . . . . . . . . . . . . . . . . . 21
3.3.2 Physical components of tensors . . . . . . . . . . . . . . . . . . 24
4 Problems 27
A Solutions to problems 30
Bibliography 45
Index 46
2
Preface
Nomenclature
A B A is defined as B, or A is equivalent to B
Ai Bi ∑3i Ai Bi . Note: Ai Bi A j B j
RHS Right-hand-side
LHS Left-hand-side
PDE Partial differential equation
.. Continued list of items
3
There are two aspects of tensors that are of practical and fundamental im-
portance: tensor notation and tensor invariance. Tensor notation is of great prac-
tical importance, since it simplifies handling of complex equation systems. The
idea of tensor invariance is of both practical and fundamental importance, since it
provides a powerful apparatus to describe non-Euclidean spaces in general and
curvilinear coordinate systems in particular.
A definition of a tensor is given in Section 1. Section 2 deals with an im-
portant class of Cartesian tensors, and describes the rules of tensor notation.
Section 3 provides a brief introduction to general curvilinear coordinates, invari-
ant forms and the rules of covariant differentiation.
x̃i
x̃i x1 xn (1)
∂ x̃i j
d x̃i dx (2)
∂xj
This transformation rule2 can be generalized to a set of vectors that we shall call
contravariant vectors:
∂x̃i j
Ãi A (3)
∂xj
1
Super-indexes denote components of a vector (i 1 n) and not the power exponent, for the reason
explained later (Definition 1.1)
2 The repeated indexes imply summation (See. Proposition 21)
4
That is, a contravariant vector is defined as a vector which transforms to a new
coordinate system according to (3). We can also introduce the transformation
matrix as:
∂ x̃i
aij (4)
∂xj
With which (3) can be rewritten as:
Ai
aij A j (5)
Transformation rule (3) will not apply to all the vectors in our space. For
example, a partial derivative ∂ ∂ xi will transform as:
∂ ∂ ∂xj ∂xj ∂
(6)
∂ x̃i ∂ x̃i ∂ x j ∂ x̃i ∂ x j
that is, the transformation coefficients are the other way up compared to (2). Now
we can generalize this transformation rule, so that each vector that transforms
according to (6) will be called a Contravariant vector:
∂xj
Ãi Aj (7)
∂x̃i
This provides the reason for using lower and upper indexes in a general
tensor notation.
Each index of a tensor should comply to one of the two transformation rules:
(3) or (7). An index that complies to the rule (7) is called a covariant index and is
denoted as a sub-index, and an index complying to the transformation rule (3) is
called a contravariant index and is denoted as a super-index.
5
Tensors are usually functions of space and time:
A i1 im
Ai1 im x1 xn t
which defines a tensor field, i.e. for every point xi and time t there are a set of mn
nubers Ai1 im .
i
j δi j
1
i
j δi j
0 (8)
From this definition and since coordinates xi are independent of each other
it follows that:
∂ xi
δi j (9)
∂xj
δi j A j
Ai (10)
Assume that there exists the transformation inverse to (5), which we call bij :
dxi
bij d x̃ j (11)
∂ xi
bij (12)
∂ x̃ j
6
j
From this relation and the independence of coordinates (9) it follows that aij bk
j
bij ak
δik , namely:
j ∂ x̃i ∂ x j
aij bk
∂ x j ∂ x̃k
∂ x j ∂ x̃i ∂ x̃i
δik (13)
∂ x j ∂ x̃k ∂ x̃k
2 Cartesian Tensors
Cartesian tensors are a sub-set of general tensors for which the transformation
matrix (4) satisfies the following relation:
∂ x̃k ∂ x̃k
aki akj δi j (14)
∂ xi ∂ x j
∂ x̃i ∂ xk
(15)
∂ xk ∂ x̃i
(see Problem 4.3), which means that both (5) and (6) are transformed with the
same matrix aik . This in turn means that the difference between the covariant and
contravariant indexes vanishes for the Cartesian tensors. Considering this we
shall only use the sub-indexes whenever we deal with Cartesian tensors.
Remark 2.1 Tensor rules Tensor rules guarantee that if an expression follows
these rules it represents a tensor according to Definition 1.1.
7
Thus, following tensor rules, one can build tensor expressions that will pre-
serve tensor properties of coordinate transformations (Definition 1.1) and coordi-
nate invariance (Section 3).
Tensor rules are based on the following definitions and propositions.
For example:
Ai jk B jkC pq Eq Fp (16)
Ai jk B jk Ci D pq Eq Fp (17)
Generally the terms in the expression may come with plus or minus sign.
For example:
Ai j B j
Cikp Dk E p E jC jki Bk (18)
8
Definition 2.6 Free indexes
A free index is any index that occurs only once in a tensor term. For exam-
ple, index i is a free index in the term (16).
For example, if index i is a free index in any term of tensor equality, such as
(18), it should be the free index in all other terms. For example
Ai j B j
C jD j
is not a valid tensor equality since index i is a free index in the term on the
RHS but not in the LHS.
Ai j B j
Ci D j E j (19)
is equivalent to
Ak j B j
Ck D j E j (20)
9
Definition 2.10 Dummy indexes
A dummy index is any index that occurs twice in a tensor term.
n
Ai Bi
∑ Ai Bi (21)
i
C i A i Bj
Di j
notation as Ai Bi .
10
Proposition 2.16 Renaming of dummy indexes
Any dummy index in a tensor term can be renamed to any symbol as long
as this symbol does not already occur in this term.
Ai j B j
Ci D j E j
Akp B p
Ck D j E j (22)
i j i k j k εi jk 0
i jk PG 123 εi jk 1
i jk PG 132 εi jk
1 (23)
where PG abc is a permutation group of a triple of indexes abc, i.e. PG abc
abc bca cab . For example, the permutation group of 123 will consist of three
combinations: 123, 231 and 312, and the permutation group of 123 consists of
132, 321 and 213.
11
Corollary 2.19 Permutation of the permutation tensor indexes
From the definition of the permutation tensor it follows that the permutation
of any of its two indexes changes its sign:
εi jk εik j (24)
A
B
C (25)
Ai
εi jk B jCk (26)
εi jk A jk
0 (27)
Proof:
From the symmetry of Ai j we have:
εi jk A jk
εi jk Ak j (28)
Let’s rename index j into k and k into j in the RHS of this expression, according
to rule (2.16):
εi jk Ak j
εik j A jk
12
Using (24) we finally obtain:
εik j A jk εi jk A jk
εi jk A jk εi jk A jk
εi jk εipq
δ j p δkq δ jq δkp (29)
Proof
This identity can be proved by examining the components of equality (29)
component-by-component.
A
B
C
B A C C A B (30)
∂A
Ȧ
∂t
13
Definition 2.26 Spatial derivative of a tensor
A partial derivative of a tensor A over one or its spacial components is de-
noted as A i :
∂A
Ai (31)
∂ xi
that is, the index of the spatial component that the derivation is done over is
delimited by a comma (’,’) from other indexes. For example, Ai j k is a derivative of
∇i A Ai
(32)
Even though the notation in (31) is sufficient to define the derivative, In some
instances it is convenient to introduce the nabla operator as defined above.
∇A Ai
14
Corollary 2.31 Derivative of a coordinate
From (9) it follows that:
xi
j
δi j (33)
xi i
x1 1
x2 2
x3 3
1 1 1
3 (34)
∇ A
Ai i
∆A A ii
3 Curvilinear coordinates
In this section 3 we introduce the idea of tensor invariance and introduce the rules
for constructing invariant forms.
3
In this section we reinstall the difference between covariant and contravariant indexes.
15
3.1 Tensor invariance
dl 2
gi j dxi dx j (35)
Thus, if we know the metric tensor in a given curvilinear coordinate system then
the distance element is computed by (35). The metric tensor is defined as a
tensor since we need to preserve the invariance of distance in different coordinate
systems, that is, the distance should be independent of the coordinate system,
thus:
dl 2
gi j dxi dx j
g̃i j d x̃i d x̃ j (36)
gi j dxi dx j
gi j dx j dxi
g ji dxi dx j
where we first swapped places of dxi and dx j , and then renamed index i into j
and j into i. We can rewrite the equality above as:
gi j dxi dx j g ji dxi dx j
gi j g ji dxi dx j
0
Since the equality above should hold for any dxi dx j , we get:
gi j
g ji (37)
The metric tensor is also called the fundamental tensor. The inverse of the
metric tensor is also called the conjugate metric tensor, gi j , which satisfies the
relation:
16
gik gk j
δi j (38)
∂ xi j ∂ xi k ∂ xi ∂ xi j k
dl 2 dxi dxi d x̃ k d x̃ d x̃ d x̃ (39)
∂x̃ j ∂x̃ ∂x̃ j ∂x̃k
∂ xk ∂ xk
g̃i j (40)
∂ x̃i ∂ x̃ j
∂x̃i ∂x̃ j
g̃i j (41)
∂ xk ∂ xk
Using these expression one can compute gi j and gi j in various curvilinear coordi-
nate systems (see Problem 4.6).
Ai
gi j A j (42)
Ai
gi j A j (43)
Conjugate tensor is also called the associate tensor. Relations (42), (43)
are also called as operations of raising/lowering of indexes.
17
Not all the expressions constructed from tensor terms in curvilinear coordi-
nates will be tensors themselves. For example, if vectors Ai and Bi are tensors,
then Ai Bi is not generally a tensor4 . However, if we consider the same operation
on a contravariant tensor Ai and a covariant tenso Bi then the product will form an
invariant:
Āi B̄i
Ai Bi (44)
1. Each free index should keep its vertical position in every term, i.e. if the
index is covariant in one term it should be covariant in every other term, and
vise versa.
2. Every pair of dummy indexes should be complementary, that is one should
be covariant, and another contravariant.
u̇i uk ui k
Pi
ρ
ντik k
4 For Cartesian tensors any product of tensors will always be a tensor, but this is not so for general tensors
18
The invariant form of this equation is:
u̇i uk ui k
Pi
ρ
ντki k
(45)
g k j τi j .
∂S
Ai Si
∂ xi
However, a partial derivative of a tensor of the order one and greater is not
generally an invariant under coordinate transformations of type (7) and (3).
In curvilinear coordinate system we should use more complex differentiation
rules to preserve the invariance of the derivative. These rules are called the rules
of covariant differentiation and they guarantee that the derivative itself is a tensor.
According to these rules the derivatives for covariant and contravariant indices
will be slightly different. They are expressed as follows:
Ai
j
∂ Ai
∂xj
k
ij
Ak (46)
∂ Ai
Ai j i
Ak (47)
∂xj kj
k
ij
1 kl
2
g
∂ gil
∂xj
∂ g jl
∂ xi
∂ gi j
∂ xl
and is also known in tensor calculus as Christoffel’s symbol of the second kind
[1]. Tensor gi j represents the inverse of the metric tensor gi j (38). As can be seen
differentiation of a single component of a vector will involve all other components
of this vector.
19
In differentiating higher order tensors each index should be treated inde-
pendently. Thus differentiating a second order tensor, Ai j , should be performed
as:
Ai j k
∂ Ai j
∂ xk
m
ik Am j
m
jk Aim
and as can be seen also involves all the components of this tensor. Likewise for
the contravariant second order tensor Ai j we have:
ij ∂ Ai j i j
Am j Aim
Ak (48)
∂ xk mk mk
j j ∂ j1 jm
Ai11 inmp A
∂ x p i1 in k
j1 q j2 jm
jm j1 jm 1 q
qp Ai1 in
qp Ai1 in
q j1 jm q j j
Ai11 inm 1 q
i1 p Aqi2 in
in p (49)
u̇ i k i
u uk
gik P k
ρ
ντikk
(50)
where the index of the pressure term was raised by means of (42).
Using the invariance of the scalar product one can construct two important
differential operators in curvilinear coordinates: divergence of a vector div A Aii
20
Definition 3.8 Divergence
Divergence of a vector is defined as Aii :
div A A ii
(51)
From this definition and the rule of covariant differentiation (47) we have:
∂ Ai
A ii i
Ak
(52)
∂ xi ki
i ∂ Ai 1 ∂
Ai
g Ai
∂ xi g ∂x i
1 ∂
gAi
(53)
g ∂ xi
A ii
gi j A j i (54)
∆A gik A ki
(55)
The definitions (3.8), (3.9) of differential operators are invariant under coor-
dinate transformations. They can be programmed using a symbolic manipulation
packages and used to derive expressions in different curvilinear coordinate sys-
tems (Problem 4.9).
21
Consider three unit vectors, ai bi ci , each directed along one of the coordi-
ai a1 0 0
(56)
bi 0 b2 0
(57)
ci 0 0 c3
(58)
The condition of orthogonality means that the scalar product between any
two of these unit vectors should be zero. According to the definition of a scalar
product (Definition 3.4) it should be written in form (44), that is, a scalar product
between vectors ai and bi can be written as: ai bi or ai bi . Let’s use the first form for
definiteness. Then, applying the operation of rising indexes (42), we can express
the scalar product in contravariant components only:
0
a i bi
gi j ai b j
1 1 2
g11 a 0 g12 a b g13 00
g21 a2 b1 g22 0b2 g23 00
g31 a3 0 g32 0b2 g33 00
g12 g21 a1 b2 2g12 a1 b2 0
(59)
where we used the symmetry of gi j , (37). Since vectors a1 and b2 were chosen to
be non-zero, we have: g12 0. Applying the same reasoning for scalar products of
other vectors, we conclude that the metric tensor has only diagonal components
non-zero5 :
gi j
δi j g ii
(60)
Let’s introduce stretching factors, hi , as the square roots of these diagonal com-
ponents of gi j :
1 2 1 2 1 2
h1 g11 ; h2 g22 ; h3 g33 ; (61)
Now, consider the scalar product of each of the unit vectors (56)-(58) with
itself. Since all vectors are unit, the scalar product of each with itself should be
one:
5 We use parenthesis to preclude summation (Proposition 2.12)
22
ai ai
bi bi
ci ci
1
gi j ai a j
gi j bi b j
g i j ci c j
1
Now, consider the first term above and substitute the components of a from (56).
The only non-zero term will be:
2
g11 a1 a1
h1 a1 2
1
and consequently:
a1
1
h1
(62)
where the negative solution identifies a vector directed into the opposite direction,
and we can neglect it for definiteness. Applying the same reasoning for each of
the tree unit vectors ai bi ci , we can rewrite (56), (57) and (58) as:
1
ai
00 (63)
h1
1
bi
0 0 (64)
h2
1
ci
00 (65)
h3
which means that the components of unit vectors in a curved space should be
scaled with coefficients hi . It follows from this that the expression for the element
of length in curvilinear coordinates, (35), can be written as:
dl 2
gi j d x̃i d x̃ j
h2i d x̃i 2
(66)
gi j
δi j h i
2
(67)
δi j , from which it follows that
23
hi
1 hi
(68)
A e
g i j Ai e j
A e
A i ei
Ai e i (69)
Suppose the unit vector is directed along one of the axis: ei e1 0 0 . From
e1
1 h1
A 1
A 1 h1
or, repeating the argument for other components, we have for the physical com-
ponents of a covariant vector:
A1 h 1 A2 h 2 A3 h 3
(70)
h 1 A1 h 2 A2 h 3 A3
24
1 ∂
∇i (71)
h i ∂ xi
where the parentheses indicate that there’s no summation with respect to index i.
In orthogonal coordinate system the general expressions for divergence (53)
and Laplacian (55)) operators can be expressed in terms of stretching factors only
[3]:
1 ∂ H
Aii Ai (72)
H ∂ xi hi
1 ∂ H A
∆A
H ∂ xi h i ∂ xi
n
H ∏ hi
i 1
xi
x1 x2 x3 and x̃i
x1
r cos θ
x2
r sin θ
x3 l
According to (40) only few components of the metric tensor will survive
(Problem 4.5). Then we can compute nabla, divergence and Laplacian oper-
ators according to (71), (52) and (55), or using simplified relations (72)-(73):
∂ 1 ∂ ∂
∇
∂r r ∂θ ∂z
∂ A1 1 ∂ A2 ∂ A3 1
div A A1
∂ x̃1 x̃1 ∂ x̃2 ∂ x̃3 x̃1
∂ Ar 1 ∂ Aθ ∂ Az 1
Ar
∂r r ∂θ ∂z r
Note, that instead of using the contravariant components as implied by the gen-
eral definition of the divergence operator (51) we are using the covariant compo-
nents as dictated by relation (70). The expression of the Laplacian becomes:
25
∂2 A 1 ∂2 A ∂2 A 1 ∂A
∆A
∂ x̃1 2 x̃21 ∂ x̃2 2 ∂ x̃3 2 x̃1 ∂ x̃1
∂2 A 1 ∂2 A ∂2 A 1 ∂A
∂ r 2 r2 ∂ θ 2 ∂ z 2 r ∂r
26
4 Problems
Ai j B jk B pqCq Dk
0
E pqi Fk jC pk B p j D jq Gq
Fkp
Ei jk A j Bk D i j Ai B j
Fi j G jk Hk j
pression should have 2 free indexes, which should always come first among the
indexes of a tensor. The free indexes should be at A and B in the first term, at
B and C in the second term and C and D in the last term. How many different
tensor expressions can be constructed?
εi jk εipq
δ j p δkq δ jq δkp
A
B
C
B A C C A B
27
x
r cos θ
y
r sin θ
z l
Obtain the components of the metric tensor (40) gi j and its inverse gi j (38)
in cylindrical coordinates.
x
r sin θ cos φ
y
r sin θ sin φ
z r cos θ
(73)
28
j
Ai BijkCt k
Dt (74)
ij
A jk BipqC kq Fk j Gkp H j
jq
H k Ak j Cti B pit q
(75)
p j
E i Bikp DkqC jq
Dki G p i (76)
29
A Solutions to problems
Ai j B jk B pqCq Dk
0
E pqi Fk jC pk B p j D jq Gq
Fkp
Ei jk A j Bk D i j Ai B j
Fi j G jk Hk j
pression should have 2 free indexes, which should always come first among the
indexes of a tensor. The free indexes should be at A and B in the first term, at
B and C in the second term and C and D in the last term. How many different
tensor expressions can be constructed?
Solution
One possibility is:
Since there are four locations for dummy indexes in each term, there could
be three different combinations of dummies in each term. Thus, the total number
of different expression is 33 27
30
Problem 4.3: Cartesian identity
Prove identity (15).
Proof
Integrating (5) in the case of constant transformation marix coefficients, we
have:
x̃i
aik xk bi (77)
∂ x̃i
aik (78)
∂ xk
By the definition of the Cartesian coordinates (79) we have:
∂ x̃k ∂ x̃k
aki akj δi j (79)
∂ xi ∂ x j
aij x̃i
aij aik xk aij bi
δ jk xk aij bi
xj aij bi
∂xj
aij
∂x̃i
∂ xk
aik
∂x̃i
∂x̃i ∂xj
∂xj ∂x̃i
31
Problem 4.4: Tensor identity
Prove identity (30).
Proof
A
B
C
B A C C A B (80)
Proof
Applying (26) twice to the RHS of (80), we have:
A B C
εi jk A j εkpq B pCq
εi jk εkpq A j B pCq
εi jk εkpq A j B pCq
εki j εkpq A j B pCq (81)
εi jk εipq Ak B pCq
δ j p δkq δ jq δkp Ak B pCq
δ j p B p δkq AkCq δ jqCq δkp Ak B p (82)
B j AqCq C j A pB p (83)
B A C C A B
32
Problem 4.5: Metric tensor in cylindrical coordinates.
Cylindrical coordinate system x̃i r θ l (84) is given by the following trans-
xyz :
x
r cos θ
y
r sin θ
z l
Obtain the components of the metric tensor (40) gi j and its inverse gi j (38)
in cylindrical coordinates.
Solution:
First compute the derivatives of xi x y z with respect to x̃i rθ l :
∂x1 ∂x
xr cos θ
∂x̃1 ∂r
∂x2 ∂y
yr sin θ
∂x̃1 ∂r
∂x1
∂x̃ 2
∂x
∂θ
xθ
r sin θ
∂x2 ∂y
yθ r cos θ
∂x̃2 ∂ θ
∂x3 ∂ z
zl 1 (84)
∂x̃3 ∂ z
grr
xr xr yr yr 1
gθ θ
xθ xθ yθ yθ r 2
gzz 1
grr 1
1
gθ θ
r2
zz
g 1
33
Problem 4.6: Metric tensor in curvilinear coordinates
Using Mathematica, write a procedure to compute metric tensor in curvilin-
ear coordinate system, and use it to obtain the components of metric tensor, g,
(40) and its conjugate, ĝ, (38) in spherical coordinate system (r φ θ):
x
r sin θ cos φ
y
r sin θ sin φ
z r cos θ
(85)
NX = 3
34
(* Contravariant metric tensor *)
g1 =Array[,{NX,NX}]
g1=Inverse[g]
0 r2 0 0 0 r2 sin θ 2
g
100
2
csc θ 2
ĝ 100 0r 0 00
r2
*************************************)
DIM = 3
(*
The metric tensor
*)
g = Array[,{DIM,DIM}] (* covariant *)
g1 =Array[,{DIM,DIM}] (* contravariant *)
Do[
g [[i,j]] = 0;
g1[[i,j]] = 0
,
{j,1,DIM},{i,1,DIM}
]
(*
35
Cylindrical coordinates
*)
Z=Array[,DIM]
Z[[1]] = r
Z[[2]] = th
Z[[3]] = z
g [[1,1]] = 1
g [[2,2]] = rˆ2
g [[3,3]] = 1
g1[[1,1]] = 1
g1[[2,2]] = 1/rˆ2
g1[[3,3]] = 1
(*
Christoffel symbols of the first and second type
*)
Cr1 = Array[,{DIM,DIM,DIM}]
Cr2 = Array[,{DIM,DIM,DIM}]
Do[
Cr1[[i,j,k]] = 1/2
(
D[ g [[i,k]], Z[[j]] ]
+ D[ g [[j,k]], Z[[i]] ]
- D[ g [[i,j]], Z[[k]] ]
),
{k,DIM},{j,DIM},{i,DIM}
]
Do[
Cr2[[l,i,j]] =
Sum[
g1[[l,k]] Cr1[[i,j,k]],
{k,DIM}
],
{j,DIM},{i,DIM},{l,DIM}
]
36
solution
********************************************)
(*
B.Spain
Tensor Calculus, 1965
Eq.(22.2)
*)
D1[N_,A_,k_,X_,j_]:=
(*
Computes covariant derivative
of a mixed tensor of second order
with index k - covariant (upper)
*)
Module[
{i,s},
s = Sum[Cr2[[k,i,j]] A[[i]],{i,N}];
D[A[[k]],X[[j]]] + s
]
Dl1[N_,A_,l_,X_,t_]:=
(*
Computes covariant derivative
of a mixed tensor of second order
with index l - covariant (lower)
*)
Module[
{s,r},
s =Sum[Cr2[[r,l,t]] A[[r]],{r,N}];
D[A[[l]],X[[t]]] - s
]
D1l1[N_,A_,m_,l_,X_,t_]:=
(*
Computes covariant derivative
of a mixed tensor of second order
with index m - contravariant (upper) and
index l - covariant (lower)
37
*)
Module[
{s1,s2,r},
s1 =Sum[Cr2[[m,r,t]] A[[r,l]],{r,N}];
s2 =Sum[Cr2[[r,l,t]] A[[m,r]],{r,N}];
D[A[[m,l]],X[[t]]] + s1 - s2
]
D2[N_,A_,i_,j_,X_,n_]:=
(*
Computes covariant derivative
of second order tensor with
both m and l contravariant (upper)
indexes
B.Spain
Tensor Calculus, 1965
Eq.(23.3)
*)
Module[
{s1,s2,k},
s1 =Sum[Cr2[[i,k,n]] A[[k,j]],{k,N}];
s2 =Sum[Cr2[[j,k,n]] A[[i,k]],{k,N}];
D[A[[i,j]],X[[n]]] + s1 + s2
]
D2l1[N_,A_,i_,j_,k_,X_,n_]:=
(*
Computes covariant derivative
of third order tensor with
i and j contravariant (upper)
and k contravariant (lower)
indexes
B.Spain
Tensor Calculus, 1965
Eq.(23.3)
*)
Module[
{s1,s2,s3,m},
s1 =Sum[Cr2[[i,m,n]] A[[m,j,k]],{m,N}];
s2 =Sum[Cr2[[j,m,n]] A[[i,m,k]],{m,N}];
s3 =Sum[Cr2[[m,k,n]] A[[i,j,m]],{m,N}];
D[A[[i,j,k]],X[[n]]] + s1 + s2 - s3
]
38
D4l1[N_,A_,i1_,i2_,i3_,i4_,i5,X_,i6_]:=
(*
Computes covariant derivative
of 5 order tensor with
4 first indexes contravariant (upper)
and the last one contravariant (lower)
B.Spain
Tensor Calculus, 1965
Eq.(23.3)
*)
Module[
{k,s1,s2,s3,s4,s5},
s1= Sum[Cr2[[i1,k,n]] A[[k,i2,i3,i4,i5]],{k,N}];
s2= Sum[Cr2[[i2,k,n]] A[[i1,k,i3,i4,i5]],{k,N}];
s3= Sum[Cr2[[i3,k,n]] A[[i1,i2,k,i4,i5]],{k,N}];
s4= Sum[Cr2[[i4,k,n]] A[[i1,i2,i3,k,i5]],{k,N}];
s5=-Sum[Cr2[[k,i5,n]] A[[i1,i2,i3,i4,k]],{k,N}];
D[A[[i1,i2,i3,i4,i5]],X[[i6]]]+s1+s2+s3+s4+s5
]
(* Variables: *)
NV = DIM
U = Array[,NV]
39
(* New coordinate system *)
Y = Array[,NX]
Y[[1]] = r;
Y[[2]] = th;
Y[[3]] = z;
X[[1]] = r Cos[th];
X[[2]] = r Sin[th];
X[[3]] = z;
(* Derivatives of a vector *)
V0 = Array[,NX]
V0[[1]] = Vr[r,th,z];
V0[[2]] = Vt[r,th,z];
V0[[3]] = Vz[r,th,z];
(*
Rescaling for physical
(dimensionally correct) coordinates
(\cite[5.102-5.110]{SyScTC69})
*)
V = Array[,NX]
Do[
V[[i]] = PowerExpand[V0[[i]]/g[[i,i]]ˆ(1/2)],
{i,1,NX}
]
(*
Transform vectors
as first order contravariant tensors
*)
U = Array[,NX]
40
SetAttributes[RV1,HoldAll]
RV1[NX,V,U]
(*
Compute first covariant derivatives
of vectors
*)
DV = Array[,{NX,NX}];
Do[
DV[[i,j]] = D1[NX,V,i,Y,j],
{j,1,NX},{i,1,NX}
]
(* Divergence *)
div=0
Do[
div=div+DV[[i,i]],
{i,NX}
]
div0 = div/.th->0
(* Variables: *)
NV = DIM
U = Array[,NV]
41
(* New coordinate system *)
Y = Array[,NX]
Y[[1]] = r;
Y[[2]] = th;
Y[[3]] = z;
X[[1]] = r Cos[th];
X[[2]] = r Sin[th];
X[[3]] = z;
(* Derivative of a scalar *)
DP = Array[,NX];
Do[
DP[[i]] = D[p[r,th,z],Y[[i]]],
{i,1,NX}
]
DDP = Array[,{NX,NX}];
Do[
DDP[[i,j]] = Dl1[NX,DP,i,Y,j],
{i,1,NX},{j,1,NX}
]
DDQ = Array[,{NX,NX}];
Do[
DDQ[[i,j]] = Sum[DDP[[k,l]] J1[[k,i]] J1[[l,j]],{k,NX},{l,NX}],
{i,1,NX},{j,1,NX}
]
(* Laplacian *)
(*** lap=lap+Sum[g[[i,j]]*Dl1[NX,DS,j,Y,i],{i,1,NX},{j,1,NX}],*)
lap=Sum[DDQ[[i,i]],{i,NX}]
lap0=lap/.th->0
42
Problem 4.11: Invariant expressions
Check if any of these tensor expressions are invariant, and correct them if
not:
j
Ai BijkCt k
Dt (86)
ij
A jk BipqC kq Fk j Gkp H j
jq
H k Ak j Cti B pit q (87)
p j
E i Bikp DkqC jq
Dki G p i (88)
Answers:
A corrected form of (86) is:
j
Ai BikjCt k
Dt
jq
Ei Bikp D pkqC j
Dik G p i
Ai Bi
gi j A j gik Bk
gi j gik A j Bk
δ jk A j Bk
A jB j
which proves that both forms have the same values. If we now consider the first
form then:
∂x̄i j ∂ xk
Āi B̄i A Bk δ jk A j Bk A jB j Ai Bi
∂ x j ∂x̄i
43
which proves the point.
Consider now Ai Bi :
∂ x j ∂ xk
Āi B̄i Aj Bk
∂x̄i ∂x̄i
which can not be reduced further and, therefore is not invariant, since it has a
different form from the LHS.
44
References
[1] Barry Spain. Tensor Calculus. Oliver and Boyd, 1965.
[2] J.L. Synge and A. Schild. Tensor Calculus. Dover Publications, 1969.
45
Index
Associate tensor, 17 Order of a tensor, 5, 9
Orthogonal coordinate system, 24
Cartesian Tensors, 7 Orthogonal coordinates, 21
Christoffel’s symbol, 19
Conjugate metric tensor, 16 Permutation tensor, 11
Conjugate tensor, 17, 21 Physical component, 24
Contraction of indexes, 10
Contraction operation, 18 Raising indices, 17
Contravariant index, 5 Rank of a tensor derivative, 14
Contravariant tensor, 20 Rank of a term, 9
Contravariant vector, 5 Renaming indexes, 11
Contravariant vectors, 4 Renaming of dummy indexes, 10
Coordinate system, 4 Scalar product, 10, 18
Covariant differentiation, 19 Skew-symmetric tensor, 12
Covariant index, 5 Spatial derivative of a tensor, 14
Cross product, 12 Stretching factors, 22, 25
Cylindrical coordinates, 25
Tensor, 5
Divergence operator, 15, 21, 25 Tensor derivative, 14
Dummy index restriction, 10 Tensor equality, 8
Dummy indexes, 9 Tensor expression, 8
Free indexes, 8 Tensor identity, 13
Fundamental tensor, 16 Tensor notation, 4, 7
Tensor rules, 7
Gradient, 14 Tensor terms, 8
Time derivative of a tensor, 13
Invariance, 4, 15, 16 Transformation matrix, 5, 7
Invariant, 17–19 Transformation rule, 4
Invariant forms, 15, 18
Vector product, 12
Kronecker delta tensor, 6
46