I assume that the two planets follow the same orbit, but that they are pi radians apart in mean anomaly. They are pi radians apart in true and eccentric anomalies only when each is at either apside.
Let me put Earth initially at perihelion and Planet X initially at aphelion.
I notice, first, that the angular separation, subtended at Earth, between Planet X and the Sun, is
D = pi - (Q2 - Q1)
Where Q1 is the true anomaly of Earth and Q2 is the true anomaly of Planet X. This follows from the geometry of the triangle having vertices at Earth, the sun, and the point of intersection between the Earth-Planet X line and the orbit major axis.
Since Q2>Q1, one would minimize (Q2-Q1) in order to maximize the angular separation D.
Now, Earth starts at perihelion, whereas Planet X is starting from the aphelion of the same orbit, which means that Earth is catching up to Planet X in true anomaly and will continue to do so until...
Q2 = 2 pi - Q1
Meaning that...
Dmax = 2 Q1 - pi
To make the math easier, we can recognize that the eccentric anomaly (u) has the same geometrical symmetry that the true anomaly does:
u2 = 2 pi - u1
(Understand, though, the the mean anomaly does not have that symmetry!)
The angular separation, subtended at Earth, between the sun and Planet X is maximized when Earth and Planet X are equidistant from (and on the anti-solar side of) the minor axis of their mutual orbit. Accordingly, the mean anomaly
interval traveled by Earth from perihelion equals the mean anomaly interval traveled by Planet X from aphelion.
M2 = M1 + pi
Logic time's over. Time to crunch some numbers.
M1 = u1 - e sin u1
M1 = u2 - e sin u2 - pi
u2 - e sin u2 - pi = u1 - e sin u1
u2 - u1 + e (sin u1 - sin u2) = pi
2 pi - u1 - u1 + e {sin u1 - sin (2 pi - u1)} = pi
2 pi - 2 u1 + 2 e sin u1 = pi
u1 - e sin u1 = pi/2 = M1
Well, what have we here? The maximum angular separation, subtended at Earth, between the sun and Planet X, seems to occur when Earth is 1/4 of the way around its orbit from perihelion, in terms of time or mean anomaly.
(Added later: You know, if I'd been thinking more clearly, I'd have known from symmetry that the point of equidistance from the minor axis, with both planets on the anti-solar side thereof, must occur when they are one-quarter of the orbital period from their respective apsides. After all, the times in which the two planets travel are equal, and the arc of one planet, reflected across the major axis, simply completes the half of the orbit which the other planet travels. I was a doofus for doing the work, and I was lucky not to have made any mistakes while I was at it.)
You can now use Newton's method to get u1. Since the
eccentricity of Earth's orbit is 0.01671022, the eccentric anomaly will work out to about 1.587504 radians.
You can convert from u1 to Q1:
x1 = a (cos u1 - e)
y1 = a sin u1 (1-e^2)^0.5
Q1 = arctan2(y1 , x1)
In our case, Q1 will be about 1.604211 radians.
And the answer is found with
Dmax = 2 Q1 - pi
Planet X has a maximum angular separation from the sun of 0.06683 radians or about 3.83 degrees.
Jerry Abbott