1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Difference between haversine and law of cosines

  1. Oct 8, 2013 #1
    1. The problem statement, all variables and given/known data
    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?


    2. Relevant equations
    The law of sperical cosines:
    [itex]cos(C)=cos(A)cos(B)+sin(A)sin(B)cos(α)[/itex]


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

    3. 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: [itex]\frac{sin(\phi_1)sin(\phi_2)}{-2}[/itex]
    whereas the haversine here equals:[itex] sin^2[/itex] ([itex]\frac{\phi_2-\phi_1}{2}[/itex])
    These expressions are not equal? Why has it been changed?

    Thank you
     
  2. jcsd
  3. Oct 8, 2013 #2

    UltrafastPED

    User Avatar
    Science Advisor
    Gold Member

  4. Oct 8, 2013 #3
    Thank you, but unfortunately not. The article maintaines that the formulas are equal, which other pages and my own formulas go against...
     
  5. Oct 8, 2013 #4

    UltrafastPED

    User Avatar
    Science Advisor
    Gold Member

    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
     
  6. Jun 7, 2015 #5
    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
    hav(A-B) = hav(C) - sin(A) sin(B) hav(a)
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Difference between haversine and law of cosines
  1. Cosine law (Replies: 3)

Loading...