oliviayychengwh

2021-12-21

The distance between point and given in spherical coordinates extract the formula.

Cheryl King

Expert

Step 1
Given point
Let corresponding coutesian cordinates are,

Relation between coutesian cordinates and sherical coordinates are

Distance between paints
$d=\sqrt{{\left({x}_{1}-{x}_{2}\right)}^{2}+{\left({y}_{1}-{y}_{2}\right)}^{2}+{\left({z}_{1}-{z}_{2}\right)}^{2}}$
$=\sqrt{{x}_{1}^{2}+{x}_{2}-2{x}_{1}{x}_{2}+{y}_{1}^{2}+{y}_{2}^{2}-2{y}_{1}{y}_{2}+{z}_{1}^{2}+{z}_{2}^{2}-2{z}_{1}{z}_{2}}$

ambarakaq8

Expert

Assuming that $\theta$ is the latitude and $\varphi$ is the longitude we have that the cartesian coordinates of the first point are:

so the distance between the two points is given by:
$\sqrt{{\rho }_{1}^{2}+{\rho }_{2}^{2}-2{\rho }_{1}{\rho }_{2}\left({\mathrm{cos}\theta }_{1}{\mathrm{cos}\theta }_{2}\mathrm{cos}\left({\varphi }_{1}-{\varphi }_{2}\right)+{\mathrm{sin}\theta }_{1}{\mathrm{sin}\theta }_{2}\right\}}$

nick1337

Expert

Step 1
The expression of the distance between two vectors in spherical coordinates provided in the other response is usually expressed in a more compact form that is not only easier to remember but is also ideal for capitalizing on certain symmetries when solving problems.
$||r-{r}^{\prime }||=\sqrt{\left(x-{x}^{\prime }{\right)}^{2}+\left(y-{y}^{\prime }{\right)}^{2}+\left(z-{z}^{\prime }{\right)}^{2}}$
$=\sqrt{{r}^{2}+{r}^{\prime 2}-2r{r}^{\prime }\left[\mathrm{sin}\left(\theta \right)\mathrm{sin}\left({\theta }^{\prime }\right)\mathrm{cos}\left(\varphi \right)\mathrm{cos}\left({\varphi }^{\prime }\right)+\mathrm{sin}\left(\theta \right)\mathrm{sin}\left({\theta }^{\prime }\right)\mathrm{sin}\left(\varphi \right)\mathrm{sin}\left({\varphi }^{\prime }\right)+\mathrm{cos}\left(\theta \right)\mathrm{cos}\left({\theta }^{\prime }\right)\right]}$
$=\sqrt{{r}^{2}+{r}^{\prime 2}-2r{r}^{\prime }\left[\mathrm{sin}\left(\theta \right)\mathrm{sin}\left({\theta }^{\prime }\right)\left(\mathrm{cos}\left(\varphi \right)\mathrm{cos}\left({\varphi }^{\prime }\right)+\mathrm{sin}\left(\varphi \right)\mathrm{sin}\left({\varphi }^{\prime }\right)\right)+\mathrm{cos}\left(\theta \right)\mathrm{cos}\left({\theta }^{\prime }\right)\right]}$
$=\sqrt{{r}^{2}+{r}^{\prime 2}-2r{r}^{\prime }\left[\mathrm{sin}\left(\theta \right)\mathrm{sin}\left({\theta }^{\prime }\right)\mathrm{cos}\left(\varphi -{\varphi }^{\prime }\right)+\mathrm{cos}\left(\theta \right)\mathrm{cos}\left({\theta }^{\prime }\right)\right]}$
This form makes it fairly transparent how azimuthal symmetry allows you to automatically eliminate some of the angular dependencies in certain integration problems
Another advantage of this form is that you now have at least two variables, namely ,  that appear in the equation only once, which can make finding series expansions w.r.t. these variables a little less of a pain than the others.

Do you have a similar question?