The formula :-

$$\frac{1}{T_{syn}} = \frac{1}{T_{1}} - \frac{1}{T_{2}}$$

for the synodic period between two planets orbiting the Sun is derived by making the following simplifying assumptions about the motions of the Sun, Earth and Moon :-

1. Earth has a circular orbit around the Sun of constant speed and a fixed period $T_{e}$

2. Moon has a circular orbit around the Earth of constant speed and a fixed period $T_{sid}$. (Thus the moon's path wrt the fixed Sun frame is an *epicycle*, ie a small circle whose center moves along the circumference of a larger circle, in this case the Earth's orbit).

3. The above two orbits are confined to a common plane (the *Ecliptic Plane*)

4. From the direction we are viewing (ie `North') both Earth and Moon orbit in the anti-clockwise direction


This derivation works in exactly the same way as the derivation of the Moon's synodic period which explains why the latter is given by the following similar formula :-

$$\frac{1}{T_{syn}} = \frac{1}{T_{sid}} - \frac{1}{T_{e}}$$

where $T_{sid}$ is the sidereal perod of the Moon and $T_{e}$ is the sidereal period of the Earth.


(See [this answer][1] for the formula derivation in the case of the moon - for the planets the derivation would be virtually the same).

In reality the orbits are not perfectly circular and they are not in the exact same plane. The circular orbit approximation means the angular speed of the planet is constant, but in the case of an elliptical orbit the angular speed varies.



  [1]: https://astronomy.stackexchange.com/a/27545/24192