A few times I've come across formulas, which are identical for circular and elliptical orbits, except that for the second ones you substitute $r$ with $a$, where $r$ is the radius of a circular orbit and $a$ the semi-major axis of an elliptical orbit. For instance:
Third Kepler's law for circular orbits: $T^2=\frac{4\pi^2}{GM}r^3$,
Third Kepler's law for elliptical orbits: $T^2=\frac{4\pi^2}{GM}a^3$,
or
Mechanical energy of a satellite in a circular orbit: $E=-\frac{GMm}{2r}$,
Mechanical energy of a satellite in an elliptical orbit: $E=-\frac{GMm}{2a}$.
Such substituting is very convenient but also seems a bit too easy. I'm wondering: how can you justify it? Do you have to always prove everything and it just always happens, that you can swap those values, or maybe it's possible to justify it with a single claim?