Find the minimum distance between the points on the ellipse $\ \frac{x^2}{4} + y^2 = 1 $ and the straight line $\ x+y = 4$,
I know one way is to use Lagrange multiplier, let $\ L(x_1,x_2,y_1,y_2,\lambda_1, \lambda_2) = (x_1 -x_2)^2 + (y_1-y_2)^2 + \lambda_1(\frac{x_1^2}{4} + y_1^2 -1) + \lambda_2(x_2+y_2 -4)= 0 $ and differentiate with respect to each of the component, but when solving these equations, it gets very complicated...
Does anyone has some quicker ways for solving this this problem and this type of problems?
Such problems can be solved explicitly (geometrically). Suppose that a check has been done that the line does not intersect the ellipse (this amounts to solving a quadratic for points of intersection, and will fail to find real roots here).
Use implicit differentiation to find the slope of tangents to the ellipse:
$$ \frac{x^2}{4} + y^2 = 1 $$
$$ \frac{x}{2} + 2y\frac{dy}{dx} = 0 $$
$$ \frac{dy}{dx} = \frac{-x}{4y} $$
The point of the ellipse closest to line $x + y = 4$ has a tangent parallel to the line (because the line segment connecting that point to the nearest point on the line is perpendicular to both the tangent and the line). But the slope of the line is easily $m=-1$.
Therefore we need to identify the two points on the ellipse where:
$$ \frac{-x}{4y} = -1 $$
$$ x = 4y $$
$$ \frac{(4y)^2}{4} + y^2 = 1 $$
$$ 5y^2 = 1,\; y = \frac{\pm\sqrt{5}}{5} $$
$$ (x,y) = \pm \left( \frac{4\sqrt{5}}{5}, \frac{\sqrt{5}}{5}\right) $$
and check which of these is the closest to the line (there is another artifact point on the "far side" of the ellipse, having the same slope tangent). The point of closest approach is clearly the one in the first quadrant (as one sees from the positive $x$- and $y$-intercepts of the line).
The actual distance from this point to the line is gotten by plugging it into the "normal form" of the line:
$$ d(x,y) = \left| \frac{x}{\sqrt{2}} + \frac{y}{\sqrt{2}} - \frac{4}{\sqrt{2}} \right| $$
$$ d\left( \frac{4\sqrt{5}}{5}, \frac{\sqrt{5}}{5}\right) = \left| \frac{\sqrt{5}}{\sqrt{2}} - \frac{4}{\sqrt{2}} \right| = \frac{4-\sqrt{5}}{\sqrt{2}} $$