Note

This Mathematica notebook is from the WWW project A Visual Dictionary of Special Plane Curves. Copyright © 2004 by Xah Lee. (http://xahlee.org/)

some Conics equation derivation

Deriving Cartesian equation in standard position

Given a point F and a line d and a constant e, conic section by definition is the locus of P such that
 distance[P,F]/distance[P,d]==e

Let the point F be the Origin. Let the directrix be a vertical line x=1. Let {x,y} be the point P.
Using coordinates the definition becomes
 Sqrt[(x-0)^2+(y-0)^2]/Sqrt[(x-1)^2+(y-y)^2]==e

conics={Sqrt[(x-0)^2+(y-0)^2]/Sqrt[(x-1)^2+(y-y)^2],e}

%*Sqrt[(x-1)^2+(y-y)^2]

square both sides. Note that radicands are positive, since they are sum of squares.

%^2

%//Expand

(%-(Last@%))

Collect[%,{x,y}]

So now we have our conics equation in the form of a general 2nd degree polynomial:

Standard form for ellipses

show that the conics with focus {0,0} and directrix x==1 and eccentricity e in the general 2nd degree polynomial form:
(-e^2)+2*e^2*x+(1-e^2)*x^2+y^2==0
can be transformed into the form given for ellipses
x^2/a^2+y^2/b^2==1

conics = {-e^2 + 2*e^2*x + (1 - e^2)*x^2 + y^2, 0}

We know that the standard ellipse form is centered on origin. While the form above has the right focus on origin. We want to shift the curve so that it is centered on origin..
So, first we find its center, then we shift the graph by replace x with x+k.
The center is easily found by replacing y by 0 to find the two x-axes intercepts, than average them.
We find the coordinate for the center is {e^2/(-1+e^2),0}

Solve[Equal@@(conics/.y->0),x]

(#[[1,2]]&)/@%

Plus@@%/2

Simplify@%

The above is the x coordinate for the center of the ellipse.
So now we shift to the right the conics equation by the above value to obtain an equation centered on origin

conics/.x->x-(-e^2/(-1+e^2))//Simplify

%*(-1+e^2)

Expand@%

Collect[%/-e^2,{x,y}]

Now we have arrived at the standard form for ellipses. If e > 1, this is the same form for standard hyperbola x^2/a^2 - y^2/b^2==1.

equivalence to parabola standard form

Now replace eccentricity by 1 and shift it to the right by 1/2 we have the usual form of parabola y^2==k*x

conics/.e->1

%/.x->x+1/2

Simplify@%