I'm trying to find the ellipse that bounds a rectangle in a way that the "distance" between the rectangle and the ellipse is the same vertically and horizontally.
Here is an image to illustrate what I mean:
It's not perfectly drawn but the two "x" dimension need to be the same.
What I tried so far is:
The ellipse equation is $$\left(\frac{x}{a}\right)^2 + \left(\frac{y}{b}\right)^2 = 1$$
- The "ellipse bounding the rectangle" constraint gives us $$\left(\frac{w}{a}\right)^2 + \left(\frac{h}{b}\right)^2 = 1$$
- The "x dimension must be equal" constraint gives us $a-w = b-h$
So it's basically a $2$ equations system with $2$ unknowns.
But I got stuck at this point. If I do a substitution I have
- $$a = b-h+w$$
- $$\left(\frac{w}{b-h+w}\right)^2 + \left(\frac{y}{b}\right)^2 = 1$$
and I don't know how to solve it.


HINT
Let us put everything centered at (0,0) and since everything is symmetrical, we shall just look at the first quadrant.
So you look for a value of "x", smaller than "a", such that (a - x) be equal to (b - y). But you know that the upright corner of the rectangle is also along the ellipse. This means that
y = b Sqrt[1 - (x/a)^2].
Can you continue from here ?
Happy New Year