Calculation of the orbit equation for the two-body problem