Find the point on an ellipse closest to given points

2.3k Views Asked by At

I want to find the points on ellipse $\frac{x^2}{4} + y^2 = r^2$ that are nearest to $(1,0)$.Where r is given value. I am not getting right answer with Lagrange technique, I tried $g(x,y) = \sqrt[]{(x-1)^2+(y-0)^2}$ and I tried to compute the equation for $f(x,y)$ and $g(x,y)$ by taking derivate and solved for stationary points but I get wrong answer. Is this the correct approach?

$\lambda(2x -2) = \frac{x}{2}$ 1st equation, $\lambda(2y) = 2y$ second equation, where I get $\lambda $ from first equation equals to $\lambda = \frac{x}{(4x-4)}$ and second equation $\lambda = \frac{2y}{2y}$ (here is something wrong, I don't know what I do wrong) so I cross multiply them by setting both lambdas equal $\frac{x}{(x-4)} = 2y/2y$(which is 1) :( then solve for value $x$ and that value I put in $\frac{x^2}{4} + y^2 = r^2$.

2

There are 2 best solutions below

2
On BEST ANSWER

You almost had it. To recap: you want to minimize $g(x,y) = (x-1)^2 + y^2$ subject to the constraint that $\frac{x^2}{4}+ y^2 = r^2$. I used the square of the distance function because it has extrema at the same points, but is easier to differentiate.

The Lagrange multiplier equations are: \begin{align*} \frac{1}{2} x &= 2\lambda(x-1) \tag{1}\\ 2y &= 2\lambda y \tag{2} \\ \frac{x^2}{4} + y^2 &= r^2 \tag{3} \end{align*}

Equation (2) has two possible solutions. It might be better to write it as $$ 0 = 2y - 2\lambda y = 2y(1-\lambda) $$ Now you can see that either $\lambda = 1$ (which you discovered) or $y=0$ (which you forgot). We take each case at a time.

Suppose $\lambda = 1$. Then (1) becomes $$ \frac{1}{2}x=2x-2 \implies x = 4x-4 \implies 4=3x \implies x = \frac{4}{3} $$ Substituting this into (3) gives $$ \frac{1}{4}\left(\frac{16}{9}\right) + y^2 = r^2 \implies \frac{4}{9} + y^2 = r^2 \implies y = \pm\sqrt{r^2-\frac{4}{9}} $$ As Jean-Marie pointed out, this is a solution only if $r > \frac{3}{4}$. The critical value is $$ f\left(\frac{4}{3},\pm\sqrt{r^2-\frac{4}{9}}\right) = \left(\frac{1}{3}\right)^2 + r^2 - \frac{4}{9} = r^2-\frac{1}{3} $$

Now suppose $y=0$. Then $x=\pm 2r$ by (3). The critical values are $f(2r,0) = (2r-1)^2$ and $f(-2r,0) = (2r+1)^2$. Notice that if $(2r-1)^2 < (2r+1)^2$ for any $r > 0$.

If $r < \frac{3}{4}$, then we only have the two critical points $(\pm 2r,0)$. The closer is $(2r,0)$, and the further is $(-2r,0)$.

If $r > \frac{3}{4}$, We have to compare $(2r-1)^2$ and $r^2-\frac{1}{3}$. But $$ (2r-1)^2 - \left(r^2 - \frac{1}{3}\right) = 3r^2 -4r + \frac{4}{3} = 3\left(r-\frac{2}{3}\right)^2 $$ which is positive. So the two points off the $x$-axis are closer than $(2r,0)$.

1
On

(see figure below)

Let us give the name $A$ to point $(1,0)$. It is clear that the symmetry of the ellipse with respect to the axes permit to restrict our search for solution(s) $C(x_C,y_C)$ to the first quadrant (with, in a final step, a consideration of symmetry to give a second solution).

Let $I(2r,0)$ the intersection point of the ellipse with the positive $x$ axis.

A first distinction must be made :

  • either $r \leq 1/2$: in this case, $A$ is outside or on the ellipse. It is evident in this case that the closest point is $C=I$.

  • or $r>1/2$: $A$ is inside the ellipse. This is the case that we will work now on.

Consider the coordinates of the generic point $X$ of the ellipse:

$$\tag{1}\cases{x=2r \cos(t)\\ y=r \sin(t)}$$

(classical parametric representation of an ellipse)

Let us consider the square of distance $AM$:

$$f(t):=(x-1)^2+y^2=(2r \cos(t)-1)^2+(r \sin(t))^2$$

The value(s) of $t$ for which $f$ has an extrema (or a stationary point) are such that

$$f'(t)=2(2r \cos(t)-1)(-2r \sin(t))+2r \sin(t)\cos(t)=$$

$\tag{2}-2r\sin(t)(4r\cos(t)-2-\cos(t))$ is equal to $0$.

Thus,

  • either $\sin(t)=0$, which corresponds to a point of the ellipse situated on the $x$-axis, otherwise said $I$: we will come back to this case later,

  • or to a point $C=(x_C,y_C)$ with $y_C>0$, case that we consider now:

$$\tag{3}4r\cos(t)-2-\cos(t) \ \ \iff \ \ \cos(t)=\dfrac{2}{4r-1}$$

Plugging (3) into the first equation of (1), the abscissa of $C$ is

$$\tag{4}x_C=\frac{4r}{4r-1}.$$

Plugging (4) into the cartesian equation of the upper part of the ellipse, we get:

$$y_C=\sqrt{r^2-\dfrac{x^2}{4}}=\sqrt{r^2-\dfrac{4r^2}{(4r - 1)^2}}$$

Now, we come back to the other candidate for the minimization which is point $I$.

Which is the closest point to $A$: $C$ or $I$? We have to test for that if $AC^2>AI^2$.

A rather easy analysis (that we will not do here) shows that $AC^2>AI^2$ happens when $1/2<r<3/4$.

As a conclusion, the coordinates of the closest point to point $(1,0)$ are

$\begin{cases}\text{If} \ r<3/4 & x=1, y=0\\ \text{If} \ r>3/4 & x=\frac{4r}{4r-1}, \ \ y=\sqrt{r^2-\dfrac{4r^2}{(4r - 1)^2}}\end{cases}$

On the figure below, the locus of point $C$ for $r>3/4$ has been materialized.

enter image description here