# 2.9: Fitting a Conic Section Through n Points

What is the best ellipse passing near to the following \(16\) points?

\(( \ 1,50) \ (11,58) \ (20,63) \ (30,60)\)

\((42,59) \ (48,52) \ (54,46) \ (61,42)\)

\((61,19) \ (45,12) \ (35,10) \ (25,13)\)

\((17,17) \ (14,22) \ ( \ 5,29) \ ( \ 3,43)\)

This is answered by substituting each point \((x , y)\) in turn in the equation

\[ax^2 + 2hxy + by^2 + 2gx + 2fy + 1 = 0, \label{2.9.1} \tag{2.9.1}\]

thus obtaining 16 equations in the coefficients \(a\), \(h\), \(b\), \(g\), \(f\). (The constant term can be taken to be unity.) These are the equations of condition. The five normal equations can then be set up and solved to give those values for the coefficients that will result in the sum of the squares of the residuals being least, and it is in that sense that the "best" ellipse results. The details of the method are given in the chapter on numerical methods. The actual solution for the points given above is left as an exercise for the energetic.

It might be thought that we are now well on the way to doing some real orbital theory. After all, suppose that we have several positions of a planet in orbit around the Sun, or several positions of the secondary component of a visual binary star with respect to its primary component; we can now fit an ellipse through these positions. However, in a real orbital situation we have some additional information as well as an additional constraint. The additional information is that, for each position, we also have a time. The constraint is that the orbit that we deduce must obey Kepler's second law of planetary motion - namely, that the radius vector sweeps out equal areas in equal times. We shall have to await Part II before we get around actually to computing orbits.