# Eccentric anomaly

In orbital mechanics, the eccentric anomaly is an angular parameter that defines the position of a body that is moving along an elliptic Kepler orbit. The eccentric anomaly is one of three angular parameters ("anomalies") that define a position along an orbit, the other two being the true anomaly and the mean anomaly.

## Graphical representation

Consider the ellipse with equation given by:
    ${\frac {x^{2}}{a^{2}}}+{\frac {y^{2}}{b^{2}}}=1,$
where a is the semi-major axis and b is the semi-minor axis.
For a point on the ellipse, P = P(x, y), representing the position of an orbiting body in an elliptical orbit, the eccentric anomaly is the angle E in the figure. The eccentric anomaly E is one of the angles of a right triangle with one vertex at the center of the ellipse, its adjacent side lying on the major axis, having hypotenuse a (equal to the semi-major axis of the ellipse), and opposite side (perpendicular to the major axis and touching the point P′ on the auxiliary circle of radius a) that passes through the point P. The eccentric anomaly is measured in the same direction as the true anomaly, shown in the figure as $\theta$. The eccentric anomaly E in terms of these coordinates is given by:
    $\cos E={\frac {x}{a}},$
and
    $\sin E={\frac {y}{b}}$
The second equation is established using the relationship
    $\left({\frac {y}{b}}\right)^{2}=1-\cos ^{2}E=\sin ^{2}E$,
which implies that sin E = ±⁠y/b⁠. The equation sin E = −⁠y/b⁠ is immediately able to be ruled out since it traverses the ellipse in the wrong direction. It can also be noted that the second equation can be viewed as coming from a similar triangle with its opposite side having the same length y as the distance from P to the major axis, and its hypotenuse b equal to the semi-minor axis of the ellipse.

## Formulas
### Radius and eccentric anomaly

The eccentricity e is defined as:
    $e={\sqrt {1-\left({\frac {b}{a}}\right)^{2}}}\ .$
From Pythagoras's theorem applied to the triangle with r (a distance FP) as hypotenuse:
    ${\begin{aligned}r^{2}&=b^{2}\sin ^{2}E+(ae-a\cos E)^{2}\\&=a^{2}\left(1-e^{2}\right)\left(1-\cos ^{2}E\right)+a^{2}\left(e^{2}-2e\cos E+\cos ^{2}E\right)\\&=a^{2}-2a^{2}e\cos E+a^{2}e^{2}\cos ^{2}E\\&=a^{2}\left(1-e\cos E\right)^{2}\\\end{aligned}}$
Thus, the radius (distance from the focus to point P) is related to the eccentric anomaly by the formula
    $r=a\left(1-e\cos {E}\right)\ .$
With this result the eccentric anomaly can be determined from the true anomaly as shown next.

### From the true anomaly

The true anomaly is the angle labeled $\theta$ in the figure, located at the focus of the ellipse. It is sometimes represented by f or v. The true anomaly and the eccentric anomaly are related as follows.
Using the formula for r above, the sine and cosine of E are found in terms of f :
    ${\begin{aligned}\cos E&={\frac {\,x\,}{a}}={\frac {\,ae+r\cos f\,}{a}}=e+(1-e\cos E)\cos f\\\Rightarrow \cos E&={\frac {\,e+\cos f\,}{1+e\cos f}}\\\sin E&={\sqrt {\,1-\cos ^{2}E\;}}={\frac {\,{\sqrt {\,1-e^{2}\;}}\,\sin f\,}{1+e\cos f}}~.\end{aligned}}$
Hence,
    $\tan E={\frac {\,\sin E\,}{\cos E}}={\frac {\,{\sqrt {\,1-e^{2}\;}}\,\sin f\,}{e+\cos f}}~.$
where the correct quadrant for E is given by the signs of numerator and denominator, so that E can be most easily found using an atan2 function.
Angle E is therefore the adjacent angle of a right triangle with hypotenuse $\;1+e\cos f\;,$ adjacent side $\;e+\cos f\;,$ and opposite side $\;{\sqrt {\,1-e^{2}\;}}\,\sin f\;.$
Also,
    $\tan {\frac {\,f\,}{2}}={\sqrt {{\frac {\,1+e\,}{1-e}}\,}}\,\tan {\frac {\,E\,}{2}}$
Substituting cos E as found above into the expression for r, the radial distance from the focal point to the point P, can be found in terms of the true anomaly as well:
    $r={\frac {a\left(\,1-e^{2}\,\right)}{\,1+e\cos f\,}}={\frac {p}{\,1+e\cos f\,}}\,$
where
    $\,p\equiv a\left(\,1-e^{2}\,\right)$
is called "the semi-latus rectum" in classical geometry.

### From the mean anomaly

The eccentric anomaly E is related to the mean anomaly M by Kepler's equation:
    $M=E-e\sin E$
This equation does not have a closed-form solution for E given M. It is usually solved by numerical methods, e.g. the Newton–Raphson method. It may be expressed in a Fourier series as
    $E=M+2\sum _{n=1}^{\infty }{\frac {J_{n}(ne)}{n}}\sin(nM)$
where $J_{n}(x)$ is the Bessel function of the first kind.