<s>[INST] Ellipse in a Rectangle What is the equation for an ellipse (or rather, family of ellipses) which has as its tangents the lines forming the rectangle $$x=\pm a, y=\pm b\;\; (a,b>0)$$?
This question is a modification/extension of this other question here posted recently.
 [/INST] Here's a purely algebraic approach without any use of trigonometric functions.
By symmetry, the center of the ellipse is at the origin, so its
equation is just
$$
Ax^2 + Bxy + Cy^2 = 1
$$
with $A>0,$ $C>0,$ and $B^2 < 4AC.$
The tangents at $y = \pm b$ will occur at values of $y$ for which the
quadratic equation in $x,$ $Ax^2 + Bxy + Cy^2 - 1 = 0,$
has a double root.
This occurs when 
$$(By)^2 - 4A(Cy^2 - 1) = 0,$$
that is, at
$$
y^2 = \frac{4A}{4AC - B^2}.
$$
For similar reasons, the tangents at $x=\pm a$ occur when
$$
x^2 = \frac{4C}{4AC - B^2}.
$$
(Note that the conditions on $A,$ $B,$ and $C$ guarantee that 
$\frac{4A}{4AC - B^2} > 0$ and $\frac{4C}{4AC - B^2} > 0.$)
Set
$$
\frac{4C}{4AC - B^2} = a^2, \quad
\frac{4A}{4AC - B^2} = b^2.
$$
It follows that $C=A a^2/b^2.$ Using this to substitute for $C$
in one of the equations above and solving for $B,$ we get
$$B = \pm\sqrt{ \frac{ 4A(a^2A - 1)}{b^2}}.$$
It follows that $a^2A - 1\geq 0,$ that is, $A \geq \frac1{a^2}.$
If $A = \frac1{a^2}$ then $B = 0$ and $C = \frac1{b^2},$
that is, we get the equation of the inscribed ellipse whose axes are aligned with the coordinate axes.
For any other value of $A$ we get an ellipse whose axes are inclined;
the direction of inclination depends on whether we choose the positive
or negative.
For very large values of $A$ the major axis of the ellipse is very
nearly the diagonal of the rectangle.
</s>