The general equation of an ellipse is x^2/a^2+y^2/b^2=1, where a and b are the lengths of the semimajor and semiminor axes. The following proof uses the distance property: the sum of the lengths of the lines between any point on the ellipse and its two foci is constant. Both foci lie on the major axis (x) inside the ellipse.
We start with a line AB of length p. Now we imagine a length of string s>p. The string is attached to the line by fixing one end to A and the other to B. Now we attach a pointer or marker to the string using a very small loop so that the pointer can move along the length of the string, keeping it taut. The pointer starts at a point that is an extension of AB, and the pointer is moved out of the line AB to describe the ellipse on both sides of AB, until the pointer returns to its starting position. The geometry is that, if the pointer's position at any time is P, AP+BP=s, where s is a constant.
The midpoint of AB is O and represents the origin of the rectangular coordinates x and y. The point A is (-p/2,0) and B is (p/2,0). P is the general point (x,y). By Pythagoras, AP^2=(x+p/2)^2+y^2; BP^2=(p/2-x)^2+y^2; s=sqrt((x+p/2)^2+y^2)+sqrt((x-p/2)^2+y^2). ((p/2-x)^2=(x-p/2)^2, so these may be used interchangeably. Note also that (x+p/2)^2+(x-p/2)^2=x^2+p^2/4 and (x+p/2)(x-p/2)=x^2-p^2/4.)
s-sqrt((x+p/2)^2+y^2)=sqrt((x-p/2)^2+y^2)
Squaring both sides: s^2+(x+p/2)^2+y^2-2ssqrt((x+p/2)^2+y^2)=(x-p/2)^2+y^2;
but (x+p/2)^2=x^2+xp+p^2/4 and (x-p/2)^2=x^2-xp+p^2/4; so,
s^2+2xp=2ssqrt((x+p/2)^2+y^2);
Squaring again: s^4+4xps^2+4x^2p^2=4s^2(x+p/2)^2+y^2)=4s^2(x^2+xp+p^2/4+y^2);
s^4+4x^2p^2=4s^2x^2+s^2p^2+4s^2y^2;
4x^2(s^2-p^2)+4s^2y^2=s^2(s^2-p^2);
4x^2+4s^2y^2/(s^2-p^2)=s^2;
4x^2/s^2+4y^2/(s^2-p^2)=1;
Let a^2=s^2/4 and b^2=(s^2-p^2)/4: x^2/a^2+y^2/b^2=1 is the standard equation of an ellipse.
Things to note:
When p=0 the ellipse should be a circle: 4x^2/s^2+4y^2/s^2=1 is the equation of a circle radius s/2.
When x=0, y=+sqrt(s^2-p^2)/2=+b and when y=0, x=+s/2=+a. The difference between the extreme points for x, (-a,0) and (a,0), is 2a=s, so s represents the major axis of the ellipse, and a the semimajor axis. Similarly the difference between extreme points for y, (0,-b) and (0,b), is 2b=sqrt(s^2-p^2), and b represents the semiminor axis.
The points A and B of line AB are the foci of the ellipse. Since s=2a and b^2=(s^2-p^2)/4, we can find p. 4b^2=4a^2-p^2; p=2sqrt(a^2-b^2) and A(-p/2,0) and B(p/2,0)=A(-sqrt(a^2-b^2),0) and B(sqrt(a^2-b^2),0). For a circle, a=b and the foci converge to the centre of the circle.