finding the equation of the ellipse