Ask Your Question

Trigonometric simplification for distance on a sphere

asked 2013-07-21 06:53:30 +0100

Mihai Preda gravatar image

updated 2015-01-14 14:24:17 +0100

FrédéricC gravatar image

These are two equivalent equations for distance on a sphere:


dist1(lat1, lat2, dLon)=2*asin(hav(lat1-lat2)+cos(lat1)*cos(lat2)*hav(dLon))

dist2(lat1, lat2, dLon)=acos(sin(lat1)*sin(lat2)+cos(lat1)*cos(lat2)*cos(dLon))

(According to ) Indeed numerically they evaluate equal.

But why their difference does not simplify to 0?



Am I doing something wrong? Is there a way to have Sage prove the two forms are equivalent, or to transform one to another?


edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2013-07-21 09:49:50 +0100

Volker Braun gravatar image

Doesn't look like they are equal, typo?

sage: diff(0.1, 0.2, 0.3)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-07-21 06:53:30 +0100

Seen: 258 times

Last updated: Jul 21 '13