Suppose that $\displaystyle a\geq 0$. Find the least distance from the point [tex](a,0) to the ellipse $\displaystyle \frac{x^2}{4}+\frac{y^2}{1}=1$.

Well basically i used the distance formula, so $\displaystyle D=\sqrt{(x-a)^2+y^2}=\sqrt{(x-a)^2+1-\frac{x^2}{4}}$.

Then i set up a function $\displaystyle f(x)=(x-a)^2+1-\frac{x^2}{4}$.

I differentiated it it find $\displaystyle f'(x)=2(x-a)-\frac{x}{2}$.

I then found $\displaystyle x=\frac{4a}{3}$ to be the minimum turning point and subbed it back into distance formula to get $\displaystyle D=\sqrt{1-\frac{a^2}{3}}$.

However the answer is:

least distance $\displaystyle =\begin{cases}

&\sqrt{1-\frac{a^2}{3}} \text{ if } 0\leq a\leq 3/2 \\

&\left | a-2 \right | \text{ if } a> 3/2

\end{cases}$

i get why its |a-2| if a>2 but i dont get why its |a-2| between a=3/2 and a=2.

Can someone please explain why?