You are on page 1of 22

ENGI 5432 1.

5 Conversions between Coordinate Systems Page 1-32


1.5 Conversions between Coordinate Systems
In general, the conversion of a vector

x y z
F F F + + F i j k
v
from Cartesian coordinates
(x, y, z) to another orthonormal coordinate system (u, v, w) in
3

(where orthonormal
means that the new basis vectors
, ,
u v w
a a a
are mutually orthogonal and of unit length) is
given by


x y z u u v v w w
F F F F F F + + + + F i j k a a a
v
.
However, ( ) ( ) ( ) ( )


u u x y z u u x u y u z
F F F F F F F + + + + F a i j k a i a j a k a
v
g g g g g
.
F
v
and F
w
are defined similarly in terms of the Cartesian components F
x
, F
y
, F
z
.
In matrix form






u u u
u x
v v v v y
w
z w w w
F F
F F
F
F
1
1
1
1
1
1
1
1
1
1
1
1
]
] 1
]
i a j a k a
i a j a k a
i a j a k a
g g g
g g g
g g g
.
The matrices on the right hand side of the equation will contain a mixture of expressions
in the new (u, v, w ) and old (x, y, z ) coordinates. This needs to be converted into a
set of expressions in (u, v, w ) only.
Example 1.5.1
Express the vector F = y i x j + z k in cylindrical polar coordinates.
x y plane: coordinates x y plane: basis vectors

cos x

cos cos i ig g
sin y
( )
2
1 1 co

in s s

jg
z z
2
1 1 c

os 0

kg
ENGI 5432 1.5 Conversions between Coordinate Systems Page 1-33
Example 1.5.1 (continued)
( )
2
1 1 cos

in

+ ig **

0 i k g
1 1 cos co

jg

0 j k g
2
1 1 c

os 0

kg

1 k k g
The coefficient conversion matrix from Cartesian to cylindrical polar is therefore
cos sin 0
sin cos 0
0 0 1


1
1

1
1
]
Letting c cos , s sin :

y x z s c z + + F i j k i j k
v

( )
( )
( )
polar
0 0 0
0 0
0 0 1 0 0
c s s c s s c
s c c s s c c
z z z


+ 1 1 1 1
1 1 1 1
+
1 1 1 1
1 1 1 1 + +
] ] ] ]
F
v
Therefore

y x z z + + F i j k k
v

** This result can be obtained from the trigonometric identity


( ) cos cos cos sin sin A B A B A B +
Setting
2
and , A B


( )
2 2 2
cos cos cos sin sin 0 1 sin

+
ENGI 5432 1.5 Conversions between Coordinate Systems Page 1-34
We can also generate the coordinate transformation matrix from Cartesian coordinates
(x, y, z ) to spherical polar coordinates (r, , ).
[ is the declination (angle down from the north pole,
0
) and
is the azimuth (angle around the equator
0 2 <
).]
[Vertical] Plane containing z-axis and radial vector r :
cos z r
The projection of the radial vector
r r r
v
onto the plane z = r cos has length
r sin
The angle between r and

k
is

cos k r g
The angle between

and

k
is
2

+
( )
2

cos sin

+ kg
[Horizontal] Plane z = r cos :
The projection of
r r onto the x axis (

i
)
is ( ) ( )

sin cos x r r r i g

sin cos i r g
r =
cos , sin sin , cos sin , , r r r z y x
.
The projection of
r r onto the y axis (

j )
is ( ) ( )

sin sin y r r r j g

sin sin j r g
The angle between

and

j is


cos jg
The angle between

and

i
is
2

+
( )
2

cos sin

+ ig
The remaining three entries in the coordinate conversion matrix can be found in a similar
way.
ENGI 5432 1.5 Conversions between Coordinate Systems Page 1-35
The conversion matrix from Cartesian to spherical polar coordinates is then


sin cos sin sin cos

cos cos cos sin sin
sin cos 0



1

1
1
1
1
1
1
1
]
1
]
i r j r k r
i j k
i j k


Example 1.5.2
Convert

y x F i j
v
to spherical polar coordinates.
Let
1 1 2 2
cos , sin , cos , sin c s c s
1 2 1 2
, y rs s x rs c
1 2 1 2 1 1 2
1 2 1 2 1 1 2
2 2
0 0
r
s c s s c rs s
c c c s s rs c
s c
F
F
F

1
1
1
1

1
1
1
1

1
1

1
1

]
] ]
F
v

( )
( )
( )
2
1 2 2 2 2
1 1 2 2 2 2
2 2
1
1 2 2
0
0
rs c s s c
rs c c s s c
rs
rs s c
1
1
1
1

1
1
1
1

1

]
Therefore

sin r F
v

Expressions for the gradient, divergence, curl and Laplacian operators in any orthonormal
coordinate system will follow in section 1.7.
ENGI 5432 1.5 Conversions between Coordinate Systems Page 1-36
Summary for Coordinate Conversion:
To convert a vector expressed in Cartesian components

x y z
v v v + + i j k into the
equivalent vector expressed in cylindrical polar coordinates

z
v v v

+ + k , express
the Cartesian components v
x
, v
y
, v
z
in terms of
( ) , , z
using
x = cos , y = sin , z = z ; then evaluate
cos sin 0
sin cos 0
0 0 1
x
y
z z
v v
v v
v v



1 1 1
1 1 1

1 1 1
1 1 1
] ] ]
Use the inverse matrix to transform back to Cartesian coordinates:
cos sin 0
sin cos 0
0 0 1
x
y
z z
v v
v v
v v



1 1 1
1 1 1

1 1 1
1 1 1
] ] ]
To convert a vector expressed in Cartesian components

x y z
v v v + + i j k into the
equivalent vector expressed in spherical polar coordinates

r
v v v

+ + r , express the
Cartesian components v
x
, v
y
, v
z
in terms of
( ) , , r
using
sin cos , sin sin , cos x r y r z r
; then evaluate
sin cos sin sin cos
cos cos cos sin sin
sin cos 0
r x
y
z
v v
v v
v v




1
1 1
1
1 1

1
1 1
1
1 1
] ]
]
Use the inverse matrix to transform back to Cartesian coordinates:
sin cos cos cos sin
sin sin cos sin cos
cos sin 0
x r
y
z
v v
v v
v v




1 1 1
1
1 1

1
1 1
1
1 1
] ]
]
Note that, in both cases, the transformation matrix A is orthogonal, so that A
1
= A
T
.
This is generally true for transformations between orthonormal coordinate systems.
ENGI 5432 1.6 Basis Vectors in Other Coordinate Systems Page 1-37
1.6 Basis Vectors in Other Coordinate Systems
In the Cartesian coordinate system, all three basis vectors are absolute constants:

d d d
dt dt dt
i j k 0
v
The derivative of a vector is then straightforward to calculate:
( )
1 2 3
1 2 3

d df df df
f f f
dt dt dt dt
+ + + + i j k i j k
But many non-Cartesian basis vectors are not constant.
Cylindrical Polar:

cos sin + i j

sin cos

+ i j

k k
( ) ( )

sin Let th s en co
d
dt
+
/ /

/
v
v i j
& &
v
&
& &

( ) ( )

cos s

in +
/ / /
i j
&
& & &

0 k
&
v
Therefore if a vector
F
v
is described in cylindrical polar coordinates

, then
z
F F F

+ + F k
v

( ) ( ) ( )


z
F F F F F

+ + + + 0 F k
v
& & & & & &

( ) ( ) ( )

z
F F F F F

+ + + k
& & & & &

ENGI 5432 1.6 Basis Vectors in Other Coordinate Systems Page 1-38
In particular, the displacement vector is ( ) ( ) ( )

0 t t z t + + r k
v
, so that the
velocity vector is

d d d d z
dt dt dt dt

+ +
r
v k
v
v

Example 1.6.1
Find the velocity and acceleration in cylindrical polar coordinates for a particle travelling
along the helix x = 3 cos 2t , y = 3 sin 2t , z = t .
Cylindrical polar coordinates:
cos , sin , x y z z
2 2 2
, tan
y
x y
x
+
2 2 2
9cos 2 9sin 2 9 3 0 t t + &
3sin 2
tan tan 2 2 2
3cos 2
t
t t
t

&
1 z t z &

0 3 2 1 6
d
dt
+ + +
r
v k k
v
v

[The velocity has no radial component the helix remains the same distance from the
z axis at all times.]

6 6 12
d
dt
+ +
v
a k 0
v
v
v & &
&

[The acceleration vector points directly at the z axis at all times.]

ENGI 5432 1.6 Basis Vectors in Other Coordinate Systems Page 1-39
Spherical Polar Coordinates
Vertical plane containing z-axis and radial vector r :

sin cos sin sin cos + + i j r k

cos cos cos sin sin

+ i j k
Equatorial plane (
0
):
[
sin is the projection of r onto the equatorial
plane.]

sin cos

+ i j
[This reproduces the three rows of the coordinate conversion matrix in section 1.5.]

cos cos sin sin



cos sin sin c n

os si
d d
dt
d
dt dt
d d d
dt dt dt




_


,
_ _
+ + +

, ,
i
j
r
k


sin
d d d
dt dt dt

+
r

sin cos cos sin



sin sin cos c

os cos
d d
dt dt
d d d
dt dt dt
d
dt




_


,
_ _
+ + +

,

,
i
j k

cos
d d d
dt dt dt

+ r

ENGI 5432 1.6 Basis Vectors in Other Coordinate Systems Page 1-40
Spherical Polar Coordinates (continued)

cos sin

d d
dt t t
d
d d


_ _
+


, ,
i j

2 2
2 2

But sin cos sin cos sin sin sin cos

cos cos cos sin sin cos

cos sin



+ + +
+ +
+
r i j k
i j k
i j

( )

sin cos
d d
dt dt

+ r

In particular, the displacement vector is


r r r
v
, so that the velocity vector is


sin
d dr d dr d d
r r
dt dt dt dt dt dt

_
+ + +

,
r r
v r r
v
v


sin
dr d d
r r
dt dt dt

+ + v r
v

It can be shown that the acceleration vector in the spherical polar coordinate system is
2 2
2
2
2
2
2
2 2
sin
1

sin 2
2
1

sin
sin
d d r d d
r
dt dt dt dt
d d r d
r
r dt dt dt
d d
r
r dt dt

_ _
_ _
+


, ,
, ,
_
_ _
+



, ,
,
_ _
+

, ,
v
a r
v
v

Compare this to the Cartesian equivalent


2 2 2
2 2 2

d x d y d z
dt dt dt
+ + a i j k
v
!
ENGI 5432 1.6 Basis Vectors in Other Coordinate Systems Page 1-41
Example 1.6.2
Find the velocity vector v for a particle whose displacement vector r, in spherical polar
coordinates, is given by r = 4, = t , = 2t , (0 < t < ) .
4 , , 2 0 , 1, 2
dr d d
r t t
dt dt dt



sin
dr d d
r r
dt dt dt

+ + v r
v

( )

0 4 1 4 sin 2 t + + r
( )

4 8sin t t + v
v

[This describes a path spiralling around a sphere of radius 4, from pole to pole.]
Summary:
Cylindrical Polar:

d d
dt dt

z + r k
v

d d
dt dt


z
z + + v e
v
&
& &

d
dt
k 0
v
Spherical Polar:


sin
d d d
dt dt dt

+
r

cos
d d d
dt dt dt

+ r

( )

sin cos
d d
dt dt

+ r

r r r

sin r r r + + v r
v
& &
&
ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-42
1.7 Gradient Operator in Other Coordinate Systems
For any orthogonal curvilinear coordinate system (u
1
, u
2
, u
3
) in
3
,
the unit tangent vectors along the curvilinear axes are

i
i
i i
h u

r
e T
v
,
where the scale factors
i
i
h
u

r
v
.
The displacement vector r

can then be written as 3 3 2 2 1 1


e e e r u u u + +

, where the
unit vectors i
e
form an orthonormal basis for
3
.
( )
( )

'


j i
j i
ij j i
1
0
e e
[
ij
is the Kronecker delta.]
The differential displacement vector dr is (by the Chain Rule)
1 2 3 1 1 1 2 2 2 3 3 3
1 2 3
du du du h du h du h du
u u u

+ + + +

r r r
dr e e e
v v v
v
and the differential arc length ds is
( ) ( ) ( )
2 2 2
2
1 1 2 2 3 3
ds h du h du h du + + dr dr
v v
g
The element of volume dV is

( )
( )
3 2 1
3 2 1
3 2 1 3 2 1
, ,
, ,
du du du
u u u
z y x
du du du h h h dV


3 2 1
3 3 3
2 2 2
1 1 1
du du du
u
z
u
y
u
x
u
z
u
y
u
x
u
z
u
y
u
x


Gradient operator
3 1 2
1 1 2 2 3 3

h u h u h u

+ +

e e e
v


Gradient
3 1 2
1 1 2 2 3 3
V V V
V
h u h u h u

+ +

e e e
v


Divergence
( ) ( ) ( )
2 3 1 3 1 2 1 2 3
1 2 3 1 2 3
1 h h f h h f h h f
h h h u u u
_
+ +


,
F
v v

ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-43
Curl
1 1 2 2 3 3
1 2 3 1 2 3
1 1 2 2 3 3

1
h h h
h h h u u u
h f h f h f



e e e
F
v v

Laplacian
2 2 3 3 1 1 2
1 2 3 1 1 1 2 2 2 3 3 3
1 h h h h h h V V V
V
h h h u h u u h u u h u
_ _ _ _
+ +



, , , ,
Cartesian: h
x
= h
y
= h
z
= 1 .
Cylindrical polar:
1,
z
h h h


.
Spherical polar:
1, , sin
r
h h r h r


.
The familiar expressions then follow for the Cartesian coordinate system.
In cylindrical polar coordinates, naming the three basis vectors as

, , , k we have:

0 , 0, z z + + r k
v

The relationship to the Cartesian coordinate system is

cos , sin , x y z z
2 2 2
, tan
y
x y
x
+
One scale factor is
2 2 2
x y
h
z


_ _ _
+ +


, ,

,
r
v
( ) ( ) ( )
2 2 2
cos sin z

_ _ _
+ +


, , ,
2 2
cos sin 0 1 + +
In a similar way, we can confirm that
and 1
z
h h


.
ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-44
In cylindrical polar coordinates,
z
h h h d d dz z V d d d d


( ) ( ) ( ) ( ) ( ) ( )
2
2
2
2
2 2 2
z
h d h d h dz d z d d d s

+ + + +

z

+ +

k
v

V V V
z
V


+ +


k
v


( ) ( ) ( )
1 1 1
1 1
1 1
z
f f
f
z



_




+ +

,
F
v v

1
z
f f f
f
z




+ + +

1
1 1
z
z
f f f

k
F
v v

2
1 1 1 1 1
1 1
V V
z
V
V
z


_ _ _ _
+ +

, , ,
2 2 2
2 2 2 2
1 1 V V V V
z

+ + +

All of the above are undefined on the z-axis ( = 0), where there is a coordinate
singularity. However, by taking the limit as
0
, we may obtain well-defined values
for some or all of the above expressions.
ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-45
Example 1.7.1
Given that the gradient operator in a general curvilinear coordinate system is
1 2 3
1 1 2 2 3 3

h u h u h u
_
+ +


,
e e e
v

, why isnt the divergence of


1 1 2 2 3 3
F F F + + F e e e
v
equal, in general, to
1 2 3
1 1 2 2 3 3
1 1 1
?
F F F
h u h u h u
_
+ +


,
The quick answer is that the differential operators operate not just on the components
1 2 3
, , F F F
, but also on the basis vectors
1 2 3
, , e e e
. In most orthonormal coordinate
systems, these basis vectors are not constant. The divergence therefore contains
additional terms.
( )
1 2 3
1 1 2 2 3 3
1 1 2 2 3 3
F F F
h u h u h u
_
+ + + +


,
e e e
e e e
1 1 1 1 1 2 1 1
1
1 1 1 1 2 2
F F F
h u h u h u
_
+ +


,
e e e e e
e
3 1 1 1 1
2
2 2 3 3
F F
h u h u
_

+ +


,
e e e
e
1 1
3
3 3
F
h u
_

+ +

,
e
e
1 2 2
1 1
F
h u

e e
3 2 2 2 2 2 2 2 2 2
1 2
1 1 2 2 2 2 3 3
F F F F
h u h u h u h u
_
_
+ + + +



,
,
e e e e e e
e e
2 2
3
3 3
F
h u
_

+ +

,
e
e
1 3 3
1 1
F
h u

e e
3 3 2 3 3
1
1 1 2 2
F F
h u h u
_

+ +


,
e e e
e
3 3 3 3 3 3 3
2 3
2 2 3 3 3 3
F F F
h u h u h u
_
_
+ + +



,
,
e e e e
e e
=
+

,
_

,
_

,
_

3
1
3
3
1
2
1
2
2
1
1
1
1
1
1
1
1
1
1
u h
F
u h
F
u h
F
u
F
h
e
e
e
e
e
e
+

,
_

,
_

,
_

3
2
3
3
2
2
2
2
2
2
2
2
2 1
2
1
1
2
1
u h
F
u h
F
u
F
h u h
F e
e
e
e
e
e

,
_

,
_

,
_

3
3
3
3
3
3
3
3 2
3
2
2
3
1
3
1
1
3
1
u h
F
u
F
h u h
F
u h
F e
e
e
e
e
e
For Cartesian coordinates, all derivatives of any basis vector are zero, which leaves the
familiar Cartesian expression for the divergence. But for most non-Cartesian coordinate
systems, at least some of these partial derivatives are not zero. More complicated
expressions for the divergence therefore arise.
ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-46
Example 1.7.1 (continued)
For cylindrical polar coordinates, we have
1

1 1
F F



1
F F
z


_
_ _
+ +



, ,
,
k

+

1
F

,
g


1

1
F F F
z


_ _

+ + +



, ,
k g g

+

1
z
F

,
k

z
F

_

,
k

1 1
z z
F F
z z

+ +

k
k
_


,

But none of the basis vectors varies with or z * and the basis vector

k
is absolutely
constant. Therefore the divergence becomes
( )
1

0 0
1
F F


_ _
+ + + +


, ,

( )

0
F F


+ +

g

( ) 0
_
+ +

,
( ) ( )
1
0 0 0
1
z
F
z
_
+ + +

,

But


F F F


_ _



, ,



and ( )


0
F F


_
_





,
,


So we recover the cylindrical polar form for the divergence,
1
div
z
F F F
F
z




+ + +

F
v
* As shown here, the basis vectors
and


clearly vary with but do not change with .
k is an absolute constant.
ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-47
In spherical polar coordinates, naming the three basis vectors as

, , , r we have:

0 0 , 0, 0 r r + + r r
v

The relationship to the Cartesian coordinate system is
sin cos , sin sin , cos x r y r z r
.
One of the scale factors is
2 2 2
x y
h
z


_ _ _
+ +


, ,

,
r
v
( ) ( ) ( )
2 2 2
sin cos sin sin cos r r r

_ _ _
+ +


, , ,
( ) ( ) ( )
2 2 2
cos cos cos sin sin r r r + +
( )
2 2 2 2 2 2
cos cos sin sin cos sin r r r + + +
In a similar way, we can confirm that
1 and sin
r
h h r


.
( )
2
1 sin sin r r dr d d d d r dr d V

( ) ( ) ( )
2 2 2
2 2 2 2 2 2 2
1 sin sin dr r d r d dr r d r s d d + + + +

1 sin r r r

+ +


r
v


sin
V V V
r r r
V


+ +

r
v


( ) ( ) ( )
1
sin 1 sin 1
1 sin
r
r f
r f r r f
r r r



_


+ +

,
F
v v

( ) ( )
2
2
sin
1
sin
sin
r
r f f f
r r
r r


_

+ +


,
2 1 cot 1
sin
r
r
f
f f
f f
r r r r r


+ + + +

ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-48
2

sin
1
sin
sin
r
r r
r r
f r f r f

r
F
v v

2
2
2
1 sin sin
sin 1 sin
V
r V r V r V
r r r r r


_ _ _ _
+ +


,
, , ,

2
2
1 1
sin sin
sin sin
V V V
r
r r r


_ _ _ _
+ +


, , , ,
2 2 2
2 2 2 2 2 2 2
2 1 cot 1
sin
V V V V V
r r r r r r



+ + + +

All of the above are undefined on the z-axis (sin = 0), where there is a coordinate
singularity. However, by taking the limit as
sin 0
, we may obtain well-defined
values for some or all of the above expressions.
ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-49
Example 1.7.2
A vector field has the equation, in cylindrical polar coordinates (, , z),

n n
k k


F e
v

Find the divergence of F and the value of n for which the divergence vanishes for all
0 >
.
In cylindrical polar coordinates,
1
div
F F F



+ +

F
v
z
F
z

, 0
n
z
F k F F


( )
1 1
div 0 0 1
n
n n
k
kn k n


+ + + F
v
and clearly
div 0 when 1 n F
v
.

F
v

is therefore a source-free field everywhere except on the z axis.


ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-50
Example 1.7.3
In spherical polar coordinates,
( ) ( ) ( ) ( )

, , cot 2 , r f f g r + F r
v
,
where f () is any differentiable function of only
and g (r, ) is any differentiable function of r and only.
Find the divergence of F.
( ) ( ) ( ) cot , 2 , ,
r
F f F f F g r


For spherical polar coordinates,
( ) ( )
2
2
sin
1
sin
sin
r
r F F F
r r
r r


_

+ +


,
F
v v
g
( ) ( ) ( ) ( ) ( )
2
2
cot 2sin , 1
sin
sin
r f f g r
r r
r r


_

+ +


,
F
v v
g
( ) ( ) ( ) ( )
2
2
cot 2 sin
0
sin
r
f f
r r r


+

( ) ( ) 2 cot 2 cot
0
f f
r r


everywhere (except possibly on the z axis, where
sin 0 r
).
ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-51
Example 1.7.4
( ) ( )

Find curl sin +
, where , are the two angular coordinates in the standard
spherical polar coordinate system.
2 2
2

sin sin
1 1
sin sin
sin 0 sin sin
r
r r r r
r r r r
f r f r f r r







r r
F
v v

( ) ( ) ( )
( )
2
2
1

2 sin cos 0 0 sin sin sin 0
sin
r r r
r

+ + r
( )
1

2 cos sin sin
r
+ F r
v v

ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-52
Central Force Law
If a potential function V(x, y, z), (due solely to a point source at the origin) depends only
on the distance r from the origin, then the functional form of the potential can be
deduced. Using spherical polar coordinates:
V (r, , ) = f (r)
2
2 2
2 2
1 2 d df d f df
V r
r dr dr dr r dr
_
+

,
But, in any regions not containing any sources of the vector field, the divergence of the
vector field V F
v v
(and therefore the Laplacian of the associated potential function V)
must be zero. Therefore, for all r 0,
2
2
2
0
d f df
dr r dr
+
Solve this ODE by reduction of order:
2
Let then 0
df dy
y y
dr dr r
+
( )
2
2 ln 2ln ln
dy dr
y r C Br
y r

+

2
df
y Br
dr


1
1
Br
f A

( ) , ,
B
V r A
r

OR (a much faster solution!)
( )
2 2 2
2
1
0 0 0
d dV dV
V r r B r
r dr dr dr
_


,
2
dV B B
V A
dr r r

ENGI 5432 1.7 Gradient Operator in Other Coordinate Systems Page 1-53
Gravity is an example of a central force law, for which the potential function must be of
the form ( ) , ,
B
V r A
r
. The zero point for the potential is usually set at infinity:
lim lim 0
r r
B
V A A
r

_


,
The force per unit mass due to gravity from a point mass M at the origin is
2

GM
V
r
F r
v v

But, in spherical polar coordinates,


2


sin
V V V dV B
V
r r r dr r

+ +

r r r
v

2 2
GM B
B GM
r r

Therefore the gravitational potential function is
( )
GM
V r
r

The electrostatic potential function is similar, with a different constant of proportionality.
END OF CHAPTER 1

You might also like