# How to express by a single equation a region delimited by confocal ellipse and hyperbola

I am trying to find the equation of a shape formed by a conic (ellipse) that excludes its intersection with another conic (hyperbola). The hyperbola and ellipse are assumed to share common foci. But they are general conics in 2D which means they can be rotated about the z-axis and translated along x and y axes. As it can be seen in the figure, the conics are rotated by an angle theta and not centered at the origin.

In the figure, I want the equation of resulting shape shown in grey shade (formed by the two conics). This new shape can be shown as follows:

Please let me know if it is possible to get an equality representing this new shape in the quadratic form as follows:

$$Ax^{2}+Bxy+Cy^{2}+Dx+Ey+F=0$$

• Is it parabola? In the drawing it looks like hyperbola.
– Moti
Feb 5, 2021 at 19:43
• Also be clear that you create an ellipsoid by rotating around the great axis of both (if this is the case)
– Moti
Feb 5, 2021 at 19:45
• Sorry, I meant hyperbola, and the equation of rotated ellipse can be found here (en.wikipedia.org/wiki/Ellipse#rotated). But in general it can be any conic section. Feb 5, 2021 at 20:45
• @KashishDhal: Are you seeking a formula for the area of the shaded region?
– Blue
Feb 5, 2021 at 20:46
• No I am looking for the equation of conic (quadratic equation in x,y,z) that can represent a conic given by the shaded region Feb 5, 2021 at 21:32

Such a curve having the shape of a double-sided axe (https://en.wikipedia.org/wiki/Labrys) with mixed elliptical/hyperbolic boundaries can be given by the general equation

$$x^2+k|y^2-1|=k^2 \tag{1}$$

with a "behavorial change" when variable $$y$$ crosses values $$y=1$$ or $$y=-1$$ as can be seen on the following graphics for different values of $$k$$:

Fig. 1: Curves with equation (1) for different values of $$k$$, with $$k=0.25$$ for the most internal one (in two parts) and $$k=2$$ for the most external, with steps $$0.25$$. For our question, only values $$k>1$$ (blue curves) make sense.

It remains now to tilt the "axe" using the following coordinates change in (1):

$$\begin{cases}x&=& \ \ \ (\cos \theta) X + (\sin \theta) Y \\ y&=&-(\sin \theta) X + (\cos \theta) Y \end{cases}$$

(It looks like a pun: a change of axes inducing a different axe...)

Explanations:

1. I have obtained (1) by imposing common foci to the ellipse and the hyperbola. How can it be done ? If $$f$$ is the common distance from the origin to the foci, it is known that $$f^2=a^2-b^2$$ for an ellipse and $$f^2=a^2+b^2$$ for a hyperbola with canonical equations $$\dfrac{x^2}{a^2}\pm\dfrac{y^2}{b^2}=1$$ ; one obtains in particular $$f=\sqrt{k^2-1}$$.

2. As a consequence, the elliptical arcs are orthogonal to the hyperbolic arcs. This wasn't necessary (see the solution by @David K).

3. Case $$k=1$$ is particular as can be seen on Fig. 1 : the elliptical arcs become circular arcs.

Edit: Here is the Matlab program I have written for the generation of the figure:

   clear all;close all;hold on;axis equal
for k=0.25:0.25:2;
c='r';
if k>1;c='b';end;
e=ezplot([num2str(k),'*abs(y^2-1)+x^2-',num2str(k^2)]);
get(e);set(e,'linecolor',c);
end;
u=2.5;plot([-u,u],[0,0],'k','linewidth',1.5);
v=2;plot([0,0],[-v,v],'k','linewidth',1.5);

• Hello Jean, thanks, is it possible to get an equation without absolute or "behavorial change"? Feb 7, 2021 at 0:28
• Okay, thanks, I have accepted your answer! Thanks for the help! Feb 7, 2021 at 0:48
• I think I have worked out a derivation of this formula showing that $k^2 = f^2 + 1$. Then if $b$ is the semimajor axis of the ellipse and $b'$ the semiconjugate axis of the hyperbola, $b^2=1+\sqrt{f^2+1}$ and $b'^2=b^2-2.$ A more general equation allows $b$ and $b'$ to take other values, allowing many other axe shapes for a given $f$, but in cases other than the one in this answer the formula has $y^2$ terms in two places, one inside the absolute value and one outside. Feb 7, 2021 at 17:07
• @David K I fully agree with you that we haven't there the most general form, and I am not surprized when you say that this general form is obtained using a second parameter. Feb 7, 2021 at 17:44
• I think I have it now for three independent parameters (which includes the freedom to vary $f$). I have written this up in another answer. Feb 7, 2021 at 18:45

Let $$a$$ and $$b$$ respectively be half the lengths of the major and minor axes of the ellipse. Let $$A$$ and $$B$$ respectively be half the lengths of the transverse and conjugate axes of the hyperbola. Let $$f$$ be half the distance between the foci, which are the same points for both the ellipse and the hyperbola. Then \begin{align} a^2 &= f^2 + b^2, \\ A^2 &= f^2 - B^2, \end{align} which implies that $$a > f$$ and $$B < f.$$ (All distance measurements are non-negative.)

The equation of the ellipse is $$\frac{x^2}{a^2} + \frac{y^2}{b^2} - 1 = 0 \tag1$$ and the equation of the hyperbola is $$\frac{x^2}{A^2} - \frac{y^2}{B^2} - 1 = 0. \tag2$$

The desired curve satisfies Equation $$(1)$$ when $$\frac{x^2}{A^2} - \frac{y^2}{B^2} < 1$$ and satisfies Equation $$(2)$$ when $$\frac{x^2}{a^2} + \frac{y^2}{b^2} < 1.$$

Inspired by the clever solution in another answer, we may try to unify the two equations by first setting the $$x^2$$ terms equal. For the ellipse we get $$x^2 + \frac{a^2}{b^2} y^2 - a^2 = 0 \tag3$$ and for the hyperbola $$x^2 - \frac{A^2}{B^2} y^2 - A^2 = 0. \tag4$$ The "average" of these equations (taking half the sum of the left-hand sides of $$(3)$$ and $$(4)$$) is $$x^2 + \frac12\left(\frac{a^2}{b^2} - \frac{A^2}{B^2}\right) y^2 - \frac12 (a^2 + A^2) = 0 \tag5$$ and "half the difference" of these equations (taking half the difference of the left-hand sides of $$(3)$$ and $$(4)$$) is $$\frac12\left(\frac{a^2}{b^2} + \frac{A^2}{B^2}\right) y^2 - \frac12 (a^2 - A^2) = 0. \tag6$$

Equation $$(3)$$ is then the "sum" of Equations $$(5)$$ and $$(6)$$ and Equation $$(4)$$ is the "difference", subtracting $$(6)$$ from $$(5).$$

But if we add the absolute value of the left side of $$(6)$$ to the left side of $$(5)$$, we get $$\begin{multline} \qquad x^2 + \frac12\left(\frac{a^2}{b^2} - \frac{A^2}{B^2}\right) y^2 - \frac12 (a^2 + A^2) \\ + \left\lvert \frac12\left(\frac{a^2}{b^2} + \frac{A^2}{B^2}\right) y^2 - \frac12 (a^2 - A^2) \right\rvert = 0 \qquad \tag7 \end{multline}$$

Observe that when $$\left(\frac{a^2}{b^2} + \frac{A^2}{B^2}\right) y^2 \geq (a^2 - A^2)$$, Equation $$(7)$$ matches Equation $$(5)$$ and therefore follows the path of the ellipse, but when $$\left(\frac{a^2}{b^2} + \frac{A^2}{B^2}\right) y^2 \leq (a^2 - A^2)$$, Equation $$(7)$$ matches Equation $$(6)$$ and therefore follows the path of the hyperbola. When $$\left(\frac{a^2}{b^2} + \frac{A^2}{B^2}\right) y^2 = (a^2 - A^2)$$, Equation $$(7)$$ matches both $$(5)$$ and $$(6)$$ simultaneously and it determines the intersections of the ellipse and hyperbola. That is, this is exactly the equation we want when the two foci are on the $$x$$ axis and are equidistant from the origin.

Note that since $$a$$ is a function of $$f$$ and $$b$$ and since $$A$$ is a function of $$f$$ and $$B$$, we can express the two equations using just three variables (and should do so, in order to ensure the same foci): $$f$$, $$a$$, and $$A$$; $$f$$, $$b$$, and $$B$$; or some other combination of three of the five variables. As long as we choose three mutually independent variables we can set them to whichever values we like (under the constraints $$a > f$$ and $$B < f$$) and derive the other two. For example, we could choose the length and width of the ellipse ($$2a$$ and $$2b$$) and the distance $$2A$$ between the vertices of the hyperbola, under the constraint that $$A^2 < a^2 - b^2.$$

If we choose $$f,$$ $$b,$$ and $$B$$ such that $$b^2 = 1 + \sqrt{f^2 + 1}$$ and $$B^2 = b^2 - 2,$$ then Equation $$(7)$$ becomes $$x^2 + \left(\sqrt{f^2 +1}\right) \left\lvert y^2 - 1\right\rvert - (f^2 + 1) = 0,$$ the same equation found in the answer that inspired this one.

For a curve at any other location and orientation in the plane, we can replace $$x$$ and $$y$$ with linear combinations of $$x$$ and $$y$$ that translate and rotate the figure as required. We then get an equation in which the sum of one quadratic polynomial in $$x$$ and $$y$$ and the absolute value of another quadratic polynomial in $$x$$ and $$y$$ is equal to zero.

• Very interesting... Feb 7, 2021 at 22:02
• Thanks @David, looks interesting! Feb 8, 2021 at 2:56

I guess you need inequalities describing the region.

Take $$a>c>b>0$$, for solid of revolution about the $$x$$-axis:

• Internal region bounded by an ellipsoid:

$$A=\left \{(x,y,z) \in \mathbb{R}^3: \frac{x^2}{a^2-c^2}+\frac{y^2+z^2}{c^2} \le 1 \right \}$$

• Middle region bounded by branches of a hyperboloid:

$$B=\left \{(x,y,z) \in \mathbb{R}^3: \frac{x^2}{c^2-b^2}-\frac{y^2+z^2}{b^2} \le 1 \right \}$$

• The shaded region is $$A\cap B$$ or equivalently,

$$b^2-\frac{b^2 x^2}{c^2-b^2} \le y^2+z^2 \le c^2-\frac{c^2 x^2}{a^2-c^2}$$

• Intersection of two conics (of revolution):

$$\textstyle \partial A \cap \partial B= \left \{ (\xi,\eta,\zeta) \in \mathbb{R}^3: (\xi^2,\eta^2+\zeta^2)= \left( \frac{(a^2-c^2)(c^4-b^4)}{a^2 b^2+c^4-2b^2 c^2}, \frac{b^2 c^2(a^2+b^2-2c^2)}{a^2 b^2+c^4-2b^2 c^2} \right) \right \}$$

For solid of revolution about the $$y$$-axis is left as an exercise.

• Hello Ng, thanks for the answer but I guess this is not what I was looking for. I am looking for the equation of a shape in 2D formed by the two conics. I have updated the question so that you may be able to follow what I mean to say. Feb 6, 2021 at 22:46