## anonymous one year ago Spherical Geometry Let A = ($$\theta_{A}, \psi_{A}$$) be a point on the earth at latitude $$\psi_{A}$$ and longitude $$\theta_{A}$$. Let B = ($$\theta_{B}, \psi_{B}$$) be another point on the earth. Let R be the radius of the earth. Prove that the distance |AB| between A and B is given by $$\cos(\frac{|AB|}{R}) = \sin\psi_{A}\sin\psi_{B} + \cos\psi_{A}\cos\psi_{B}\cos(\theta_{B}-\theta_{A})$$

1. Astrophysics

@ganeshie8

2. Jhannybean

@ikram002p @zzr0ck3r

3. ikram002p

this need a long type -,- (if u wanna prove an exist theorem) and i have to go now, unless u wanna it directly

4. anonymous

If you don't have the time it's okay. It seems like that the problem is asking to prove the law of cosines but with a twist to it. Unless it's simpler than that.

5. anonymous

So, it looks really similar to: $$\cos(c) = \cos(a)\cos(b) + \sin(a)\sin(b)\cos(C)$$ But of course the cosines and sines are flipflopped and the above formula assumed unit sphere. So knowing how to adapt the formula and then see how things got switched up like they did.

6. ganeshie8

$d^2 = (x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2$ change to spherical coordinates and simplify ?

7. anonymous

So represent all the points like $$(\rho, \theta, \phi$$) and see if I can get something?

8. ganeshie8

Exactly! Also $$\rho$$ = constant since we are "on" the sphere

9. ganeshie8

we may first work the formula in regular spherical coordinates changing them to latitude/longitude in the end shouldn't be hard

10. ganeshie8

No wait, that wont work. that formula still gives the direct distance between those two points

11. anonymous

Oh. Lol, okay.

12. anonymous

|dw:1438756659753:dw|

13. ganeshie8

|dw:1438756776294:dw|

14. ganeshie8

once we know the distance $$d$$, its not hard to find the distance along that arc because we know that the shortest distance is always along the "circle whose center is same as the center of the sphere"

15. anonymous

So we're looking at a triangle with a vertex at the origin, right?

16. ganeshie8

Yep, isosceles triangle

17. ganeshie8

the required distance on the sphere is simply $$Rt$$ we can find the angle $$t$$ using law of cosines

18. anonymous

|dw:1438757025200:dw| Oh, so we do want to use $$s = r\theta$$ But we want law of cosines to get the $$\theta$$ first?

19. ganeshie8

Yes maybe call that angle between radii with some other name because you're already using $$\theta$$ for latitude

20. anonymous

|dw:1438757317770:dw|

21. anonymous

$$d^{2} = R^{2} + R^{2} - 2R^{2}\cos(t)$$ $$\frac{2R^{2}-d^{2}}{2R^{2}} = \cos(t)$$

22. anonymous

$$\vec{A}\cdot\vec{B} = ||\vec{A}||||\vec{B}|| \cos(t)$$ Or maybe this idea. Not that it does anything better, lol.

23. ganeshie8

|dw:1438757456725:dw|

24. anonymous

But even then, I don't know how it works where you'd translate that to the actual angles on the triangle. I mean, that is just finding the angle between the vector representations of the points. Not that we need it for this problem, but I wouldn't know how to use that to get the angles of the triangle. Oh, okay, back to spherical coordinates.

25. anonymous

|dw:1438757852912:dw| So if we need $$\phi$$ we want $$\psi = \frac{\pi}{2} - \phi$$ I guess.

26. ganeshie8

Consider two points $$A, B$$ in space whose coordinates in cartesian and spherical are given by : $$A = (x_1,y_1,z_1) = (R, \theta_1,\phi_1)$$ $$B = (x_2,y_2,z_2) = (R, \theta_2,\phi_2)$$

27. anonymous

Oh, wait! So that's why the cosines and sines are flipped from the spherical law of cosines! $$z = \rho \cos(\phi)$$ $$= \rho \cos(\frac{\pi}{2} - \psi) = \rho \sin(\psi)$$

28. ganeshie8

Lets compute the direct distance between them in terms of angles : \begin{align}d^2 &= (x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2\\~\\ &=(R\sin \phi_2\cos\theta_2 -R\sin \phi_1\cos\theta_1 )^2 \\&+ (R\sin \phi_2\sin\theta_2 -R\sin \phi_1\sin\theta_1 )^2\\&+( R\cos\phi_2-R\cos\phi_1)^2\\~\\ &=\cdots \end{align} some simplification is possible here..

29. ganeshie8

that conversion from regular spherical to lat/long looks good to me

30. anonymous

A few things simplify if you expand that out, but its still nasty as a direct distance.

31. ganeshie8

\begin{align}d^2 &= (x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2\\~\\ &=(R\sin \phi_2\cos\theta_2 -R\sin \phi_1\cos\theta_1 )^2 \\&+ (R\sin \phi_2\sin\theta_2 -R\sin \phi_1\sin\theta_1 )^2\\&+( R\cos\phi_2-R\cos\phi_1)^2\\~\\ &=2R^2[1-\sin\phi_2\sin\phi_1\cos(\theta_2-\theta_1)-\cos\phi_2\cos\phi_1] \end{align}

32. anonymous

Okay, Im with ya there. So that's definitely close to what we need.

33. anonymous

$$2R^{2}[1 - \sin(\frac{\pi}{2} - \psi_{2})\sin(\frac{\pi}{2} - \psi_{1})\cos(\theta_{2} - \theta_{1}) - \cos(\frac{\pi}{2} - \psi_{2})\cos(\frac{\pi}{2} -\psi_{1}) ]$$ = $$2R^{2}[1 - \cos\phi_{2}\cos\phi_{1}\cos(\theta_{2}-\theta_{1}) - \sin\psi_{2}\sin\psi_{1} ]$$

34. ganeshie8

we may simply equate that to another $$d^2$$ that we get using cosine law in the triangle

35. anonymous

Ah. With the angle t still or do we need $$\theta$$ and/or $$\psi$$?

36. ganeshie8

|dw:1438759481827:dw|

37. ganeshie8

our goal is to get $$Rt$$ in terms of angles

38. anonymous

$$2R^{2} - 2R^{2}\cos(t) = 2R^{2}[1-\cos\psi_{2}\cos\psi_{1}\cos(\theta_{2}-\theta_{1}) - \sin\psi_{2}\sin\psi_{1}]$$ $$\implies \cos(t) = \cos\psi_{2}\cos\psi_{1}cos(\theta_{2} - \theta_{1}) + \sin\psi_{2}\sin\psi_{1}$$

39. anonymous

Oh, so then you have $$s = Rt \implies t = \frac{s}{R}$$ . And the arc length would be the measure of the side, so can say s = $$|AB|$$. Well, at least I hope I can just go ahead and make that claim, but seems legit :D

40. ganeshie8

looks good! $$s = \text{shortest distance between A,B over sphere}=|AB|$$

41. anonymous

Okay, awesome :D Do you think thatll be the approach to a lot of these spherical problems? Like, even though things are in terms of vectors or long/lat, just turn it all into spherical coordinates? Or are there different ways to do the algebra without leaving vectors and long/lat?

42. ganeshie8

Honestly, I don't know if there are other simpler ways... I used spherical coordinates because thats the only thing I can think of haha!

43. ganeshie8

Alternatively, we may directly optimize the arc length over sphere... there is some method in calculus of variations... but its not on top of my head at the moment..

44. ganeshie8

does this make sense ? http://mathworld.wolfram.com/SphericalDistance.html

45. ganeshie8

This shouldn't matter much but I think the relation between regular spherical coordinates and lat/long is $$\psi = \color{red}{|}\frac{\pi}{2} - \phi\color{red}{|}$$ .

46. anonymous

Yeah, it makes sense in context with everything else. Getting used to the idea that the sides are basically angles now, lol. So yeah, thats angle between vectors formula, but the "angle" is the distance. So maybe it wouldve worked out that way as well. Now I'll have to look through notes and see if I can find out how you get the angle between the actual sides. The angles we're getting are actually sides in disguise. Now need ways to get the actual angles, lol

47. ganeshie8