# Time spent in eclipse of an object

Well consider an orbit - I'm trying to calculate the exact time spent in the shadow of the body you orbit around. An explanation of "shadow" (sun is positioned to the far left):

For a circular orbit this is quite easy: One just calculates the orbit radius and solve it using a simple sine ($T$ is the orbital period):

$$R_{earth} = r \cdot\sin(\theta)$$ $$t = T \cdot \frac{\theta}{\pi}$$

(notice division by $\pi$ since $\theta$ represents half the time in shadow.)

However this is for the specific case of a circular orbit. - I'm wondering how to do it for an (highly) eccentric orbit.

The simple equation above becomes slightly more complicated, since $r$ is no longer constant: $$r = a \frac{1-e^2}{1 + e \cdot \cos(\theta)}$$ For the point around the periapsis, Filling that in to the equation above results (wolfram alpha) into something I do not particularly like. Solving it at a random point it even becomes worse: $$r = a \frac{1-e^2}{1 + e \cdot \cos(\theta_{avg} \pm \theta)}$$

Once I have the true anomalies ($\theta$) I could use some straight forward solution: Eccentric anomaly -> mean anomaly -> time

Before I wish to start this, a question pops up: does the time in shadow actually depend on the position? (true anomaly/radius). When we're close to the planet the planet overshadows a higher angle of the orbit. However due to Kepler's law an object also moves faster at this point.

Specifically does Kepler's second law of motion prove that the time in shadow is independent on the mean true anomaly of the shadow? Kepler's law:

$$\frac{dA}{dt} = \tfrac{1}{2} r^2 \frac{d\theta}{dt}$$

I have a feeling that through kepler's law above problem could be reduced a lot..

Now once I know the position of the longest-time I could solve above equations (wondering if I should try to fill in the equations or solve it numerically).

I think that instead of considering the amount of time spent in the shadow of a planet with a significant radius $R_{earth}$ that it may make the analysis clearer and simpler if you instead consider the limit of some very small object with an infinitesimal radius casting a shadow. Let's call the radius $\text{$\Delta $R}$. What you're then asking is if it takes the satellite an equal amount of time to traverse a distance $\text{$\Delta $R}$ as seen from Earth at any point in its orbit. In other words, if you take the satellite's velocity vector and only consider the component of this velocity vector perpendicular to a vector pointing from Earth to the satellite, does this perpendicular component of the velocity vector change as the satellite orbits the Earth?
In terms of the angle $\theta$ you defined and r, the distance from the Earth to the satellite, this perpendicular component of the satellite's velocity vector is simply $r\frac{\text{d$\theta $}}{\text{dt}}$. Your hypothesis is that this quantity is a constant. However, as you noted, Kepler's $2^{nd}$ law states that $\frac{\text{dA}}{\text{dt}}=\frac{1}{2} r^2 \frac{\text{d$\theta $} }{ \text{dt}}$ is a constant, not $r\frac{\text{d$\theta $}}{\text{dt}}$. If the satellite moves from one point on its orbit to another point where the distance r is double its previous value, then Kepler's law says that the angular velocity $\frac{\text{d$\theta $}}{\text{dt}}$ decreases by a factor of four. Turning now to the expression $r\frac{\text{d$\theta $}}{\text{dt}}$ that represents how long an object remains in Earth's shadow, we see that this expression does not remain constant but decreases by a factor of 2. We can therefore surmise that the "shadow time" does not remain constant throughout the satellite's orbit but rather decreases as the satellite moves to points on its orbit further away from the Earth, and increases as the satellite moves closer to Earth.