Closest Point on a Parabola to a Point Formula for X-Coordinate

44 Views Asked by At

I'm trying to find a formula for the x-coordinate of a point on the parabola $y = -x^2-1$ that is closest to a point (x,y). Of course I can find the y-coordinate, so that's why I'm only worrying about the x-coordinate. I have no idea where to start except something about perpendicular lines to the tangent at a point? Can someone explain the solution and give me a formula?

2

There are 2 best solutions below

2
On BEST ANSWER

There's a way with the distance formula, and another with tangent lines.

The slope of the tangent line to $y=-x^2-1$ at any point $(x_1,y_1)$ on the parabola is given by $-2x_1$.

The perpendicular slope would then be $\displaystyle -\frac{1}{2x_1}$.

We can write the perpendicular line, using point-slope, as $\displaystyle y-y_1=-\frac{1}{2x_1}(x-x_1)$.

This point $(x,y)$ has to be on this line.

Now, just plug in $(x,y)$.

Then, plug in $y_1 = -x_1^2-1$ to find the closest point on the parabola.


Now, let's use this method to find a function $z(x,y)=x_1$ that computes the x-coordinate of the closest point.

We have $\displaystyle y+x_1^2+1=-\frac{1}{2x_1}(x-x_1)$.

We need to solve for $x_1$.

We have $y+x_1^2+1=-\displaystyle\frac{x}{2x_1}+\frac{1}{2}$.

Multiply by $2x_1$ on both sides to get:

$2x_1^3+2yx_1+2x_1+x-x_1=0$

$2x_1^3+x_1(2y+1)+x=0$.

This is a cubic equation and there's no clean way to solve it.

0
On

You can approach the problem using Lagrange multipliers.

Let $(a,b)$ to be the coordinates of the point. So, you need to minimize $$F=(x-a)^2+(y-b)^2+\lambda(y+x^2+1)$$ Compute the partial derivatives $$F'_x=2 (x-a)+2 \lambda x \qquad F'_y=2 (y-b)+\lambda \qquad F'_\lambda=y+x^2+1$$ Setting them equal to $0$, we then have $$\color{blue} {x=\frac{a}{\lambda +1}\qquad\qquad y=\frac{1}{2} (2 b-\lambda )}$$ Plugging in $F'_\lambda$ and simplifying, $$\frac{a^2}{(\lambda +1)^2}+\frac{1}{2} (2 b-\lambda )+1=0 \implies -2 \left(a^2+b+1\right)-(4 b+3) \lambda -2 b \lambda ^2+\lambda ^3=0$$ which, again is a cubic equation for which $$\Delta=-4 a^2 \left(27 a^2+2 (2 b+3)^3\right)\qquad p=-\frac{1}{3} (2 b+3)^2\qquad q=-\frac{2}{27} \left(27 a^2+(2 b+3)^3\right)$$

Let us assume that $\Delta < 0$; this would give for the real solution $$\color{blue} {\lambda=\frac{2 b}{3}+\frac{2}{3} (2 b+3) \cosh \left(\frac{1}{3} \cosh ^{-1}\left(\frac{27 a^2+(2 b+3)^3}{(2 b+3)^3}\right)\right)}$$ and then $(x,y)$.

Trying with $a=5$ and $b=8$, this would give $$x=\frac{15}{19+38 \cosh \left(\frac{1}{3} \cosh ^{-1}\left(\frac{7534}{6859}\right)\right)}\approx 0.26128$$ $$y=\frac{1}{3} \left(16-19 \cosh \left(\frac{1}{3} \cosh ^{-1}\left(\frac{7534}{6859}\right)\right)\right)\approx -1.06827$$