Nearest and farthest point from an ellipse to a line segment Find the nearest and farthest point from the ellipse    $ x^2 + 3y^2 =3 $ to the segment made by $ x+y = 3 $ in the first quadrant.
Found in a multivariable calculus course. So I have to find the nearest and farthest point to the line in that quadrant the ellipse is centered in the origin. Any idea on how to proceed? Should I calculate the gradient? Or optimize a distance function.
 A: Call your ellipse $C_1$ and your segment $C_2$. Rewrite $C_1$ as $x=\pm\sqrt{3-3y^2}$. Hence, a point is on the ellipse $\iff$ it is of the form $(\pm\sqrt{3-3y^2},y)$. Naturally, if we want real answers then $y \in [-1,1]$. Perform the same procedure for $C_2$ to find its points are of the form $(x,3-x)$. Because of the first quadrant restriction, $x \in [0,3]$. 
Let's start by finding the minimum distance. It is clear from graphing $C_1$ and $C_2$ that we want a point on $C_1$ with positive $x$ value; hence, for simplicity, we consider only points on $C_1$ of the form $(\sqrt{3-3y^2},y)$. The distance function is then $d(x,y)=\|(x-\sqrt{3-3y^2},3-x-y)\|$. Find the minimum value of this function by optimizing (which I will leave to you), keeping in mind the restrictions on $x$ and $y$.
For the maximum distance, the procedure is similar. We observe that we want a point on $C_1$ with a negative $x$ value, so to simplify we consider only points on $C_1$ of the form $(-\sqrt{3-3y^2},y)$. Then the distance function is $d(x,y)=\|(x+\sqrt{3-3y^2},3-x-y)\|$. Again, use optimization to find the maximum.
