Document

Tensor examples (9/28/16):
Example 1: The metric tensor for Euclidean space using spherical coordinates is:
1 0
π‘”π‘”π‘Žπ‘Žπ‘Žπ‘Ž = οΏ½0 π‘Ÿπ‘Ÿ 2
0 0
0
οΏ½
0
π‘Ÿπ‘Ÿ 2 sin2 πœƒπœƒ
a) Calculate the inverse metric
b) Given a vector with components, π΄π΄π‘Žπ‘Ž = (1, π‘Ÿπ‘Ÿ, 0), calculate the one-form components π΄π΄π‘Žπ‘Ž .
c) Given a one-form with components, π΅π΅π‘Žπ‘Ž = (0, βˆ’π‘Ÿπ‘Ÿ 2 , cos 2 πœƒπœƒ), calculate the vector components
π΅π΅π‘Žπ‘Ž .
d) Calculate 𝐴𝐴⃗ β‹… 𝐴𝐴⃗.
οΏ½βƒ— β‹… 𝐡𝐡
οΏ½βƒ—.
e) Calculate 𝐡𝐡
οΏ½βƒ—.
f) Calculate 𝐴𝐴⃗ β‹… 𝐡𝐡
π‘Žπ‘Ž
g) Transform 𝐴𝐴 to Cartesian coordinates.
h) Transform π΅π΅π‘Žπ‘Ž to Cartesian coordinates.
οΏ½βƒ—.
i) Re-calculate 𝐴𝐴⃗ β‹… 𝐴𝐴⃗ and 𝐴𝐴⃗ β‹… 𝐡𝐡
0
Example 2: Show that the metric tensor transforms like a type οΏ½ οΏ½ tensor.
2
Example 3: Given the transformation from Cartesian coordinates,
where 𝑐𝑐 is an arbitrary constant.
a) Find the inverse transform.
𝑝𝑝 = π‘₯π‘₯
π‘žπ‘ž = 𝑦𝑦 βˆ’ 𝑐𝑐π‘₯π‘₯ 2
1 0
οΏ½ to the new coordinate system
b) Transform the metric, 𝑔𝑔𝑖𝑖𝑖𝑖 = οΏ½
0 1
c) Transform the Cartesian basis vectors, πš€πš€Μ‚ and πš₯πš₯Μ‚.
2
d) Calculate �𝑒𝑒⃗𝑝𝑝 οΏ½
Table of Contents
Define the variables .............................................................................................................
Calculate the transformation matrix ........................................................................................
Transform A and calculate dot(A,A) ......................................................................................
Transform B and calculate dot(A,B) .......................................................................................
Define the variables
clear
syms r theta phi real
x = r*sin(theta)*cos(phi);
y = r*sin(theta)*sin(phi);
z = r*cos(theta);
assume(r, 'real')
assume(theta>0&theta<pi)
assume(phi>0&phi<2*pi)
Calculate the transformation matrix
L = jacobian([x,y,z],[r,theta,phi])
L =
[ cos(phi)*sin(theta), r*cos(phi)*cos(theta), -r*sin(phi)*sin(theta)]
[ sin(phi)*sin(theta), r*cos(theta)*sin(phi), r*cos(phi)*sin(theta)]
[
cos(theta),
-r*sin(theta),
0]
Transform A and calculate dot(A,A)
Artp = [1;r;0]
Axyz = L*Artp
A2 = simplify(dot(Axyz,Axyz),1000)
Artp =
1
r
0
Axyz =
cos(phi)*cos(theta)*r^2 + cos(phi)*sin(theta)
cos(theta)*sin(phi)*r^2 + sin(phi)*sin(theta)
- sin(theta)*r^2 + cos(theta)
1
1
1
1
2
A2 =
r^4 + 1
Transform B and calculate dot(A,B)
Brtp = [0;-1;(cot(theta)/r)^2]
Bxyz = simplify(L*Brtp,1000)
AdotB = simplify(dot(Axyz,Bxyz),1000)
Brtp =
0
-1
cot(theta)^2/r^2
Bxyz =
- r*cos(phi)*cos(theta) - (cos(theta)^2*sin(phi))/(r*sin(theta))
(cos(phi)*cos(theta)^2)/(r*sin(theta)) - r*cos(theta)*sin(phi)
r*sin(theta)
AdotB =
-r^3
Published with MATLAB® R2016a
2
60 5. ARBITR ARY COORDINATES
BOX 5.3 A 2D Example: Parabolic Coordinates
q=3
q=2
eq
eq
the p = constant and q = constant
curves for parabolic coordinates
and the parabolic coordinate basis
vectors at selected points.
O ep
–3
–2 –1
q=0 q
q = –1
FIG. 5.4. A diagram that displays
p = –4
q=1
ei
0
q = –2
q = –3
1
2
3
4
Consider the parabolic coordinate system p, q shown in figure 5.4. The transformation functions from ordinary cartesian coordinates x, y to these coordinates are
p (x, y) = x
and
q (x, y) = y - cx2 (5.23)
where c is a constant. The inverse transformation functions are
x ( p, q) = p and y ( p, q) = cp2 + q (5.24)
Exercise 5.3.1. Show that equations 5.24 are the correct inverse transformations.
Exercise 5.3.2. Calculate all eight partial derivatives 2xln /2x o and 2x n /2xlo .
The metric equation for the cartesian coordinates x, y is ds2 = dx2 + dy2 , so the
metric tensor for these coordinates must be
gab = <
1 0
F(5.25)
0 1
You can use equation 5.11 to show that the metric for the p, q system is
1+ 4c2 p2 2cp
G(5.26)
glno = =
2cp
1