Ordinary least squares
Solution

First we need to represent e and p in a linear form. So we are going to rewrite the equation r (θ) {\displaystyle r(\theta)} as 1 r (θ) = 1 p − e p cos (θ) {\displaystyle {\frac {1}{r(\theta)}}={\frac {1}{p}}-{\frac {e}{p}}\cos(\theta)}. Furthermore, one could fit for apsides by expanding cos (θ) {\displaystyle \cos(\theta)} with an extra parameter as cos (θ − θ 0) = cos (θ) cos (θ 0) + sin (θ) sin (θ 0) {\displaystyle \cos(\theta -\theta _{0})=\cos(\theta)\cos(\theta _{0})+\sin(\theta)\sin(\theta _{0})}, which is linear in both cos (θ) {\displaystyle \cos(\theta)} and in the extra basis function sin (θ) {\displaystyle \sin(\theta)}, used to extra tan θ 0 = sin (θ 0) / cos (θ 0) {\displaystyle \tan \theta _{0}=\sin(\theta _{0})/\cos(\theta _{0})}. We use the original two-parameter form to represent our observational data as:

A T A (x y) = A T b {\displaystyle A^{T}A{\binom {x}{y}}=A^{T}b} where x {\displaystyle x} is 1 p {\displaystyle {\frac {1}{p}}} and y {\displaystyle y} is e p {\displaystyle {\frac {e}{p}}} and A {\displaystyle A} is constructed by the first column being the coefficient of 1 p {\displaystyle {\frac {1}{p}}} and the second column being the coefficient of e p {\displaystyle {\frac {e}{p}}} and b {\displaystyle b} is the values for the respective 1 r (θ) {\displaystyle {\frac {1}{r(\theta)}}} so A = {\displaystyle A={\begin{bmatrix}1&-0.731354\\1&-0.707107\\1&-0.615661\\1&\ 0.052336\\1&0.309017\\1&0.438371\end{bmatrix}}} and b =. {\displaystyle b={\begin{bmatrix}0.21220\\0.21958\\0.24741\\0.45071\\0.52883\\0.56820\end{bmatrix}}.}

On solving we get (x y) = (0.43478 0.30435) {\displaystyle {\binom {x}{y}}={\binom {0.43478}{0.30435}}}

so p = 1 x = 2.3000 {\displaystyle p={\frac {1}{x}}=2.3000} and e = p ⋅ y = 0.70001 {\displaystyle e=p\cdot y=0.70001}
startend:quotation