Given the general equation of a conic $Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0 $, is there a way to determine if an arbitrary point $(x_1,y_1)$ lies inside or outside of the conic (ex. parabola or ellipse)?
-
2You might need to clarify what "inside or outside" means, for a parabola / straight line / pair of straight lines. – Calvin Lin Jun 01 '14 at 15:52
-
By 'inside' I had meant the part containing the foci for conic sections like parabola/hyberbola/ellipse. I guess it cannot be defined for straight lines. – harish Jun 01 '14 at 16:01
-
You seem to want the points closer to the focus than the points on the conic. This is computable in terms of the focus, the directrix and the eccentricity. – Mark Bennet Jun 01 '14 at 16:47
1 Answers
Let $g(x,y) = Ax^2+Bxy+Cy^2+Dx+Ey+F$. I think the condition you want is that $(x_1,y_1)$ is "inside" the conic if and only if $$ g(x_1,y_1) \quad\text{has the same sign as}\quad \left|\begin{matrix} 2A & B & D \\ B & 2C & E \\ D & E & 2F \end{matrix}\right| $$ (If that determinant is zero, the conic is degenerate — see this question — so the idea of "inside" doesn't make sense.) This works for ellipses and hyperbolas at least, and I think it works for parabolas too, though I don't see how to prove it now.
The idea is that the conic $g(x,y)=0$ divides the plane into two regions $g(x,y)<0$ and $g(x,y)>0$, one of them being "inside" and the other "outside"; to find out which is which, test the centre $(x_c,y_c)$ of the conic (which is inside if it's an ellipse and outside if it's a hyperbola). It turns out that $$ \left|\begin{matrix} 2A & B & D \\ B & 2C & E \\ D & E & 2F \end{matrix}\right| = 2g(x_c,y_c) \left|\begin{matrix} 2A & B \\ B & 2C \end{matrix}\right| \tag{$\ast$} $$ The determinant on the RHS is the (negative of the) discriminant of the conic; if the conic is an ellipse, that determinant is positive, so $g(x_c,y_c)$ and the determinant on the LHS have the same sign (which is what we want, because the centre is inside), whereas if the conic is a hyperbola then the determinant on the RHS is negative, so $g(x_c,y_c)$ and the determinant on the LHS have opposite signs (which is what we want, because the centre is outside).
To show ($\ast$), use the fact that $\nabla g(x_c,y_c)=0$; since $$ \frac{\partial g}{\partial x}(x,y) = 2Ax+By+D \qquad\text{and}\qquad \frac{\partial g}{\partial y}(x,y) = Bx+2Cy+E \text{ ,} $$ we get that $$ \left[\begin{matrix} 2A & B & D \\ B & 2C & E \end{matrix}\right] \left[\begin{matrix} x_c \\ y_c \\ 1 \end{matrix}\right] = \left[\begin{matrix} 0 \\ 0 \end{matrix}\right] $$ and so $$ g(x_c,y_c) = \frac12 \left[\begin{matrix} x_c & y_c & 1 \end{matrix}\right] \left[\begin{matrix} 2A & B & D \\ B & 2C & E \\ D & E & 2F \end{matrix}\right] \left[\begin{matrix} x_c \\ y_c \\ 1 \end{matrix}\right] = \frac12 (Dx_c+Ey_c+2F) $$ whence $$ \left|\begin{matrix} 2A & B & D \\ B & 2C & E \\ D & E & 2F \end{matrix}\right| = \det\left( \left[\begin{matrix} 2A & B & D \\ B & 2C & E \\ D & E & 2F \end{matrix}\right] \left[\begin{matrix} 1 & 0 & x_c \\ 0 & 1 & y_c \\ 0 & 0 & 1 \end{matrix}\right]\right) = \left|\begin{matrix} 2A & B & 0 \\ B & 2C & 0 \\ D & E & 2g(x_c,y_c) \end{matrix}\right| $$ which gives ($\ast$).
-
1In Dowling/Turneaure Analytic Geometry (1914) on p. 129, I read: A point is outside a conic when two tangents can be drawn from the point to the conic. A point is inside a conic when no tangents etc. It could be interesting to verify analytically the relation with your exposition. – Tony Piccolo Jun 02 '14 at 16:05