I am trying to use Lagrange multiplier method to find the minimum distance between a given point $P(h,k)$ and the given ellipse $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ occurs when the circle centered with $P$ touches the ellipse.
So my objective function is to minimize: $$f(x, y)=(x-h)^{2}+(y-k)^{2}$$ Subject to constraint: $$g(x,y)=\frac{x^2}{a^2}+\frac{y^2}{b^2}-1=0$$ We have: $$\begin{array}{l} \overrightarrow{\nabla f}=2(x-h) \hat{i}+2(y-k) \hat{j} \\ \overrightarrow{\nabla g}=\frac{2 x}{a^{2}} \hat{i}+\frac{2 y}{b^{2}} \hat{j} \end{array}$$ If $\lambda$ is the lagrange multiplier, we have: $$\begin{aligned} \overrightarrow{\nabla f} &=\lambda \overrightarrow{\nabla g} \\ \Rightarrow \quad \frac{a^{2}(x-h)}{x} &=\frac{b^{2}(y-k)}{y}=\lambda \end{aligned}$$ Now eliminating $\lambda$ is too tedious for me. Any way to solve here?