1.5 Systems of Coordinates
1.5.4 Transformation from Cylindrical to Spherical Coordinates
On occasion, there will also be a need to transform vectors or points from cylindrical to spherical coordinates and vice versa.
We list the transformation below without details of the derivation(seeExercise 1.11).
The spherical coordinatesR,θ, andϕare obtained from the cylindrical coordinatesr,ϕ, andzas R¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
r2þz2,
p θ¼ tan1ðr=zÞ, ϕ¼ϕ ð1:91Þ
The scalar components of a vectorAin spherical coordinates can be obtained from the scalar components of the vector in cylindrical coordinates as
AR
Aθ Aϕ 2 4
3 5¼
sinθ 0 cosθ cosθ 0 sinθ
0 1 0
2 4
3 5 Ar
Aϕ Az
2 4
3
5 ð1:92Þ
The cylindrical coordinatesr,ϕ, andzare obtained from the spherical coordinatesR,θ, andϕas
r¼Rsinθ, ϕ¼ϕ, z¼Rcosθ ð1:93Þ
The scalar components of the vector Ain cylindrical coordinates can be obtained from the scalar components of the vector in spherical coordinates as
Ar
Aϕ Az
2 4
3 5¼
sinθ cosθ 0
0 0 1
cosθ sinθ 0 2
4
3 5 AR
Aθ Aϕ 2 4
3
5 ð1:94Þ
The scalar components of the unit vectors are obtained by replacing the scalar components inEq. (1.92) or (1.94)with the appropriate unit vector components (seeExercise 1.11).
Example 1.18 Two points are given in spherical coordinates asP1(R1,θ1,ϕ1) andP2(R2,θ2,ϕ2):
(a) Write the vector connectingP1(tail) toP2(head) in Cartesian coordinates.
(b) Calculate the length of the vector (distance betweenP1andP2).
Solution: The coordinates ofP1and P2are first transformed into Cartesian coordinates, followed by evaluation of the magnitude of the vector connectingP1andP2:
(a) The transformation from spherical to Cartesian coordinates [Eq. (1.82)] for pointsP1andP2gives x1¼R1sinθ1cosϕ1, y1¼R1sinθ1sinϕ1, z1¼R1cosθ1
x2¼R2sinθ2cosϕ2, y2¼R2sinθ2sinϕ2, z2¼R2cosθ2
The vector in Cartesian coordinates is A¼^xðx2x1Þ þ^y
y2y1
þ^z z2z1
¼^xðR2sinθ2cosϕ2R1sinθ1cosϕ1Þ þ^yðR2sinθ2sinϕ2R1sinθ1sinϕ1Þ þ^z
R2cosθ2R1cosθ1
(b) The length of the vector in terms of spherical components can be written from(a):
j jA2¼ðR2sinθ2cosϕ2R1sinθ1cosϕ1Þ2þðR2sinθ2sinϕ2R1sinθ1sinϕ1Þ2þ
R2cosθ2R1cosθ1
2
¼R22sin2θ2cos2ϕ2þR21sin2θ1cos2ϕ12R1R2sinθ1sinθ2cosϕ1cosϕ2þR22sin2θ2sin2ϕ2
þR21sin2θ1sin2ϕ12R1R2sinθ1sinθ2sinϕ1sinϕ2þR22cos2θ2þR21cos2θ12R1R2cosθ2cosθ1
Rearranging terms and using the relation sin2α+ cos2α¼1, we get
j jA2¼R22þR212R1R2sinθ1sinθ2½cosϕ2cosϕ1þsinϕ2sinϕ1 2R1R2cosθ2cosθ1
Using cosα cosβ¼(cos(α– β) + cos(α+β))/2 and sinαsinβ ¼(cos(α– β) – cos(α+ β))/2, after taking the square root of the expression, we get
j j ¼A ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi R22þR212R1R2sinθ1sinθ2cosðϕ2ϕ1Þ 2R1R2cosθ2cosθ1
q
This is a convenient general formula for the calculation of the distance between two points in spherical coordinates, without the need to first convert the points to Cartesian coordinates.
Example 1.19 Two points are given in Cartesian coordinates asP1(0,0,1) andP2(2,1,3) and a vectorAconnectsP1
(tail) toP2(head). Find the unit vector in the direction ofAin spherical and cylindrical coordinates.
Solution: The vectorAconnectingP1(tail) andP2(head) is found first, followed by the unit vector in the direction ofA.
The unit vector is then transformed into spherical and cylindrical coordinates usingEqs. (1.89) and (1.71). The vector connectingP1(tail) andP2(head) is
A¼^xðx2x1Þ þ^y y2y1
þ^z z2z1
¼^x 20
þ^y 10
þ^z 31
¼^x2þ^y1þ^z2
1.5 Systems of Coordinates 35
The unit vector in the direction ofAis A^ ¼A
A¼^x2þ^y1þ^z2
3 ¼^x2
3þ^y1 3þ^z2
3
Taking this as a regular vector in Cartesian coordinates, the transformation of its components into spherical coordinates is
AR
Aθ Aϕ 2 4
3 5¼
sinθcosϕ sinθsinϕ cosθ cosθcosϕ cosθsinϕ sinθ
sinϕ cosϕ 0 2
4
3 5
2 3 1 3 2 3 2 66 66 66 66 4
3 77 77 77 77 5
¼ 1
3ð2 sinθcosϕþsinθsinϕþ2 cosθÞ 1
3ð2 cosθcosϕþ cosθsinϕ2 sinθÞ 1
3ð2 sinϕ cosϕÞ 2
66 66 66 66 4
3 77 77 77 77 5
The unit vector in spherical coordinates is A^ ¼R^1
3ð2 sinθcosϕþ sinθsinϕþ2 cosθÞ þ^θ1
3ð2 cosθcosϕþcosθsinϕ2 sinθÞ ϕ^1 3
2 sinϕ cosϕ
Although we do not show that the magnitude of the unit vector equals 1, the transformation cannot modify a vector in any way other than describing it in different coordinates. You are urged to verify the magnitude of A^. Similarly, the transformation of the components into cylindrical coordinates is [fromEq. (1.71)]
Ar
Aϕ Az
2 4
3
5¼ cosϕ sinϕ 0 sinϕ cosϕ 0
0 0 1
2 4
3 5
2 3 1 3 2 3 2 66 66 66 66 4
3 77 77 77 77 5
¼ 1
3ð2 cosϕþ sinϕÞ 1
3ð2 sinϕcosϕÞ 2
3 2
66 66 66 66 4
3 77 77 77 77 5
and the unit vector in cylindrical coordinates is A^ ¼^r1
3ð2 cosϕþsinϕÞ ϕ^1
3ð2 sinϕcosϕÞ þ^z2 3
Exercise 1.10 RepeatExample 1.19, but first transform the vectorAinto spherical and cylindrical coordinates and then divide each vector by its magnitude to find the unit vector.
Example 1.20 Given the pointsP1(2,2,–5) in Cartesian coordinates andP2(3,π,–2) in cylindrical coordinates, find:
(a) The spherical coordinates ofP1. (b) The spherical coordinates ofP2.
(c) The magnitude of the vector connectingP1(tail) toP2(head).
Solution:
(a) BecauseP1is given in Cartesian coordinates, it is necessary to transform the point to spherical coordinates. The required transformation is given inEq. (1.81):
R1¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi x21þy21þz21
p ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 4þ4þ25
p ¼5:745
θ1 ¼ tan1
ffiffiffiffiffiffiffiffiffiffiffiffiffiffi x21þy21 p
z1
0
@
1
A¼ tan1
ffiffiffiffiffiffiffiffiffiffiffi 4þ4 p
5 0
@
1
A¼ tan1ð0:56568Þ ¼ 29300
Becauseθonly varies between zero andπ, we addπto get
θ1¼ 29300þ180¼150300 and ϕ1¼ tan1 y1
x1
¼ tan1 2
2 ¼45 P1in spherical coordinates is, therefore,P1(5.745,150.300,45).
(b) P2is given in cylindrical coordinates withr¼3,ϕ¼π,z¼–2. To convert it into spherical coordinates, we use the point transformation inEq. (1.91):
R2¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffi r2þz2
p ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 32þ 2ð Þ2
q ¼3:6
θ2¼ tan1 r
z ¼ tan1 3 2
¼ tan1ð1:5Þ ¼ 56180
Adding 180to getθ2between zero andπgives
θ2¼ 56180þ180¼123420 and ϕ2¼180 P2in spherical coordinates isP2(3.6,123420,180).
(c) To calculate the distance, we convertP2from cylindrical to Cartesian coordinates using the transformation inEq. (1.63):
x2¼rcosϕ¼3cosπ¼ 3, y2¼3sinπ¼0, z2¼ 2 The two points are
P1ð2, 2,5Þ, P2ð3, 0,2Þ The vector connectingP1toP2is
A¼^xAxþ^yAyþ^zAz¼^xð32Þ þ^yð02Þ þ^zð2 5ð ÞÞ ¼ ^x5^y2þ^z3 The magnitude ofAis
j j ¼A ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 25þ4þ9
p ¼ ffiffiffiffiffi
p38
¼6:164 The distance betweenP1andP2is 6.164.
Exercise 1.11 Derive the transformation matrices from cylindrical to spherical and spherical to cylindrical coordinates, that is, find the coefficients inEqs. (1.92) and (1.94)by direct application of the scalar product.
Exercise 1.12 Write the vectorAconnecting pointsP1(R1,θ1,ϕ1) andP2(R2,θ2,ϕ2), in cylindrical coordinates.
1.5 Systems of Coordinates 37
Answer
A¼^r
R2sinθ2cosϕ2R1sinθ1cosϕ1
ð ÞcosϕþðR2sinθ2sinϕ2R1sinθ1sinϕ1Þsinϕ þϕ^
ðR2sinθ2cosϕ2R1sinθ1cosϕ1ÞsinϕþðR2sinθ2sinϕ2R1sinθ1sinϕ1Þcosϕ þ^z½R2cosθ2R1cosθ1
Exercise 1.13 Write the vectorAconnecting pointsP1(R1,θ1,ϕ1) andP2(R2,θ2,ϕ2) in spherical coordinates.
Answer A¼R^
R2sinθ2cosϕ2R1sinθ1cosϕ1
sinθcosϕþðR2sinθ2sinϕ2R1sinθ1sinϕ1ÞsinθsinϕþðR2cosθ2R1cosθ1Þcosθ þ^θ
R2sinθ2cosϕ2R1sinθ1cosϕ1
ð ÞcosθcosϕþðR2sinθ2sinϕ2R1sinθ1sinϕ1ÞcosθsinϕðR2cosθ2R1cosθ1Þsinθ þϕ^
ðR2sinθ2cosϕ2R1sinθ1cosϕ1ÞsinϕþðR2sinθ2sinϕ2R1sinθ1sinϕ1Þcosϕ