TITLE: Maximum ellipse inscribed in Witch of Agnesi curve
QUESTION [7 upvotes]: An ellipse with variable $(2a,2b)$ axes parallel to the $(x,y)$ coordinate axes is inscribed inside fixed curve of equation.
$$ y=\pm\dfrac{1}{1+x^2}$$

Show that maximum ellipse area occurs when it touches the curve at its inflection point.
I am looking to generalizing a variable ellipse contact point with a curve having an inflection, like in the recent Bell Curve post. My intuition needs to be validated or disproved later using simple methods of differential calculus.

REPLY [3 votes]: A Witch of Agnesi of height $2a$, and an ellipse of radii $p$ and $q$, are parameterized by
$$(x,y) = (2a\tan\theta,2a\cos^2\theta) \qquad (x,y) = (p \cos\phi, q \sin\phi) \tag{1}$$
Respective tangent vectors are given by
$$(x',y') =  (2 a\sec^2\theta,-4a\cos\theta\sin\theta)
\qquad (x',y')=(-p\sin\phi,q\cos\phi) \tag{2}$$
Inscribing the ellipse in the witch requires that the points in $(1)$ match and the vectors in $(2)$ are proportional, so we have this system
$$\begin{align}
2 a \tan\theta &= \phantom{-}p \cos\phi \\
2 a \cos^2\theta &= \phantom{-}q\sin\phi \\
2 a k \sec^2\theta &= -p \sin\phi \\
4 a k \cos\theta\sin\theta &= -q \cos\phi
\end{align}\tag{3}$$
We can solve the first three equations as a linear system in $p$, $q$, $k$:
$$
k =-\frac{2 a \cos\theta\sin\theta \sin\phi}{\cos\phi} \qquad
p =\frac{2 a \sin\theta}{\cos\theta\cos\phi} \qquad 
q =\frac{2 a \cos^2\theta}{\sin\phi} \tag{4}$$
Substituting into the fourth equation of $(4)$ we find (after discarding an extraneous factor of $\cos\theta$)
$$\sin^2\phi = \frac{1}{1+2\sin^2\theta}\quad\to\quad \cos^2\phi = \frac{2\sin^2\theta}{1+2\sin^2\theta} \tag{5}$$
Therefore, the area of the ellipse is given by
$$\pi p q = \frac{4\pi a^2 \sin\theta\cos\theta}{\sin\phi\cos\phi} = 2\pi a^2 \sqrt2 \cos\theta (1 + 2 \sin^2\theta) \tag{6}$$
To find critical points of $(6)$ we equate its derivative to zero:
$$\cos2\theta\sin\theta = 0 \quad\to\quad \theta=\frac\pi4 \quad\to\quad \pi p q =  4 \pi a^2 \tag{7}$$
That's all well and good (and surprisingly simple), but note that the witch's inflection point corresponds to $\theta=\pi/6$, so the ellipse of maximal area does not touch that point. $\square$

Here's a walk-through of the general case. Let a curve be parameterized as
$$(x,y) = (u(t),v(t)) \qquad (x',y') = (u'(t),v'(t)) \tag{1',2'}$$
(where I'll suppress the parameter going forward). Solving the corresponding $p$-$q$-$k$ system gives
$$p = u \sec\phi \quad q = v \csc\phi \quad k = -\frac{u'}{u}\cot\phi \tag{4'}$$
and from the fourth equation  we get
$$\cos^2\phi =\frac{uv'}{uv'-u'v} \qquad \sin^2\phi = -\frac{u'v}{uv'-u'v}  \tag{5'}$$
$$(\pi pq)^2 = -\pi^2 \frac{uv}{u'v'}\left(uv'-u'v\right)^2 \tag{6'}$$
Differentiating, and assuming $uv'-vu'\neq 0$, yields these conditions for the critical values of $(6')$:
$$u v' + u'v = 0 \qquad\text{or}\qquad u v(u' v''-v'u'') = u'v'( u v'-u' v) \tag{7'}$$
that is,
$$(uv)' = 0 \qquad\text{or}\qquad \left(\frac{uv'}{u'v}\right)' = 0 \tag{7''}$$
so that, respectively,
$$\pi p q = 2\pi u v \qquad\text{or}\qquad
(\pi pq)^2 = -\pi^2 \frac{(uv'-v'u)^3}{u'v''-u''v'} \tag{8'}$$
In the case of the witch, the second condition of $(7')$ gives extraneous or minimizing values, so that we rely on the first condition to get the first value of $(8')$ as the maximum area. It's not clear to me if we can always discount the second condition of $(7')$.