To find the greatest and least distances of a point on the ellipse $x^2+4y^2=4$ from the straight line $x+y=4$ How to use the method of Lagrange multipliers to find the greatest and least distances of a point on the ellipse $x^2+4y^2=4$ from the straight line $x+y=4$ ?

$$x+y=k$$
$$x^2+4y^2=(k-y)^2+4y^2=5y^2-2ky+k^2=4$$
$$5y^2-2ky+k^2-4=0$$
$$D=k^2-5(k^2-4)=20-4k^2\geq0$$
$$k^2\leq5$$
$$-\sqrt5\leq k\leq\sqrt5$$
$$x+y=4 \quad vs.\quad x+y=\sqrt5$$
$$\text{Distance between above two lines }=\frac{4-\sqrt5}{\sqrt2}=2\sqrt2-\frac{\sqrt10}{2}$$
