I am trying to write the equation of the set of points that has a constant difference in distance from two points (a hyperbola). I would like a general expression, no matter if the line joining the two points is parallel to an axis.

Calling the fixed points A = (a_x, a_y) and B = (b_x, b_y), and a point on the hyperbola P = (p_x, p_y), and the constant distance difference 'c', I started with:

Squaring both sides:

As you can see, this is quite a mess. I am trying to get it to a more sane "general conic" form like:

but if I square the whole thing again to get rid of the square root on the right, I'll introduce ^4 on the left, which seems like a bad plan. Any clues on where to go from here?

Thanks,

David