# Calculating eccentricity from semi-major axis, position and velocity of particles

I'm trying to calculate the eccentricity of a binary system's body knowing the bodies' velocities, positions, masses and the semi-major axis. I am only trying to calculate the eccentricity for one of the bodies but can't seem to get the formulas combined right to get the eccentricity only using these values. Any advice would be brilliant, thanks!

-

Hint 1:solve around the barycenter, maybe you can use the reduced mass

Hint 2: Try doimg what I call 'overloading the system'. Start by assuming you know everything (eccentricity, both axes, position/velocity at any point). Now derive as many relations as possible.

-
I can see how to do it using the true anomaly but calculating that for an arbitrary 3D system knowing only these seems awkward. Is that what's necessary or is there an easier method? – Mithra Apr 21 '12 at 19:44
@Mithra: knowing only these see hint 2. Pretend to know everything, then find relations and reduce your variables. And btw, this is only a 2D system. I don't know about any easier methods. – Manishearth Apr 22 '12 at 1:47

First calculate $h = || \vec x \times \vec v ||$.
Then the eccentricity is:

$e= \sqrt{ 1 - \frac{h^2}{G(m+n) a} }$

Where $a$ is the semi-major axis.

-