we know that two tangent circles of centers $(x_{1},y_{1})$ and $(x_{2},y_{2})$, radii $r_{1}$ and $r_{2}$ will have to respect this formula :
$$ (x_{1}-x_{2})^2+(y_{1}-y_{2})^2=(r_{1} \pm r_{2})^2 $$
Is there a similar formula for two tangent ellipses ?
Assuming that we have two ellipses with the following equations :
$$ \frac{(x-x_{1})^2 }{a^2} + \frac{(y-y_{1})^2}{b^2} = 1 $$
and
$$ \frac{(x-x_{2})^2 }{c^2} + \frac{(y-y_{2})^2}{d^2} = 1 $$
Let's say that we do not know $x_{2}$ in the last equation. How could it be defined to ensure tangency ?
EDIT : Dear everyone, thank you for your answers. I wanted to add some more details :
With a CAD software, I drew these two ellipses :
The first one is centered :
$$ \frac{x^2}{50^2} + \frac{y^2}{25^2} = 1 $$
The other one has this equation :
$$ \frac{(x+35)^2}{20^2} + \frac{(y-y_{2})^2}{50^2} = 1 $$
with the constraint $y_{2} > 0$ , the software's solver find the coordinate of the center with $y_{2}$ for tangency of $(-35;30.732)$ and the coordinates of the tangency point $(-48.99,-5.01)$
As illustrated in the following pic :
Angles are badly displayed but are bound to the respective lines between the tangency point and the foci
Using Amogh's elegant answer I tried the following :
Assuming that there exist a point $(x,y)$ such that the two previous ellipses are tangent, this point must satisfy the following system ( setting $ \omega = \theta $ due to the assumed tangency ) :
$$ (1)\; \; x_{1} + a \, cos(\theta) - x_{2} - c \, cos(\theta) = 0 $$ $$ (2)\; \; y _{1} + b \, sin(\theta) - y_{2} - d \, sin(\theta) = 0 $$
Or in our case :
$$ (1)\; \; 50 cos(\theta) + 35 - 20 cos(\theta) = 0 $$ $$ (2)\; \; 25 sin(\theta) - y_{2} - 50 sin(\theta) = 0 $$
the first line gives :
$$ \theta = arccos(\frac{-35}{50-20}) $$
which is not possible.
Can someone point out what I'm doing wrong ?
PS : I still have to put some time in studying the other (really good) answers and suggestion, which are more complex but would like to thank the posters
For two ellipses with given semi-major and semi-minor axes, and orientations with respect to the $x$ and $y$ axes. Fix the center of one ellipse, then you can find the locus of the center of the second ellipse when its tangent to the first fixed ellipse.
Let the two ellipses be modelled by
$ (r - r_1)^T Q_1 (r - r_1) = 1 $
$ (r - r_2)^T Q_2 (r - r_2) = 1 $
Select the tangency points $T$ on the first ellipse, then the normal vector extending out of the first ellipse is along the vector
$ g_1 = Q_1 (T - r_1) $
We want this normal to be parallel to the gradient of the second ellipse, which is given by
$ g_2 = Q_2 (T - r_2 )$
So now we have
$ Q_2 (T - r_2) = K Q_1 (T - r_1) $
For some $K \lt 0 $
From the last equation, we get
$ T - r_2 = K Q_2^{-1} Q_1 (T - r_1 ) $
Since $T$ is on the second ellipse, then
$ (T - r_2)^T Q_2 (T - r_2) = 1 $
Therefore,
$ K^2 (T - r_1) Q_1 Q_2^{-1} Q_1 (T - r_1 ) = 1 $
And this gives the value of $K$ (remember $K$ is negative).
Having found the proportionality constant $K$, we go back to the previous equation and solve for $r_2$
The previous equation is
$ T - r_2 = K Q_2^{-1} Q_1 (T - r_1 ) $
From which,
$ r_2 = T - K Q_2^{-1} Q_1 (T - r_1 ) $
Changing $T$ over all the perimeter of the first ellipse generates the locus of $r_2$. This is illustrated in the following GIF image
The code (VBA for MS-Excel) that I used to generate the GIF image is included below
The problem as it posed in the question, is somewhat different from what I've presented above, namely, we are given the first ellipse whose equation is
$ (r - r_1)^T Q_1 (r - r_1) = 1 $
where $Q_1$ and the center $r_1$ are known. In addition, we have the second ellipse equation,
$ (r - r_2)^T Q_2 (r - r_2) = 1 $
where $Q_2$ is known, but $r_2$ is partially known. In the question, we have
$ Q_1 = \begin{bmatrix} \dfrac{1}{50^2} && 0 \\ 0 && \dfrac{1}{25^2} \end{bmatrix} $
$ r_1 = \begin{bmatrix} 0 \\ 0 \end{bmatrix} $
$Q_2 = \begin{bmatrix} \dfrac{1}{20^2} && 0 \\ 0 && \dfrac{1}{50^2} \end{bmatrix} $
And
$ r_2 = \begin{bmatrix} - 35 \\ y_2 \end{bmatrix} $
We want to determine the tangency between the first and second ellipses. For this purpose let the tangency point be
$ T = \begin{bmatrix} x \\ y \end{bmatrix} $
Then we have $T$ on both ellipses, i.e.
$ (T - r_1)^T Q_1 (T - r_1) = 1 $
and
$ (T - r_2)^T Q_2 (T - r_2) = 1 $
The first equation expands as follows
$ T^T Q_1 T + r_1^T Q_1 r_1 - 2 T^T Q_1 r_1 = 1 $
And the second equation expands as follows
$ T^T Q_1 T + r_2^T Q_1 r_2 - 2 T^T Q_1 r_2 = 1 $
Note here that $r_2$ is not a constant vector.
The third equation that we need is the tangency equation, we as discussed above is
$ Q_2 (T - r_2) = K Q_1 (T - r_1) $
This introduces a fourth unkown which is the parameter $K$, but this can be eliminated by dividing the two components of the above vector equation, and after cross multiplication this result in
$ \left( Q_{2_{11}} (x + 35) + Q_{2_{12}} (y - y_2) \right) \left( Q_{1_{21}} (x - r_{1x}) + Q_{1_{22}} (y - r_{1y} \right) = \left( Q_{2_{21}} (x + 35) + Q_{2_{22}} (y - y_2) \right) \left( Q_{1_{11}} (x - r_{1x} ) + Q_{1_{12}} (y - r_{1y} ) \right) $
In the question, the off-diagonal elements of $Q_1$ and $Q_2$ are zero, so this equation simplifies to
$ \left( Q_{2_{11}} (x + 35) \right) \left( Q_{1_{22}} (y - r_{1y} \right) = \left( Q_{2_{22}} (y - y_2) \right) \left( Q_{1_{11}} (x - r_{1x} ) \right) $
We now have three quadratic equations in the three unknowns $x, y, y_2$, and they can be solved using a math software application such as Mathematica, or online at www.wolframalpha.com
I found six valid solutions to this problem. There are listed below: