Distance between ellipse and line What is the distance between the ellipse $$\frac{x^2}{9}+\frac{y^2}{16}=1$$ and the line $y=6-x$.
I think I need to be using Lagrange Multipliers but don't know how.
 A: The distance from a point $(x,y)$ to the line $x+y-6=0$ is given by
$$
d(x,y)=\frac{|x+y-6|}{\sqrt{2}}
$$
So you want to minimize $d(x,y)$ subject to
$$
\frac{x^2}{9}+\frac{y^2}{16}=1
$$
You can set $x$ and $y$ to $3\cos t$ and $4\sin t$ and the problem boils down to minimizing 
$$
\frac{|3\cos t+4\sin t-6|}{\sqrt{2}}
$$
Standard calculus techniques yield 
$
t_{min} = 2\tan^{-1}\frac{1}{2}
$, so the minimum distance is $\frac{1}{\sqrt{2}}$, and it is reached with the point $(\frac{9}{5},\frac{16}{5})$.

A: Just another approach, for the sake of variety.
You can also observe that at the point of closest approach, the ellipse must be parallel to the line $y = 6-x$, which has slope $-1$.  Implicit differentiation of the ellipse gives us
$$
\frac{2x}{9}+\frac{2y}{16}\frac{dy}{dx} = 0
$$
$$
16x+9y\frac{dy}{dx} = 0
$$
$$
\frac{dy}{dx} = -\frac{16x}{9y}
$$
which must equal $-1$ at the point of closest approach (with $x, y > 0$—a quick sketch will show why), so
$$
y = \frac{16x}{9}
$$
Plug this back into the equation for the ellipse, solve for the point, and obtain the distance.
A: This is different approach that has the simplest expressions and is almost linear to solve.
At the point of closest approach on the ellipse find the tangent line that is parallel to the given line. The given line is $$x+y=6$$ A parallel line is $$x+y=c$$
For the equation of the ellipse you have parametrize the points on the ellipse as $$\begin{align} x& = 3 \cos(t) &y & = 4 \sin(t) \end{align} $$
and when this points belongs to the tangent line we have $$ c = 3 \cos(t) +4 \sin(t)$$
The point on the ellipse is tangent when an extrema of $c$ is reached (minimum or maximum). In general this is $\frac{\partial c}{\partial t}=0$ or $$4 \cos(t)-3 \sin(t) =0$$ which is solved for $t= \tan^{-1} \left( \frac{4}{3} \right) $ or $$c = 5$$
So now just find the distance between $x+y=6$ and $x+y=5$. The lines of 45° are one unit apart from each other so the distance is $\boxed{d=\frac{1}{\sqrt{2}}}$
A: Yet another purely algebraic solution: start like @ja72 with a parallel line $y = c - x$ and find its points of intersection with the ellipse, by substituting this into the equation for the ellipse and getting a quadratic equation in $x$, whose coefficients depend on c:
$$
   25x^2 - 18cx + 9(c^2 - 16) = 0
$$
This will have two (real) solutions (or no real solutions) in general (depending on whether the line intersects the ellipse or not), except when c is arranged in such a way as to make the line tangent to the ellipse, at which point there will be only one solution. For that to happen, the discriminant has to be zero:
$$
   B^2 - 4AC = (-18c)^2 - 4\cdot25\cdot9(c^2 - 16) = 0
$$
which reduces down to $c^2 = 25$, with solutions $c = \pm 5$. Obviously the closest parallel to $y = 6 - x$ is obtained when $c = 5$. The two lines have a slope of $-1$, i.e. a $-45^\circ$ angle with the x-axis and are one unit apart in the $y$ (and consequently also in the $x$) direction, so Pythagoras tells us that the distance between them is $1\over \sqrt{2}$.
A: The minimum value it's the minimal distance between $x+y=6$ and $x+y=c$, 
where $x+y=c$ is a tangent line to our ellipse 
and since $\frac{xx_1}{9}+\frac{yy_1}{16}=1$ is a tangent line to the ellipse in $(x_1,y_1)$,
we obtain $\frac{x_1}{9}=\frac{1}{c}$ and $\frac{y_1}{16}=\frac{1}{c}$. 
We can assume that $c\neq0$ because it's obvious that for $c=0$ we can non get a minimal value.
After using these substitutions to the equation of the ellipse we get for $(x_1,y_1)$:
$\left(\frac{9}{5},\frac{16}{5}\right)$ or $\left(-\frac{9}{5},-\frac{16}{5}\right)$.
The distance between $(x_1,y_1)$ and $x+y=6$ it's $\frac{|x_1+y_1-6|}{\sqrt2}$ and
we see that $\left(\frac{9}{5},\frac{16}{5}\right)$ gets a minimal distance and $\left(-\frac{9}{5},-\frac{16}{5}\right)$ gets a maximal distance. 
Thus, the answer is $\frac{|\frac{9}{5}+\frac{16}{5}-6|}{\sqrt2}$ or $\frac{1}{\sqrt2}$
A: Yes, you can use Lagrange multipliers minimize $x^2+ y^2$ (which is equivalent to minimizing $\sqrt{x^2+ y^2}$) subject to the constraints $\frac{x^2}{9}+ \frac{y^2}{16}= 1$ and $x+ y= 6$. $\nabla x^2+ y^2= <2x, 2y>$, $\nabla \frac{x^2}{9}+ \frac{y^2}{16}= <2x/9, y/8>$, and $\nabla x+ y= <1, 1>$.
So you have $<2x, 2y>= \lambda<2x/9, y/8>+ \mu<1, 1>$ together with the constraints to solve for x and y, $\mu$, and $\lambda$.  
