info prev up next book cdrom email home

Quadratic Curve

The general 2-variable quadratic equation can be written

\begin{displaymath}
ax^2+2bxy+cy^2+2dx+2fy+g=0.
\end{displaymath} (1)

Define the following quantities:
$\displaystyle \Delta$ $\textstyle =$ $\displaystyle \left\vert\begin{array}{ccc}a & b & d\\  b & c & f\\  d & f & g\end{array}\right\vert$ (2)
$\displaystyle J$ $\textstyle =$ $\displaystyle \left\vert\begin{array}{cc}a & b\\  b & c\end{array}\right\vert$ (3)
$\displaystyle I$ $\textstyle =$ $\displaystyle a+c$ (4)
$\displaystyle K$ $\textstyle =$ $\displaystyle \left\vert\begin{array}{cc}a & d\\  d & g\end{array}\right\vert+\left\vert\begin{array}{cc}c & f\\  f & g\end{array}\right\vert.$ (5)

Then the quadratics are classified into the types summarized in the following table (Beyer 1987). The real (nondegenerate) quadratics (the Ellipse, Hyperbola, and Parabola) correspond to the curves which can be created by the intersection of a Plane with a (two-Nappes) Cone, and are therefore known as Conic Sections.

Curve $\Delta$ $J$ $\Delta/I$ $K$
Coincident Lines 0 0   0
Ellipse (Imaginary) $\not=0$ $>0$ $>0$  
Ellipse (Real) $\not=0$ $>0$ $<0$  
Hyperbola $\not=0$ $<0$    
Intersecting Lines (Imaginary) 0 $>0$    
Intersecting Lines (Real) 0 $<0$    
Parabola $\not=0$ 0    
Parallel Lines (Imaginary) 0 0   $>0$
Parallel Lines (Real) 0 0   $<0$


It is always possible to eliminate the $xy$ cross term by a suitable Rotation of the axes. To see this, consider rotation by an arbitrary angle $\theta$. The Rotation Matrix is

$\displaystyle \left[\begin{array}{c}x\\  y\end{array}\right]$ $\textstyle =$ $\displaystyle \left[\begin{array}{cc}\cos\theta & \sin\theta\\  -\sin\theta & \cos\theta\end{array}\right]\left[\begin{array}{c}x'\\  y'\end{array}\right]$  
  $\textstyle =$ $\displaystyle \left[\begin{array}{c}x'\cos\theta +y'\sin\theta\\  -x'\sin\theta +y'\cos\theta\end{array}\right],$ (6)

so


$\displaystyle x$ $\textstyle =$ $\displaystyle x'\cos\theta +y'\sin\theta$ (7)
$\displaystyle y$ $\textstyle =$ $\displaystyle -x'\sin\theta +y'\cos\theta$ (8)
$\displaystyle xy$ $\textstyle =$ $\displaystyle -x'^2\cos\theta \sin\theta +x'y'(\cos^2\theta -\sin^2\theta)+y'^2\cos\theta \sin\theta$ (9)
$\displaystyle x^2$ $\textstyle =$ $\displaystyle x'^2\cos^2\theta +2x'y'\cos\theta \sin\theta +y'^2\sin^2\theta$ (10)
$\displaystyle y^2$ $\textstyle =$ $\displaystyle -x'^2\sin^2\theta-2x'y'\sin\theta \cos\theta +y'^2\cos^2 \theta.$ (11)

Plugging these into (1) gives
$a(x'^2\cos^2\theta +2x'y'\cos\theta +y'^2\sin^2\theta)$
$\quad +2b(x'\cos\theta +y'\sin\theta)(-x'\sin\theta+y'\cos\theta)$
$\quad +c(x'^2\sin^2\theta -2x'y'\cos\theta\sin\theta+y'^2\cos^2\theta)$
$\quad +2d(x'\cos\theta +y'\sin\theta)$
$\quad +2f(-x'\sin\theta+y'\cos\theta)+g=0.$ (12)
Rewriting,

$a(x'^2\cos^2\theta +2x'y'\cos\theta +y'^2\sin^2\theta)$
$\quad +2b(-x^2\cos^2\theta\sin\theta-xy\sin^2\theta+xy\cos^2\theta+y^2\cos\theta\sin\theta)$
$\quad +c(x'^2\sin^2\theta -2x'y'\cos\theta\sin\theta+y'^2\cos^2\theta)$
$\quad +2d(x'\cos\theta +y'\sin\theta)$
$\quad +2f(-x'\sin\theta+y'\cos\theta)+g=0.$ (13)
Grouping terms,
$x'^2(a\cos^2\theta+c\sin^2\theta-2b\cos\theta\sin\theta)$
$\quad +x'y'[2a\cos\theta\sin\theta-2c\sin\theta\cos\theta+2b(\cos^2\theta-\sin^2\theta)]$
$\quad +y'^2(a\sin^2\theta+c\cos^2\theta+2b\cos\theta\sin\theta)$
$\quad +x'(2d\cos\theta-2f\sin\theta)+y'(-2d\sin\theta+2f\cos\theta)$
$\quad +g=0.$ (14)
Comparing the Coefficients with (1) gives an equation of the form

\begin{displaymath}
a'x'^2+2b'x'y'+c'y'^2+2d'x'+2f'y'+g' = 0,
\end{displaymath} (15)

where the new Coefficients are
$\displaystyle a'$ $\textstyle =$ $\displaystyle a\cos^2\theta-2b\cos\theta\sin\theta+c\sin^2\theta$ (16)
$\displaystyle b'$ $\textstyle =$ $\displaystyle b(\cos^2\theta-\sin^2\theta)+(a-c)\sin\theta\cos\theta$ (17)
$\displaystyle c'$ $\textstyle =$ $\displaystyle a\sin^2\theta+2b\sin\theta\cos\theta+c\cos^2\theta$ (18)
$\displaystyle d'$ $\textstyle =$ $\displaystyle d\cos\theta-f\sin\theta$ (19)
$\displaystyle f'$ $\textstyle =$ $\displaystyle -d\sin\theta+f\cos\theta$ (20)
$\displaystyle g'$ $\textstyle =$ $\displaystyle g.$ (21)

The cross term $2b'x'y'$ can therefore be made to vanish by setting
$\displaystyle b'$ $\textstyle =$ $\displaystyle b(\cos^2\theta-\sin^2\theta)-(c-a)\sin\theta\cos\theta$  
  $\textstyle =$ $\displaystyle b\cos(2\theta)-{\textstyle{1\over 2}}(c-a)\sin(2\theta)=0.$ (22)

For $b'$ to be zero, it must be true that
\begin{displaymath}
\cot(2\theta) = {c-a\over 2b} \equiv K.
\end{displaymath} (23)

The other components are then given with the aid of the identity
\begin{displaymath}
\cos[\cot^{-1}(x)] = {x\over\sqrt{1+x^2}}
\end{displaymath} (24)

by defining
\begin{displaymath}
L\equiv {K\over\sqrt{1+K^2}},
\end{displaymath} (25)

so
\begin{displaymath}
\sin\theta = \sqrt{{1-L\over 2}}
\end{displaymath} (26)


\begin{displaymath}
\cos\theta = \sqrt{{1+L\over 2}}.
\end{displaymath} (27)


Rotating by an angle

\begin{displaymath}
\theta={\textstyle{1\over 2}}\cot^{-1}\left({c-a\over 2b}\right)
\end{displaymath} (28)

therefore transforms (1) into
\begin{displaymath}
a'x'^2+c'y'^2+2d'x'+2f'y'+g' = 0.
\end{displaymath} (29)

Completing the Square,
\begin{displaymath}
a'\left({x'^2+{2d'\over a'}x}\right)+c'\left({y'^2+{2f'\over c'}y'}\right)+g'=0
\end{displaymath} (30)


\begin{displaymath}
a'\left({x'+{d'\over a'}}\right)^2+c'\left({y'+{f'\over c'}}\right)^2=-g'+{d'^2\over a'} +{f'^2\over c'}.
\end{displaymath} (31)

Defining $x''\equiv x'+d'/a'$, $y''\equiv y'+f'/c'$, and $g''\equiv -g'+d'^2/a'+f'^2/c'$ gives
\begin{displaymath}
a'x''^2+c'y''^2=g''.
\end{displaymath} (32)

If $g''\not=0$, then divide both sides by $g''$. Defining $a''\equiv a'/g''$ and $c''\equiv c'/g''$ then gives
\begin{displaymath}
a''x''^2+c''y''^2=1.
\end{displaymath} (33)

Therefore, in an appropriate coordinate system, the general Conic Section can be written (dropping the primes) as
\begin{displaymath}
\cases{
ax^2+cy^2=1 & $a, c, g\not=0$\cr
ax^2+cy^2=0 & $a, c \not=0$, $g=0$.\cr}
\end{displaymath} (34)


Consider an equation of the form $ax^2+2bxy+cy^2 = 1$ where $b\not=0$. Re-express this using $t_1$ and $t_2$ in the form

\begin{displaymath}
ax^2+2bxy+cy^2=t_1x'^2+t_2y'^2.
\end{displaymath} (35)

Therefore, rotate the Coordinate System
\begin{displaymath}
\left[{\matrix{x'\cr y'\cr}}\right] =\left[{\matrix{\cos \th...
...& \cos \theta \cr}}\right]
\left[{\matrix{x\cr y\cr}}\right],
\end{displaymath} (36)

so
$ax^2+2bxy+cy^2=t_1x'^2+t_2y'^2$
$\quad = t_1(x^2\cos^2\theta +2xy\cos\theta\sin\theta+y^2\sin^2\theta)$
$ +t_2(x^2\sin^2\theta-2xy\sin\theta\cos\theta+y^2\cos^2\theta)$
$\quad = x^2(t_1\cos^2\theta+t_2\sin^2\theta)+2xy\cos\theta\sin\theta(t_1-t_2)$
$ \mathop{+}y^2(t_1\sin^2\theta +t_2\cos^2\theta)\quad$ (37)
and
$\displaystyle a$ $\textstyle =$ $\displaystyle t_1\cos^2\theta+t_2\sin^2\theta$ (38)
$\displaystyle b$ $\textstyle =$ $\displaystyle (t_1-t_2)\cos\theta\sin\theta={\textstyle{1\over 2}}(t_1-t_2)\sin(2\theta)$ (39)
$\displaystyle c$ $\textstyle =$ $\displaystyle t_1\sin^2\theta+t_2\cos^2\theta.$ (40)

Therefore,
$\displaystyle a+c$ $\textstyle =$ $\displaystyle (t_1\cos^2\theta+t_2\sin^2\theta)+(t_1\sin^2\theta+t_2\cos^2\theta)$  
  $\textstyle =$ $\displaystyle t_1+t_2$ (41)
$\displaystyle a-c$ $\textstyle =$ $\displaystyle t_1\cos^2\theta+t_2\sin^2\theta-t_1\sin^2\theta+t_2\cos^2\theta$  
  $\textstyle =$ $\displaystyle (t_1-t_2)(\cos^2\theta-\sin^2\theta)=(t_1-t_2)\cos(2\theta).$  
      (42)

From (41) and (42),
\begin{displaymath}
{a-c\over b}={(t_1-t_2)\cos(2\theta)\over{\textstyle{1\over 2}}(t_1-t_2)\sin(2\theta)}=2\cot(2\theta),
\end{displaymath} (43)

the same angle as before. But
$\displaystyle \cos(2\theta)$ $\textstyle =$ $\displaystyle \cos \left[{\cot^{-1}\left({a-c\over 2b}\right)}\right]$  
  $\textstyle =$ $\displaystyle \cos\left[{\tan^{-1}\left({2b\over a-c}\right)}\right]$  
  $\textstyle =$ $\displaystyle {1\over\sqrt{1+\left({2b\over a-c}\right)^2}},$ (44)

so
\begin{displaymath}
a-c={t_1-t_2\over \sqrt{1+\left({2b\over a-c}\right)^2}}.
\end{displaymath} (45)

Rewriting and copying (41),
$\displaystyle t_1-t_2$ $\textstyle =$ $\displaystyle (a-c)\sqrt{1+\left({2b\over a-c}\right)^2}$  
  $\textstyle =$ $\displaystyle \sqrt{(a-c)^2+4b^2}$ (46)
$\displaystyle t_1+t_2$ $\textstyle =$ $\displaystyle a+c.$ (47)

Adding (46) and (47) gives
$\displaystyle t_1$ $\textstyle =$ $\displaystyle {\textstyle{1\over 2}}[a+c+\sqrt{(a-c)^2+4b^2}\,]$ (48)
$\displaystyle t_2$ $\textstyle =$ $\displaystyle a+c-t_1={\textstyle{1\over 2}}[a+c-\sqrt{(a-c)^2+4b^2}\,].$  
      (49)

Note that these Roots can also be found from
\begin{displaymath}
(t-t_1)(t-t_2)=t^2-t(t_1+t_2)+t_1t_2=0
\end{displaymath} (50)

$t^2-t(a+c)+{\textstyle{1\over 4}}\{(a+c)^2-[(a-c)^2+4b^2]\}$
$\quad = t^2-t(a+c)+{\textstyle{1\over 4}}[a^2+2ac+c^2-a^2+2ac-c^2-4b^2]$
$\quad = t^2-t(a+c)+(ac-b^2)=(a-t)(c-t)-b^2$
$\quad = \left\vert\matrix{a-t & b\cr b & c-t\cr}\right\vert = (a-t)(c-t)-b^2=0.$ (51)
The original problem is therefore equivalent to looking for a solution to

\begin{displaymath}
\left[{\matrix{a & b\cr b & c\cr}}\right]\left[{\matrix{x\cr y\cr}}\right] =t\left[{\matrix{x\cr y\cr}}\right]
\end{displaymath} (52)


\begin{displaymath}
\left[{\matrix{ax & bx\cr by & cy\cr}}\right]\left[{\matrix{x\cr y\cr}}\right]=t\left[{\matrix{x^2\cr y^2\cr}}\right],
\end{displaymath} (53)

which gives the simultaneous equations
\begin{displaymath}
\cases{
ax^2+bxy=tx^2 &\cr
bxy+cy^2=ty^2. &\cr}
\end{displaymath} (54)


Let ${\bf X}$ be any point $(x,y)$ with old coordinates and $(x',y')$ be its new coordinates. Then

\begin{displaymath}
ax^2+2bxy+cy^2 = t_+x'^2+t_-y'^2 = 1
\end{displaymath} (55)

and
$\displaystyle x'$ $\textstyle =$ $\displaystyle {\hat {\bf X}}_+\cdot \left[\begin{array}{c}x\\  y\end{array}\right]$ (56)
$\displaystyle y'$ $\textstyle =$ $\displaystyle {\hat {\bf X}}_-\cdot \left[\begin{array}{c}x\\  y\end{array}\right].$ (57)

If $t_+$ and $t_-$ are both $>0$, the curve is an Ellipse. If $t_+$ and $t_-$ are both $<0$, the curve is empty. If $t_+$ and $t_-$ have opposite Signs, the curve is a Hyperbola. If either is 0, the curve is a Parabola.


To find the general form of a quadratic curve in Polar Coordinates (as given, for example, in Moulton 1970), plug $x=r\cos\theta$ and $y=r\sin\theta$ into (1) to obtain


\begin{displaymath}
ar^2\cos^2\theta+2br^2\cos\theta\sin\theta+cr^2\sin^2\theta+2dr\cos\theta+2fr\sin\theta+g=0
\end{displaymath} (58)


\begin{displaymath}
(a\cos^2\theta+2b\cos\theta\sin\theta+c\sin^2\theta)+{2\over r}(d\cos\theta+f\sin\theta)+{g\over r^2}=0.
\end{displaymath} (59)

Define $u\equiv 1/r$. For $g\not=0$,we can divide through by $2g$,


\begin{displaymath}
{\textstyle{1\over 2}}u^2+{1\over g}(d\cos\theta+f\sin\theta...
...ver 2g}(a\cos^2\theta+2b\cos\theta\sin\theta+c\sin^2\theta)=0.
\end{displaymath} (60)

Applying the Quadratic Formula gives
\begin{displaymath}
u= -{d\over g}\cos\theta-{f\over g}\sin\theta\pm\sqrt{R},
\end{displaymath} (61)

where


$\displaystyle R$ $\textstyle \equiv$ $\displaystyle {(d\cos\theta+f\sin\theta)^2\over g^2}-4\left({1\over 2}\right)\left({1\over 2g}\right)(a\cos^2\theta+2b\cos\theta\sin\theta+c\sin^2\theta)$  
  $\textstyle =$ $\displaystyle {d^2\over g^2}\cos^2\theta+{2df\over g^2}\cos\theta\sin\theta+{f^...
...^2}\sin^2\theta-{1\over g}(a\cos^2\theta+2b\cos\theta\sin\theta+c\sin^2\theta).$ (62)

Using the trigonometric identities
$\displaystyle \sin^2\theta$ $\textstyle =$ $\displaystyle 1-\cos^2\theta$ (63)
$\displaystyle \sin(2\theta)$ $\textstyle =$ $\displaystyle 2\sin\theta\cos\theta,$ (64)

it follows that


$\displaystyle R$ $\textstyle =$ $\displaystyle \left({{d^2\over g^2}-{a\over g}-{f^2\over g^2}+{c\over g}}\right...
...r g^2}-{b\over g}}\right)\sin(2\theta)+\left({{f^2\over g^2}-{c\over g}}\right)$  
  $\textstyle =$ $\displaystyle {\textstyle{1\over 2}}[1+\cos(2\theta)]{d^2-ag-f^2+cg\over g^2}+\sin(2\theta)\left({df-bg\over g^2}\right)+{f^2-cg\over g^2}$  
  $\textstyle =$ $\displaystyle {d^2-ag-f^2+cg\over 2g^2}\cos(2\theta)+{df-bg\over g^2}\sin(2\theta)$  
  $\textstyle \phantom{=}$ $\displaystyle + {d^2-ag-f^2+cg+2f^2-2cg\over 2g^2}.$ (65)

Defining
$\displaystyle A$ $\textstyle \equiv$ $\displaystyle -{f\over g}$ (66)
$\displaystyle B$ $\textstyle \equiv$ $\displaystyle -{d\over g}$ (67)
$\displaystyle C$ $\textstyle \equiv$ $\displaystyle {df-bg\over g^2}$ (68)
$\displaystyle D$ $\textstyle \equiv$ $\displaystyle {d^2-f^2+cg-ag\over 2g^2}$ (69)
$\displaystyle E$ $\textstyle \equiv$ $\displaystyle {d^2+f^2-ag-cg\over 2g^2}$ (70)

then gives the equation
\begin{displaymath}
u\equiv{1\over r}=A\sin\theta+B\cos\theta\pm\sqrt{C\sin(2\theta)+D\cos(2\theta)+E}
\end{displaymath} (71)

(Moulton 1970). If $g=0$, then (0) becomes instead
\begin{displaymath}
u\equiv{1\over r}=-{a\cos^2\theta+2b\cos\theta\sin\theta+c\sin^2\theta\over 2(d\cos\theta+f\sin\theta)}.
\end{displaymath} (72)

Therefore, the general form of a quadratic curve in polar coordinates is given by
\begin{displaymath}
u=\cases{
A\sin\theta+B\cos\theta & for $g\not=0$\cr
\quad \...
...sin^2\theta\over 2(d\cos\theta+f\sin\theta)}
& for $g=0$.\cr}
\end{displaymath} (73)

See also Conic Section, Discriminant (Quadratic Curve), Elliptic Curve


References

Beyer, W. H. CRC Standard Mathematical Tables, 28th ed. Boca Raton, FL: CRC Press, pp. 200-201, 1987.

Casey, J. ``The General Equation of the Second Degree.'' Ch. 4 in A Treatise on the Analytical Geometry of the Point, Line, Circle, and Conic Sections, Containing an Account of Its Most Recent Extensions, with Numerous Examples, 2nd ed., rev. enl. Dublin: Hodges, Figgis, & Co., pp. 151-172, 1893.

Moulton, F. R. ``Law of Force in Binary Stars'' and ``Geometrical Interpretation of the Second Law.'' §58 and 59 in An Introduction to Celestial Mechanics, 2nd rev. ed. New York: Dover, pp. 86-89, 1970.



info prev up next book cdrom email home

© 1996-9 Eric W. Weisstein
1999-05-25