Lat Lon Xyz Homework

Geometry > Coordinate Geometry >

Interactive Entries > Interactive Demonstrations >

Spherical Coordinates

Spherical coordinates, also called spherical polar coordinates (Walton 1967, Arfken 1985), are a system of curvilinear coordinates that are natural for describing positions on a sphere or spheroid. Define to be the azimuthal angle in the -plane from the x-axis with (denoted when referred to as the longitude), to be the polar angle (also known as the zenith angle and colatitude, with where is the latitude) from the positive z-axis with , and to be distance (radius) from a point to the origin. This is the convention commonly used in mathematics.

In this work, following the mathematics convention, the symbols for the radial, azimuth, and zenith angle coordinates are taken as , , and , respectively. Note that this definition provides a logical extension of the usual polar coordinates notation, with remaining the angle in the -plane and becoming the angle out of that plane. The sole exception to this convention in this work is in spherical harmonics, where the convention used in the physics literature is retained (resulting, it is hoped, in a bit less confusion than a foolish rigorous consistency might engender).

Unfortunately, the convention in which the symbols and are reversed (both in meaning and in order listed) is also frequently used, especially in physics. This is especially confusing since the identical notation typically means (radial, azimuthal, polar) to a mathematician but (radial, polar, azimuthal) to a physicist. The symbol is sometimes also used in place of , instead of , and and instead of . The following table summarizes a number of conventions used by various authors. Extreme care is therefore needed when consulting the literature.

(radial, azimuthal, polar)this work
(radial, azimuthal, polar)Apostol (1969, p. 95), Anton (1984, p. 859), Beyer (1987, p. 212)
(radial, polar, azimuthal)ISO 31-11, Misner et al. (1973, p. 205)
(radial, polar, azimuthal)Arfken (1985, p. 102)
(radial, polar, azimuthal)Moon and Spencer (1988, p. 24)
(radial, polar, azimuthal)Korn and Korn (1968, p. 60), Bronshtein et al. (2004, pp. 209-210)
(radial, polar, azimuthal)Zwillinger (1996, pp. 297-299)

The spherical coordinates are related to the Cartesian coordinates by

where , , and , and the inverse tangent must be suitably defined to take the correct quadrant of into account.

In terms of Cartesian coordinates,

The scale factors are

so the metriccoefficients are

The line element is


the area element


and the volume element


The Jacobian is


The radius vector is


so the unit vectors are

Derivatives of the unit vectors are

The gradient is


and its components are

(Misner et al. 1973, p. 213, who however use the notation convention ).

The Christoffel symbols of the second kind in the definition of Misner et al. (1973, p. 209) are given by

(Misner et al. 1973, p. 213, who however use the notation convention ). The Christoffel symbols of the second kind in the definition of Arfken (1985) are given by

(Walton 1967; Moon and Spencer 1988, p. 25a; both of whom however use the notation convention ).

The divergence is


or, in vector notation,

The covariant derivatives are given by



The commutation coefficients are given by



so , where .


so , .


so .





Time derivatives of the radius vector are

The speed is therefore given by


The acceleration is

Plugging these in gives




Time derivatives of the unit vectors are

The curl is


The Laplacian is

The vector Laplacian in spherical coordinates is given by


To express partial derivatives with respect to Cartesian axes in terms of partial derivatives of the spherical coordinates,

Upon inversion, the result is


The Cartesian partial derivatives in spherical coordinates are therefore

(Gasiorowicz 1974, pp. 167-168; Arfken 1985, p. 108).

The Helmholtz differential equation is separable in spherical coordinates.

SEE ALSO:Azimuth, Colatitude, Great Circle, Helmholtz Differential Equation--Spherical Coordinates, Latitude, Longitude, Oblate Spheroidal Coordinates, Polar Angle, Polar Coordinates, Polar Plot, Polar Vector, Prolate Spheroidal Coordinates, Zenith AngleREFERENCES:

Anton, H. Calculus with Analytic Geometry, 2nd ed. New York: Wiley, 1984.

Apostol, T. M. Calculus, 2nd ed., Vol. 2: Multi-Variable Calculus and Linear Algebra, with Applications to Differential Equations and Probability. Waltham, MA: Blaisdell, 1969.

Arfken, G. "Spherical Polar Coordinates." §2.5 in Mathematical Methods for Physicists, 3rd ed. Orlando, FL: Academic Press, pp. 102-111, 1985.

Beyer, W. H. CRC Standard Mathematical Tables, 28th ed. Boca Raton, FL: CRC Press, 1987.

Bronshtein, I. N.; Semendyayev, K. A.; Musiol, G.; and Muehlig, H. Handbook of Mathematics, 4th ed. New York: Springer-Verlag, 2004.

Gasiorowicz, S. Quantum Physics. New York: Wiley, 1974.

Korn, G. A. and Korn, T. M. Mathematical Handbook for Scientists and Engineers. New York: McGraw-Hill, 1968.

Misner, C. W.; Thorne, K. S.; and Wheeler, J. A. Gravitation. San Francisco, CA: W. H. Freeman, 1973.

Moon, P. and Spencer, D. E. "Spherical Coordinates ." Table 1.05 in Field Theory Handbook, Including Coordinate Systems, Differential Equations, and Their Solutions, 2nd ed. New York: Springer-Verlag, pp. 24-27, 1988.

Morse, P. M. and Feshbach, H. Methods of Theoretical Physics, Part I. New York: McGraw-Hill, p. 658, 1953.

Walton, J. J. "Tensor Calculations on Computer: Appendix." Comm. ACM10, 183-186, 1967.

Zwillinger, D. (Ed.). "Spherical Coordinates in Space." §4.9.3 in CRC Standard Mathematical Tables and Formulae. Boca Raton, FL: CRC Press, pp. 297-298, 1995.

Referenced on Wolfram|Alpha: Spherical CoordinatesCITE THIS AS:

Weisstein, Eric W. "Spherical Coordinates." From MathWorld--A Wolfram Web Resource.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more. »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.

I have recently done something similar to this using the "Haversine Formula" on WGS-84 data, which is a derivative of the "Law of Haversines" with very satisfying results.

Yes, WGS-84 assumes the Earth is an ellipsoid, but I believe you only get about a 0.5% average error using an approach like the "Haversine Formula", which may be an acceptable amount of error in your case. You will always have some amount of error unless you're talking about a distance of a few feet and even then there is theoretically curvature of the Earth... If you require more rigidly WGS-84 compatible approach checkout the "Vincenty Formula."

I understand where starblue is coming from, but good software engineering is often about trade offs, so it all depends on the accuracy you require for what you are doing. For example, the result calculated from "Manhattan Distance Formula" versus the result from the "Distance Formula" can be better for certain situations as it is computationally less expensive. Think "which point is closest?" scenarios where you don't need a precise distance measurement.

Regarding, the "Haversine Formula" it is easy to implement and is nice because it is uses "Spherical Trigonometry" instead of a "Law of Cosines" based approach which is based on two-dimensional trigonometry, therefore you get a nice balance of accuracy over complexity.

A gentlemen by the name of Chris Veness has a great website at that explains some the concepts you are interested in and demonstrates various programmatic implementations; this should answer your x/y conversion question as well.

answered Jul 26 '09 at 21:04

One thought on “Lat Lon Xyz Homework

Leave a Reply

Your email address will not be published. Required fields are marked *