Confocal conics (source code)

= Confocal conics

Confocal conics share the same pair of <foci>. For foci $(\pm c,0)$ with $c>0$, a useful family of <ellipses> and <hyperbolas> is
$$
\frac{x^2}{c^2+\lambda}+\frac{y^2}{\lambda}=1.
$$
For $\lambda>0$ this is an ellipse with squared semiaxes $c^2+\lambda$ and $\lambda$. For $-c^2<\lambda<0$ it is a hyperbola; in both cases the focal distance is $c$. The parameter endpoints are degenerate cases, excluded from this formula.

At an intersection of members with distinct parameters $\lambda,\mu$, subtracting their equations gives
$$
\frac{x^2}{(c^2+\lambda)(c^2+\mu)}+\frac{y^2}{\lambda\mu}=0.
$$
This is the dot product of their normal directions, so the two conics meet orthogonally. The resulting ellipse-hyperbola grid underlies <elliptic coordinates> and useful <separation of variables> for planar differential equations.