# Shortest distance of the point $(0,c)$ from the parabola $y=x^2$

Shortest distance of the point $(0,c)$ from the parabola $y=x^2$ ? (Where $0\le c \le5$)

My approach: I wrote the distance formula by taking parametric coordinates as $(t,t^2)$ and then differentiated the equation.I got the extremum as $x=\sqrt (c)$,but that's the wrong answer? I can't figure out my mistake.

• i think maximum is coming at t=0 Jul 10, 2015 at 6:16

Let $$f(t):=(t-0)^2+(t^2-c)^2$$. The necessary condition for the minimum of $$f$$ is $$\frac{d}{dt}\left\{(t-0)^2+(t^2-c)^2\right\}=2t+4t(t^2-c)=0,$$

which yields

$$t_1=0, t_{2,3}=\pm\sqrt{c-1/2}.$$

However, $$t_{2,3}$$ are real only for $$c\ge1/2$$. In addition, the second order condition shows that when $$c\ge 1/2$$, $$f(t_1)$$ is a local maximum. So, the minimum distance squared is $$c^2$$ when $$c<1/2$$ and $$c-1/4$$, otherwise.

I read somewhere that the vector from the point to the curve must be normal to the point of the curve which it is closest to. I think you should read "differential geometry" if you think this is exciting.

We can get tangents to $x^2$ by differentiation: it is the line passing through $(x,x^2)$ having slope $2x$. Then the normal will pass through the same point but have inverted slope: $-1/(2x)$. We can convince ourselves by calculating and see that $[1,2x] [1,-1/(2x)]^T = 0$, so they are orthogonal.

So rays shot out from the curves' normal needs to hit the point. We can reformulate this as rays with slope $-1/(2x_0)$ shot out from the point need to hit $(x_0,{x_0}^2)$. So

$$c - 1/(2x_0) x_0 = {x_0}^2 \Leftrightarrow$$ $$c - 1/2 = {x_0}^2$$ In the plot below, c is on the x-axis and y-value is distance. Blue is the minimum found by brute force in Octave and the red circles are the distances predicted by our formula.

The distance from $(0,c)$ to a point on $y=x^2$ is given by the distance formula $$\sqrt{(x-0)^2+(y-c)^2}=\sqrt{x^2+(x^2-c)^2}=\sqrt{x^4+(1-2c)x^2}$$

If we are interested in the shortest distance, it suffices to find the shortest distance of the square of this expression.

Let $$f(x)=x^4+(1-2c)x^2$$ $$f'(x)=4x^3+(2-4c)x$$ and $f'(x)=0$ when $4x^2=2-4c$ or $x=±\sqrt{\frac{1}{2}-c}$

One of these values will give the minimum of the distance; you can probably take it form here.

• There is a mistake in the second last step!
– user220382
Jul 10, 2015 at 6:32
• You are dropping a $c^2$ when rearranging inside the sqrt. Jul 10, 2015 at 7:47
• Indeed you forgot a $c^2$ in the last square root. That doesn't alter the result since you then differentiate and that constant vanishes. The argument of minimizing the radicand works fine, though you got the $f'(x)=0$ equality incorrectly rewritten. It should be $4x^2+2-4c=0$, implying $4x^2=4c-2$ and $x=\pm\sqrt{c-\frac12}$. Also, you are dropping the $x=0$ solution. Jul 10, 2015 at 8:14

Given is

$$y = x^2$$

So the normal for point $(x_o,x_o^2)$ can be written as

$$(x,y) = (x_o - 2\alpha x_o, x_o^2 + \alpha )$$

The length of the normal from point $(x_o,x_o^2)$ is given by

$$\ell = \alpha \sqrt{4 x_o^2 + 1}$$

We need to solve

$$(0,c) = (x_o - 2\alpha x_o, x_o^2 + \alpha )$$

or

$$\left[ \begin{array}{rcl} x_o - 2 \alpha x_o &=& 0\\ c &=& x_o^2 + \alpha \end{array} \right.$$

From

$$x_o - 2 \alpha x_o = 0$$

follows $x_o$ or $\alpha = \tfrac{1}{2}$.

# Case $x_o=0$

We obtain

$$\left[ \begin{array}{rcl} 0 &=& 0\\ c &=& \alpha \end{array} \right.$$

Thus $\alpha = c$ and $x_o=0$. So the length is given by

$$\ell = c$$

# Case $\alpha = \tfrac{1}{2}$

We obtain

$$\left[ \begin{array}{rcl} 0 &=& 0\\ c &=& x_o^2 + \frac{1}{2} \end{array} \right.$$

Thus $\alpha = \tfrac{1}{2}$ and $x_o = \sqrt{c - \tfrac{1}{2}}$. The case $c<\tfrac{1}{2}$ givens the $x_o=0$ solution.

The case $c \ge \frac{1}{2}$ gives the length

$$\ell = \sqrt { c^2 - \tfrac{1}{4} }$$

Note that $c \ge \sqrt{ c^2 - \tfrac{1}{4}}$ for $c \ge \frac{1}{2}$, so the shortest distance is given by

$$c \textrm{ for c \le \tfrac{1}{2}}$$

or

$$\sqrt{c^2 - \tfrac{1}{4}} \textrm{ for c \ge \tfrac{1}{2}}$$