[Math] Shortest distance between ellipse and a line

calculusmultivariable-calculus

I was trying to find the shortest distance between the ellipse

$$\frac{x^2}{4} + y^2 = 1$$

and the line $x+y=4$. We have to find the point on the ellipse where
its tangent line is parallel to $x+y=4$ and find the distance between those two points.
However, when I used the implicit differentiation, I get

$$\frac{x}{2} + 2y\frac{dy}{dx} = 0$$
$$\frac{dy}{dx} = \frac{-x}{4y}$$

If it's parallel to $x+y=4$, then we need $x=4y$. Do I just plug it into ellipse equation and solve for it and calculate the distance between the point and a line or am I doing it wrong? I just wanted to clarify. Any help would be appreciated. Thanks!

Best Answer

If $F(x,y) \equiv \frac{1}{4}x^2 + y^2$, then $\nabla F = (\frac{1}{2}x, 2y)$ is orthogonal to curves of constant $F$, hence orthogonal to the ellipse when $(x,y)$ is on the ellipse. Also make $\nabla F$ orthogonal to the given line, so $(\frac{1}{2}x, 2y)\cdot (1, -1) = 0$ gives $y = \frac{1}{4}x$.