# Mathematically calculate if a Planet is in apparent Retrograde motion

I am trying to find out if a planet is in an apparent retrograde motion with respect to the earth at any given point in time. Given the time in Julian days.

I already have the geocentric and heliocentric coordinates and velocities of the planet using the JPL ephimeris, but not sure of what mathematical formula to use to identify the retrograde motion.

1) Is the answer correct as it has not been marked as correct? 2) How to represent earth in the XY plane only when it has XYZ planes and why do we even need to do that? Cann't we just use the heliocentric equitorial plane which I think is the same as the one used by NASA JPL ephimeris.

1. I'm assuming from the upvotes that my answer was correct but incomplete. Working out the equations for orbits that are not in the same plane would have taken far too much time for too little gain.

2. The coordinate system I used was a heliocentric ecliptic coordinate system. This simplifies the comparison of orbits since most of the planets orbit the sun very close to the ecliptic plane. Due to Earth's tilt, using an equatorial coordinate system would be more mathematically difficult since the relative motion of the planets would be three-dimensional.

As for the rest of the answer, the idea is to calculate the angle of a ray from Earth through the other planet, as this represents the position of the planet in the sky with respect to the fixed stars. When the movement of this line reverses direction, the other planet is entering or leaving retrograde motion.

For the purposes of determining when retrograde motion occurs, motion of the planets perpendicular to the ecliptic plane does not matter. Below are two pictures of time-lapsed retrograde motion of Mars. Whether the motion is in a loop or an S-curve, what determines when retrograde motion happens is when the component of the vector joining two planets that is parallel to the ecliptic reverses its direction of rotation. In the pictures below, that corresponds to the points of reversal in the tilted horizontal motion. This is why I ignore the Z-component of the planet's motion.

• I had a confusion as far the original post said that chose a plane in which earth lies in the XY plane, so it seems like we are ignoring the Z coordinate here but for the planet the Z coordinate exists. Oct 22 '16 at 10:41
• FurtherMore, I used The JPL ephimeris which gives the planets positions in Solar center barycenter coordinates and if a subtract Sun's position and velocity from any planet's position I get the heliocertric positions and velocities of planets. but the Z coordinate for earth was not 0. Am I missing anything here? Oct 22 '16 at 10:42