Distance of point $P$ from an ellipse

If $ \frac {x^2}{a^2} + \frac {y^2}{b^2} = r^2$ is an ellipse, with the parameterization $x(θ)≔r(a \cos ⁡θ,b \sin⁡ θ ),$ I have to find the value of $θ$ giving the minimum distance from $P(p,q)$ (not on the ellipse) to the ellipse is given by a quartic in $t= \tan⁡( \frac {θ}{2}).$ A necessary condition for $x$ to be the closest point to $P$ is that $P-x$ is perpendicular to the tangent vector in $x ,$ i.e. $(P-x(θ) ). x' (θ)=0$

I can't handle the above condition to make an fuction (e.g. $f(θ)$) to find the minimum value by calculating the rerivative $f'(θ)=0$ for example. Then I have to prove that rational, non-zero values of $a, b, p, q$ can be found such that the quartic factorises as the product of two quadratics with rational coefficients. Any help? Thank you


Solution 1:

The system $$ \left\{\begin{array}{rcl}\frac{x^2}{a^2}+\frac{y^2}{b^2}&=&1\\ (x-p)^2+(y-q)^2&=&R^2\end{array}\right.$$ describes the intersections between the ellipse and a circle with radius $R$ centered at $(p,q)$.
By eliminating the $y$-variable we get a quartic in $x$, whose discriminant is a quartic polynomial in $R^2$.
It turns out that the squared distance of $(p,q)$ from the ellipse is given by a root of

$$ a^8 b^4-2 a^6 b^6+a^4 b^8-4 a^6 b^4 p^2+6 a^4 b^6 p^2-2 a^2 b^8 p^2+6 a^4 b^4 p^4-6 a^2 b^6 p^4+b^8 p^4-4 a^2 b^4 p^6+2 b^6 p^6+b^4 p^8-2 a^8 b^2 q^2+6 a^6 b^4 q^2-4 a^4 b^6 q^2+6 a^6 b^2 p^2 q^2-10 a^4 b^4 p^2 q^2+6 a^2 b^6 p^2 q^2-6 a^4 b^2 p^4 q^2+2 a^2 b^4 p^4 q^2-2 b^6 p^4 q^2+2 a^2 b^2 p^6 q^2+2 b^4 p^6 q^2+a^8 q^4-6 a^6 b^2 q^4+6 a^4 b^4 q^4-2 a^6 p^2 q^4+2 a^4 b^2 p^2 q^4-6 a^2 b^4 p^2 q^4+a^4 p^4 q^4+4 a^2 b^2 p^4 q^4+b^4 p^4 q^4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+a^4 z^4-2 a^2 b^2 z^4+b^4 z^4,$$ not really pleasant but still manageable with the help of a CAS.

Solution 2:

One can normalize the length to $r=1$. The distance from $P$ to a point of the ellipse can be written as \begin{equation} d(\theta)=\sqrt{(p-a\cos \theta)^2+(q-b\sin\theta)^2} \end{equation} It is minimal if \begin{equation} a(p-a\cos\theta)\sin\theta-b(q-b\sin\theta)\cos\theta=0 \end{equation} with $u=\tan\theta/2$, the condition reads \begin{equation} u^{4}bq+ \left( 2a^{2}+2ap-2b^{2} \right) u^{3}+ \left( -2a^{2}+2ap+2b^{2} \right) u-bq=0 \end{equation} To find rational values for the parameters $a,b,p,q$ which allow a factorization of the quartic, one may choose them to verify \begin{equation} \frac{bq}{ -2a^{2}+2ap+2b^{2}}=\frac{ 2a^{2}+2ap-2b^{2}}{-bq} \end{equation} or \begin{equation} b^2q^2=4\left[ \left( a^2-b^2\right)^2-a^2p^2 \right] \end{equation} which can be written as \begin{equation} b^2q^2+4a^2p^2=4\left( a^2-b^2\right)^2 \end{equation} By comparison to the pythagorean triples \begin{equation} (3n)^2+(4n)^2=(5n)^2 \end{equation} $a^2-b^2=5n$ is verified by $a=4,b=1,n=6$, for example, and thus $q=18,p=3$. The condition reads \begin{equation} 6 (u+3)(3u^3-1)=0 \end{equation} which has 2 real roots $u=-3$ and $u=3^{-1/3}$.