Difference between haversine and law of cosines

  • Thread starter Thread starter ngc2024
  • Start date Start date
  • Tags Tags
    Difference Law
Click For Summary
SUMMARY

The discussion centers on the derivation of the haversine formula from the spherical law of cosines. The spherical law of cosines is defined as cos(C) = cos(A)cos(B) + sin(A)sin(B)cos(α), while the haversine formula is expressed as d = 2 × r × arcsin(√(sin²((φ₂ - φ₁)/2) + cos(φ₁)cos(φ₂)sin²((λ₂ - λ₁)/2))). The key modification involves the transformation of the sine terms, specifically the transition from sin(φ₁)sin(φ₂) to sin²((φ₂ - φ₁)/2), which is crucial for accurate distance calculations on a sphere. The discussion highlights the mathematical identities that connect these two formulas.

PREREQUISITES
  • Understanding of spherical trigonometry
  • Familiarity with the haversine formula
  • Knowledge of the spherical law of cosines
  • Basic calculus, particularly arcsin and trigonometric identities
NEXT STEPS
  • Study the derivation of the haversine formula in detail
  • Learn about spherical trigonometric identities
  • Explore applications of the haversine formula in geolocation
  • Investigate numerical methods for calculating distances on a sphere
USEFUL FOR

Students in mathematics or physics, geographers, software developers working with geospatial data, and anyone interested in understanding spherical distance calculations.

ngc2024
Messages
15
Reaction score
0

Homework Statement


I am currently attempting to derive the haversine formula from the sperhical law of cosines. My only problem is that it seems to me that there is some kind of modification from the cosine law to the haversine. My question is if anyone knows what and why a modification has been implemented?


Homework Equations


The law of sperical cosines:
cos(C)=cos(A)cos(B)+sin(A)sin(B)cos(α)


The haversine formula:
d=2\times r\times arcsin\sqrt{sin^2\frac{\phi_2-\phi_1}{2}+cos(\phi_1)cos(\phi_2)sin^2\frac{\lambda_2-\lambda_1}{2}}

The Attempt at a Solution


In fear of being taken for plagiarism in my paper, I can't show my whole working here. However, the problem seems to be, that when you work with the spherical law of cosines, parts of the expression equals: \frac{sin(\phi_1)sin(\phi_2)}{-2}
whereas the haversine here equals:sin^2 (\frac{\phi_2-\phi_1}{2})
These expressions are not equal? Why has it been changed?

Thank you
 
Physics news on Phys.org
Thank you, but unfortunately not. The article maintaines that the formulas are equal, which other pages and my own formulas go against...
 
Without seeing your work it is not possible to determine where your error is.

If you followed the links in the haversine formula article you would find the identities:
http://en.wikipedia.org/wiki/Haversine
 
Starting with: cos(C) = cos(A) cos(B) + sin(A) sin(B) cos(a) and using cos(A-B) = cos(A) cos(B) + sin(A) sin(B) gives,

cos(C) = cos(A-B) - sin(A) sin(B) +sin(A) sin(B) cos(a)
cos(C) = cos(A-B) - sin(A) sin(B) (1-cos(a))
1 + cos(C) = 1 + cos(A-B) - sin(A) sin(B) (1-cos(a)) adding 1 to both sides
1 - cos(A-B) = 1 - cos(C) - sin(A) sin(B) (1-cos(a)) regrouping and dividing every member by 2
(1 - cos(A-B))/2= (1 - cos(C))/2 - sin(A) sin(B) (1-cos(a))/2
have(A-B) = have(C) - sin(A) sin(B) have(a)
 

Similar threads

Replies
5
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
8
Views
3K
Replies
12
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K