Given a rectangle of width $w$ and height $h$, what are the semi-major, minor axes of the circumscribed ellipse, i.e., such that its arc barely touches the rectangle corners, but doesn't cut through the rectangle? For example,
The answer doesn't seem unique, but there clearly seems to be a "best-fit".







I would like to argue against the $\sqrt{2}$ scaling factor and propose an alternate solution.
Let us show first how the $\sqrt{2}$ scaling factor is derived, and then show that there is a better choice, obtained by a different computation ((5) instead of (3) below) as can be seen on the example of the figure given below.
Consider rectangle with vertices $(\pm x_0,\pm y_0)$ (we assume $0<y_0<x_0$).
Among the infinite number of ellipses circumscribed to the rectangle, let us take as esthetical criteria the proportionality rule:
$$\tag{1}\dfrac{x_0}{y_0}=\dfrac{a}{b}$$
The other constraint is that equation $\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}=1$ is verified by $x=x_0,y=y_0$, i.e.,
$$\tag{2}\dfrac{x_0^2}{a^2}+\dfrac{y_0^2}{b^2}=1.$$
Conditions (1)+(2) give a unique positive solution for $a$ and for $b$:
$$\tag{3}\begin{cases}a&=&\sqrt{2}x_0\\b&=&\sqrt{2}y_0\end{cases}$$
giving the green ellipse in the figure below.
But less elongated ellipses like the blue one or the red one are good challengers in this beauty contest.
I suggest to replace (1) by
$$\tag{4}\dfrac{x_0}{y_0}=\left(\dfrac{a}{b}\right)^2$$
(In this way, we take into account the fact that, if the rectangle is far from a square, the "stretching effect" has to be somewhat attenuated).
The formulas that one can deduce from (2) and (4) are:
$$\tag{5}\begin{cases}a&=&\sqrt{x_0(x_0+y_0)}&=&\sqrt{x_0^2(1+\frac{y_0}{x_0})}&<&\sqrt{2}x_0\\ b&=&\sqrt{y_0(x_0+y_0)}&=&\sqrt{y_0^2(1+\frac{x_0}{y_0})}&>&\sqrt{2}y_0\end{cases}$$
which would correspond to the less elongated red curve.