Given two circles with radii $\beta$ and $\beta^{-1}$, where $\beta\geq1$. Also, given two lines $y=x\tan\alpha$ and $y=-x\tan\alpha$, where $\pi/2>\alpha\geq0$. I am interested in all ellipses with center at $(k,0)$ that are bound between these two lines and the larger circle (LHS of Figure). I also assume that ellipses are tangent to points $(\beta^{-1}\cos\alpha, \beta^{-1}\sin\alpha)$ and $(\beta^{-1}\cos\alpha, -\beta^{-1}\sin\alpha)$, and has the following equation:
$$\frac{(x-k)^2}{a^2}+\frac{y^2}{b^2}=1.$$
I assume that $b\geq a$. I found that all such ellipses can be obtained by the following equations:
$$a=\sqrt{\frac{k(k\beta-\cos\alpha)}{\beta}}, \quad b=\sqrt{\frac{k\sin^2\alpha}{\beta\cos\alpha}}.$$
So, by changing $k$ in the range $[\beta^{-1}\cos\alpha, \beta^{-1}\frac{1}{\cos\alpha}]$ I can obtain all such ellipses: desmos.
However, for some combination of $\beta$ and $\alpha$, $k$ cannot reach $\beta^{-1}\frac{1}{\cos\alpha}$, since ellipse will touch larger circle before that (RHS of Figure). Given $\alpha,\beta$ pair, I want to find the largest $k$ allowed, before an ellipse touches the larger circle.
