# How long is the Sun closer to Earth then Mars is?

A recent question at Space.se has generated a few comments that are interesting.

But the answer to one particular comment to might address a lot of misconceptions.

I imagine the actual halfway point is close to the sun Source

As the two planets orbit the sun at different speeds, I assume it must be a significant amount.

How long is the Sun closer to Earth then Mars is?

• Both good answers below. I'm livestreaming working on a precise answer using CSPICE. What I've done so far: youtube.com/watch?v=ERKeS8TRtQA – user21 Dec 10 '19 at 14:57

Short answer: the Earth is closer to the Sun than to Mars about 77.9% of the time.

## Methodology

I wrote https://github.com/barrycarter/bcapps/tree/master/ASTRO/bc-compdist.c to compute when and how long Mars was further from the Earth than the Sun. In the ~30,000 year period covered by DE431, this happens 14,231 times for an average duration of 607.93 days, followed by an average of 172.00 days where Mars is closer. Notes:

Let us first consider the Earth a fixed point and Mars moving around the Sun on a circular orbit with angular velocity equal to the relative angular velocity ($$\omega_\bigoplus - \omega_♂)$$ The distance between Mars and the Earth can be described as the square root of $$R_E^2+R_M^2-2R_ER_Mcos(\theta)$$, and when this is equal to $$R_E^2$$:
$$cos(\theta) = \frac{R_E^2-R_E^2+R_M^2}{2R_ER_M} = 0.75$$,
meaning this happens when the elongation of Mars is around 0.72 and -0.72 radians (40 and -40 degrees). For smaller angles than 40, the cosine is bigger making the distance smaller (same goes for angles between $$-40$$ and $$0$$). Therefore, Mars is closer for $$80/360 = 22$$ percent of the synodic period of Mars, and for the remaining 78% or around 600 days.

• The actual orbits are eccentric (and the various orbital elements vary with time) so presumably that needs to be taken into account. Would be good to know how much of a difference that makes. – antispinwards Dec 7 '19 at 12:24

For a diagramatic answer, draw a circle around the Earth of 1AU radius, place the Sun on that circle then draw Mars' orbit. The part of Mars' orbit that is outside the 1AU circle is the part where Mars is farther away than the Sun. I expect that the two current answers are equivalent.

• okay, as a diagramatic answer it may be an equivalent way to express the fraction, but without discussing the synodic period it doesn't technically answer "How long..." – uhoh Dec 7 '19 at 8:19
• Of course it doesn't, but it's a good visualization tool, useful for sanity checking the analytical approach. – stolenmoment Dec 8 '19 at 1:26