Eccentricity of Orbit indicates its Total Energy

Theorem
Consider a planet $p$ of mass $m$ orbiting a star $S$ of mass $M$ under the influence of the gravitational field which the two bodies give rise to.

Then the total energy of the system determines the eccentricity of the orbit of $p$ around $S$.

Proof
Let:
 * $\mathbf u_r$ be the unit vector in the direction of the radial coordinate of $p$
 * $\mathbf u_\theta$ be the unit vector in the direction of the angular coordinate of $p$.

By Kinetic Energy of Motion, the kinetic energy of $p$ is:
 * $K = \dfrac {m v^2} 2$

where $v$ is the magnitude of the velocity of $p$.

Thus:

The potential energy $P$ of the system is the negative of the work required to move $p$ to infinity:

By the Principle of Conservation of Energy, the total energy in the system remains constant: $E$, say.

So:
 * $E = \dfrac 1 2 m \left({r^2 \left({\dfrac {\mathrm d \theta} {\mathrm d t} }\right)^2 + \left({\dfrac {\mathrm d r} {\mathrm d t} }\right)^2}\right) - \dfrac {k m} r$

, let us arrange the polar axis so as to make $r$ a minimum when $\theta = 0$.

By Kepler's First Law of Planetary Motion, the position of $p$ in polar coordinates is:
 * $(3): \quad r = \dfrac {h^2 / k} {1 + e \cos \theta}$

At the instant when $\theta = 0$, we therefore have:
 * $r = \dfrac {h^2 / k} {1 + e}$

At this point, $r$ is at a local minimum.

Hence:
 * $\dfrac {m r^2} 2 \dfrac {h^2} {r^4} - \dfrac {k m} r = E$

Eliminating $r$ from these gives:
 * $e = \sqrt {1 + E \left({\dfrac {2 h^2} {m k^2} }\right)}$

Thus equation $(3)$ for the orbit of $p$ can be written as:
 * $r = \dfrac {h^2 / k} {1 + \sqrt {1 + E \left({2 h^2 / m k^2}\right) \cos \theta} }$

Thus from Equation of Conic Section in Polar Form, it can be seen that the orbit is:
 * an ellipse when $E < 0$
 * a parabola when $E = 0$
 * a hyperbola when $E > 0$.