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