Given a point $P:(x_0,y_0)$ in $\mathbb{R}^2$, and a constraint function $$x^2+y^2=R^2$$where $R$ is the radius of the circle. The distance from $P$ to any point on the circle is to be minimized using the method of Lagrange Multiplier. The distance $d$ is given by $$d(x,y)=\sqrt{(x-x_0)^2+(y-y_0)^2}.$$ Then the Lagrange function becomes $$\mathcal{L}(x,y,\lambda)=d(x,y)+\lambda\ (x^2+y^2-R^2)$$ with the optimality conditions $\partial_x\mathcal{L}=0$, $\partial_y\mathcal{L}=0$ and $\partial_\lambda\mathcal{L}=0$. These conditions yield: $$\left[(x-x_0)^2+(y-y_0)^2\right]^{-\frac{1}{2}}(x-x_0)+2\ \lambda\ x=0$$ $$\left[(x-x_0)^2+(y-y_0)^2\right]^{-\frac{1}{2}}(y-y_0)+2\ \lambda\ y=0$$ $$x^2+y^2-R^2=0$$ How should I continue from this point?
HINT:
As $d(x,y)\ge 0, d(x,y)$ will be minimum if $d^2(x,y)$ is minimum
So, start with $$\mathcal{L}(x,y,\lambda)=d^2(x,y)+\lambda\ (x^2+y^2-R^2)=(x-x_0)^2+(y-y_0)^2+\lambda\ (x^2+y^2-R^2)$$
Accepting @lab's hint, the Lagrange function can be rewritten as $$\mathcal{L}(x,y,\lambda)=d^2(x,y)+\lambda\ (x^2+y^2-R^2)=(x-x_0)^2+(y-y_0)^2+\lambda\ (x^2+y^2-R^2)$$ Then the optimality conditions would become $$\partial_x\mathcal{L}=2(x-x_0)+2x\lambda=0,\ \partial_y\mathcal{L}=2(y-y_0)+2y\lambda=0$$ $$\partial_\lambda\mathcal{L}=x^2+y^2-R^2=0$$ The first two conditions yield $$x=\cfrac{x_0}{1+\lambda},\ y=\cfrac{y_0}{1+\lambda}\tag{1}$$ These can be substituted in the third condition to obtain $$\cfrac{x_0^2+y_0^2}{(1+\lambda)^2}=R^2$$ Solving for $\lambda$ yields $$\lambda=\left[\cfrac{x_0^2+y_0^2}{R^2}\right]^{\frac{1}{2}}-1$$ $\lambda$ can be substituted in Equation 1 to obtain $$(x,y)=\left(x_0 \left[\cfrac{x_0^2+y_0^2}{R^2}\right]^{\frac{-1}{2}},\, y_0 \left[\cfrac{x_0^2+y_0^2}{R^2}\right]^{\frac{-1}{2}}\right)$$ This point represents the point closest to $P$ and the minimum distance can be found by using the original function $$d(x,y)=\sqrt{(x-x_0)^2+(y-y_0)^2}.$$
-
$\begingroup$ $\lambda$ have "-" value also. you need to verify them to show it is the minimum. In fact, the two solutions are min and max. If you think geometrically, it is a line through $x_0,y_0$ and $O$ which create two points. $\endgroup$ – chenbai May 29 '13 at 13:47
$\left[(x-x_0)^2+(y-y_0)^2\right]^{-\frac{1}{2}}(x-x_0)=-2\ \lambda\ x$
$\left[(x-x_0)^2+(y-y_0)^2\right]^{-\frac{1}{2}}(y-y_0)=-2\ \lambda\ y$
$\dfrac{x}{x-x_0}=\dfrac{y}{y-y_0}=-\dfrac{1}{2\lambda}\left[(x-x_0)^2+(y-y_0)^2\right] \to x(y-y_0)=y(x-x_0) \to xy_0=yx_0 \to x^2=\dfrac{(x_0R)^2}{x_0^2+y_0^2}$ ,$ y^2=\dfrac{(y_0R)^2}{x_0^2+y_0^2}$