Minimizing distance between an ellipse and a point Problem
An ellipse has the formula:
$$\frac{x^2}{9} + \frac{y^2}{4} = 1$$
What is the shortest distance from the ellipse to the point $P = (a,0)?$
Attempted solution:
I have previously solved the same problem with P = (1,0) and P = (2,0). For P = (1,0), the minimum where x = 1.8 and y = 1.6 and a distance of $\frac{4\sqrt{5}}{5}$.
For P = (2,0), the local minimum was larger than the distance between P and the ellipse at y = 0., which was equal to 1. So there is some threshold for $a$ for which the local minimum is not truly the smallest distance.
Basic strategy:
1) Solve the ellipse formula for y and put that into the distance formula for the distance between the ellipse and the point (Pythagorean theorem).
2) Take the derivative.
3) Set the derivative to 0 and solve for x.
4) Use the ellipse formula to solve for y.
5) Put in x and y in the distance formula and get the distance.
However, at some threshold the distance between the point and the ellipse where y = 0 is even shorter. So the shortest distance will have one of two cases, one between 0 and just below the threshold and one for the threshold value and above.
I figured that I could apply the same method I did for the previous cases of P = (1,0) and P = (2,0) and see if I can find some way to find this threshold.
Use the ellipse formula and solve for y:
$$\frac{x^2}{9} + \frac{y^2}{4} = 1 \Rightarrow y = \sqrt{4\Big(1-\frac{x^2}{9}\Big)}$$
Write down distance formula
$$D = \sqrt{(x-a)^2 + y^2}$$
Put in y from the ellipse formula
$$D = \sqrt{(x-a)^2 + \Big(\sqrt{4\Big(1-\frac{x^2}{9}\Big)}\Big)^2}$$
Simplify:
$$D = \sqrt{\frac{5}{9} \cdot x^2 - 2ax +4}$$
Take the derivative:
$$D' = \frac{\frac{10}{9}x-2a}{2\sqrt{\frac{5}{9}x^2 - 2ax +4}}$$
Set the derivative to zero and solve for x:
$$\frac{10}{18}x -a =  0 \Rightarrow x = 1.8a$$
Use ellipse function and solve for y:
$$y = \sqrt{4\Big(1-\frac{(1.8a)^2}{9}\Big)} = a\sqrt{0.76}$$
Putting in x and y to the distance formula
$$D = \sqrt{(1.8a-a)^2 + (a\sqrt{0.76})^2} = \sqrt{0.64a^2 + 0.76a^2} = \sqrt{1.4a^2} = a\sqrt{1.4}$$
...but I feel like I am not getting anywhere. This is not the correct distance and the threshold is nowhere to be seen.
Expected answer is:
$$\sqrt{4-\frac{4}{5}a^2}$$
for $0 < a < \frac{5}{3}$ and
$$|a-3|$$
if $a \geq \frac{5}{3}$

Let $(x-a)^2+y^2=k^2,$ where $k\geq0.$ 
Thus, the equation $$(x-a)^2+4\left(1-\frac{x^2}{9}\right)=k^2$$ has real roots.
We have
$$\frac{5}{9}x^2-2ax+a^2+4-k^2=0,$$ which gives
$$a^2-\frac{5}{9}(a^2+4-k^2)\geq0$$
and $$k\geq2\sqrt{1-\frac{1}{5}a^2},$$ as your result.
