Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to find all ellipses which contain 2 given points and has one focus at origin (zero). All in 2D plane.

There are several possible approaches but I'm not sure which is the best - both looks quite difficult to solve algebraically.

  1. using polar equation relative to focus with $(R_1,\phi_1),(R_2,\phi_2)$, being coordinates of points $$ R_1 = \frac{a(1-e^2)}{1-ecos(\phi_1-\theta)} $$ $$ R_2 = \frac{a(1-e^2)}{1-ecos(\phi_2-\theta)} $$ then for given $\theta$ solve for semimajor axis $a$ and eccentricity $e$
  2. using deffinition of elipse as a set of points of the same distance from both foci. Given 2 points of cartesian coordinates $(x_1,y_1),(x_2,y_2)$ and one focus in origin $(0,0)$. For each given distance parameter $L$ solve for coordinates of second focus $(x_f,y_f)$, $$ L = \sqrt{x_1^2 + y_2^2} + \sqrt{(x_1 - x_f)^2 + (y_1 - y_f)^2} $$ $$ L = \sqrt{x_2^2 + y_2^2} + \sqrt{(x_2 - x_f)^2 + (y_2 - y_f)^2} $$
  3. I can also first rotate the coordinate system (or my input points) by given angle (which is my arbitrary parameter) and then use some simplified equation of ellipse which has major axis parallel to x-axis which has just 2 degrees of freedom. But even after this rotation I don't see much simplification of algebraic solution.

Or is there any better way?

The resulting equations are quite difficult to solve. I wonder if there is some trick to simplify it and make it more elegant.

Also, because I would later to implement it into computational code where it would be computed manytimes per second, I would prefer solution inf form which is fast to evaluate numerically ( prefferably without goniometric or any transcedental functions )

Why I'm interested ? - I need it for some optimalization of orbital transfers for spaceship orbiting the Sun. I asked also in physics.stackexchange, and people recomand me that I should rather go to math section.

share|cite|improve this question
This is quite an interesting problem. Note that given points $P_1,P_2$, with a very few exceptions there are at least two non-trivially different ellipses that can be specified which satisfy every valid $L$ value. I'm still working out the details to provide an answer for you. – abiessu Oct 31 '13 at 20:25
Try plotting the problem in the complex plane. – ben May 6 '14 at 5:15
up vote 2 down vote accepted

If $a$ is the semi-major axis of one such ellipse, and $F$ its other focus, then $$ |R_1|+|R_1-F|=2a=|R_2|+|R_2-F|. $$ Subtracting one from the other, $F$ must satisfy the following equation: $$ |F-R_1|-|F-R_2|=|R_2|-|R_1|. $$ The set of all points $F$ that satisfy this equation is a hyperbola with focuses $R_1$ and $R_2$, and the semi-major axis $-\frac12\big||R_1|-|R_2|\big|$, and it is easy to find coordinates of points on the hyperbola using standard formulas (see the mathworld link, e.g.).

share|cite|improve this answer
Very nice answer, short and effective! ;-) – Jean-Claude Arbaut May 6 '14 at 5:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.