I wanted to find the ellipse of the largest area that can pass through a hallway that makes a 90 degrees turn.The vertex of this hallway is at (c , d). In order to do that, I tried to find the envelope of the equation of family of ellipses by using the only two conditions (that I know of) of the envelope, which are: $$\frac{\partial F(x,y,\alpha)}{\partial\alpha}=0 $$ $$F(x,y,\alpha)=0$$
The equation of the family of ellipses that is tangent to both axis has the following equation:
$$F(x,y,\alpha)\equiv\frac{\left[\left(x-\sqrt{a^{2}\cos\alpha^{2}+b^{2}\sin\alpha^{2}}\right)\cos\alpha+\left(y-\sqrt{b^{2}\cos\alpha^{2}+a^{2}\sin\alpha^{2}}\right)\sin\alpha\right]^2}{a^2}+ \frac{\left[\left(x-\sqrt{a^{2}\cos\alpha^{2}+b^{2}\sin\alpha^{2}}\right)\sin\alpha-\left(y-\sqrt{b^{2}\cos\alpha^{2}+a^{2}\sin\alpha^{2}}\right)\cos\alpha\right]^2}{b^2}-1=0; a<b $$
where $0<\alpha<\frac{\pi}{2}$ is the parameter, and a and b are minor and major axes respectively.
I tried to solve this system of equation to remove the parameter $\alpha$ but I couldn't (because the parameter $\alpha$ is everywhere). If i try to combine these equations it just results in a really complex equation with the parameter still in it.The equation that I get after simplifying are:
$$F(x,y,\alpha)=n^{2}(x-m)^{2}+(-a^{2}+b^{2})(x-m)(y-n)\sin(\alpha)+m^{2}(y-n)^{2})$$
$$\partial_\alpha F(x,y,\alpha)\equiv \left[(x-m+n)^{2}-(y-n+m)^{2}\right]-2(x-m)(y-n)\tan(\alpha)-\left(\frac{mx-yn+n^{2}-m^{2}}{mn}\right)\frac{(-a^{2}+b^{2})\sin(\alpha)}{2}=0$$
where $m=\sqrt{a^{2}\cos\alpha^{2}+b^{2}\sin\alpha^{2}}$ and $n=\sqrt{b^{2}\cos\alpha^{2}+a^{2}\sin\alpha^{2}}$ I've tried a lot to remove the parameter $\alpha$ but so far I've failed to do so.So my questions are " Is there any way that I can eliminate the parameter $\alpha$ and get the equation of the envelope?" and if there isn't then "Is there any other way to solve the hallway problem that I just proposed?" I asked my teacher but he had no idea how to solve it, so could you please help?
In order to avoid confusion ,I'm uploading a picture of a similar problem in which there is a rectangle of maximum area that passes through the left-turn hallway instead of an ellipse(so that you can get the idea of the type of hallway I'm talking about).I learned about this method from this link here.