Why does a distance and its square reach their minimum at the same point? There is a question in my calculus textbook that asks to find a point on the parabola $y^2 = 2x$ that is closest to point $(1,4)$.
They want us to first use the distance formula, but then proceeded to square it leaving us with $d^2 = (y^2/2 - 1)^2 + (y-4)^2$.
I am following the math up to this point, where I get lost is when the textbook states "You should convince yourself that the minimum of $d^2$ occurs at the same point as the minimum of $d$, but $d^2$ is easier to work with".
I don't understand how that can be true at all, $d$ is a distance between a fixed point and another point on the graph $y^2 = 2x$. $d^2$ must be that distance scaled by itself, how can the minimum be the same then? I've worked out the math for $d$ and $d^2$ and I do get the same point but I don't understand why.
 A: This isn't a rigorous explanation, but one that will hopefully intuitively make sense. 
Suppose that you are minimizing the distance between some curve $f(x)$ and a point $(x_0,y_0)$. We might not know what that minimum distance is, but we know that it is some value $d$, where $d\in\mathbb{R}$. Since we are assuming that $d$ is the minimum value, we know that all other points on $f(x)$ will be further away from $(x_0,y_0)$ and thus their distances from the point will be $d+\epsilon$, where $\epsilon\in\mathbb{R^+}$. 
Now we will compare our minimum distance $d$ with the other distances $d+\epsilon$ by squaring each. 
$$d^2=d^2$$
$$(d+\epsilon)^2=d^2+2d\epsilon+\epsilon^2$$
Since $\epsilon$ is a positive value, we can say for certain that $d^2<d^2+2d\epsilon+\epsilon^2$, and therefore working with the square of the distance will still result in finding the minimum distance. 
A: Suppose I have two boxes, one with $M>0$ dollars, one with $N>0$ dollars. I don't tell you what $M$ and $N$ are, but only that $M^2 > N^2$. Which box has more money? The box with $M$ dollars, because when comparing two positive numbers, it suffices to compare their squares. The one with the larger square is larger. 
A: Distances are positive real numbers. $f(x) = x^2$ is strictly increasing on the set of all positive real numbers. So $d_1 \le d_2 $ if and only if $d_1^2 \le d_2^2$.
Using derivatives.
Suppose $d(x) = \sqrt{f(x)}$.
If $d(x_0) = 0$ for some $x_0$, then we know that a minimum is at $x_0$.
So, from here on, we can assume that $d(x) > 0$ for all $x$.
computing directly, we get
\begin{align}
    d'(x) &= 0 \\
    \dfrac{f'(x)}{2\sqrt{f(x)}} &= 0 \\
   \dfrac{f'(x)}{2d(x)} &= 0 \\
   f'(x) &= 0
\end{align}
Or, if we do it this way:
\begin{align}
    (d^2(x))' &= 0 \\
    f'(x) &= 0
\end{align}
So, either way, you end up solving $f'(x) = 0$
A: If you want to figure out which of $\sqrt{2}$ and $\sqrt{3}$ is the smallest, you can do this simply by comparing $2$ and $3$ instead. More generally, if you want to make a square root as small as possible, you can do this by making what's under the square root as small as possible.
A: In this case: you want  distance between $\;(x,2x)\;,\;\;(1,4)\;$
$$\begin{cases}d(x)=\sqrt{(x-1)^2+(2x-4)^2}\implies d'(x)=\frac{(x-1)+2(2x-4)}{\sqrt{(x-1)^2+(2x-4)^2}}\\{}\\d^2(x)=(x-1)^2+(2x-4)^2\implies (d^2)'(x)=2\left[(x-1)+2(2x-4)\right]\end{cases}$$
Can you see now that searching for the point where the derivative vanishes is the same in both cases?!
Thus
$$(d^2)'(x)=0\iff5x=9\iff x=\frac95...\text{etc.}$$
A: This has nothing to do with derivatives, nor epsilons; it's pure logic.
If you have a function $f:\>P\to{\mathbb R}_{\geq0}$ defined on some set $P$ (like a parabola in the plane) and a strictly  increasing function ${\rm sqr}:\>{\mathbb R}_{\geq0}\to{\mathbb R}_{\geq0}$ then the function $$g:={\rm sqr}\circ f:\quad P\to{\mathbb R}_{\geq0},\qquad x\mapsto{\rm sqr}\bigl(f(x)\bigr)$$ satisfies
$$g(x)>g(y)\quad\Leftrightarrow\quad f(x)>f(y)\qquad\qquad\forall x,\>y\in P\ .$$
It follows that the functions $f$ and $g$ take their extrema at the same points of $P$.
A: The first thing you should notice is that a distance is a positive number.
Suppose the minimum distance is $d_{\text{min}}$. The statement means that any other distance $d$ is larger that $d_{\text{min}}$:
$$d\geq d_{\text{min}}.$$
As distances are positive, the squares are ordered in the same way
$$d^2\geq d_{\text{min}}^2.$$
You can convince yourself by remarking that the area of a square grows when the size of the square grows. This proves the statement. 
A: Simply put,
$$ \frac{d(y^2)}{dx}  = 2 y  \frac{dy}{dx}  = 0 $$
and
$$ \frac{d y}{dx}  = 0 $$
have the same latter condition to be fulfilled to find an  extremum.
And that goes for any square function of x !! 
A: Sometimes a picture's worth a thousand words.

But as it has been pointed out, some words may also be useful.
The blue plot is the distance function.
It may seem redundant, but when two points are distant from $\;x\;$, their distance is $\;x\;$. 
So here, $\;d\;$ is the distance function, and $\;d(x) = x\;$. 
The green plot is the distance squared (when two points are distant from $\;x\;$, their distance squared is $\;d(x)² = x²\;$).
We see that whatever range for the distance, within that range, the distance squared always takes its minimum at the same point as the distance.
A: If you only care about the locations of minima and maxima, the derivative chain rule can make this easier. Say you have a function $f(x)$ that you want to maximize/minimize. In your case, this would be the distance formula $d = \sqrt{\Delta x^2 + \Delta y^2}$. Very often, there is another function that considerably simplifies the derivative. Call that function $g(x)$. In this case, $g(x) = x^2$. I will show the result for general functions $f$ and $g$ since it is not always the case that squaring a function makes it simpler.
Now, let's see how the extrema of $g(f(x))$ compares with $f(x)$.
$$\frac{d}{dx}g(f(x)) = \frac{dg}{df} \frac{df}{dx} = 0$$
So, the derivative of $g(f(x))$ has the same zeros as $f(x)$ as long as the derivative of $g(x)$ meets one of two conditions:


*

*It is non-zero everywhere in the relevant range of $x$, or

*It is equal to zero only when $df/dx$ is also equal to zero.


Now we need to check that the second derivative of $g(f(x))$ has the same sign as the second derivative of $f(x)$ so that the minimas and maximas aren't switched.
$$\frac{d^2}{dx^2}g(f(x)) = \frac{d}{dx}\left(\frac{dg}{df} \frac{df}{dx}\right) = \frac{dg}{df} \frac{d^2f}{dx^2} + \frac{df}{dx} \frac{d}{dx}\left[\frac{dg}{df}\right]$$
$df/dx$ is zero at the extrema, so the second derivative is
$$\frac{dg}{df} \frac{d^2f}{dx^2}$$
If the derivative of $g(x)$ is strictly positive over the range of x we are examining, then the second derivative will have the same sign.
For your problem, $g(x) = x^2$, which has a strictly positive first derivative except at $x = 0$. But, the minimum possible distance in any situation is zero, so the exception doesn't add any new extrema. We can conclude that any point that minimizes the squared distance will also minimize the distance.
A: If $x \ge 0$ and $y \ge 0$ then $x \le y \iff x^2 \le y^2$.  
So as distances are greater or equal to 0, a distance is smaller or equal to another if and only its square is smaller or equal to the other's square.  
So as $\min distance$ (in terms of $x$) is the smallest possible value, it will occur at the same $x$ where the $\min distance^2$, the smallest possible value of the squares, occurs.
That's all there is to it.
A: There is a term called monotonic.  A monotonic function doesn't change direction -- as its input grows, it either never-shrinks or never-grows.
A "strictly monotonic" function is a monotonic function that never stays the same -- it always either grows or shrinks.
On the positive real numbers, squaring is a strictly increasing monotonic function.
There are a number of ways to know this.  One of them is that the derivative of $x^2$ is always greater than zero on every positive real.
If you have any strictly increasing monotonic function $f$ on some domain containing $x$ and $y$, then comparing $f(x)$ with $f(y)$ is the same as comparing $x$ with $y$ with $\lt$.
We can prove this quickly:
If $y \gt x$, then $\delta = y-x \gt 0$.  Thus $f(y) = f(y-x+x) = f(x+\delta)$.  As $\delta \gt 0$, as $f$ is strictly monotonically increasing, $f(x+\delta) \gt f(x)$ by the definition of strictly monotonically increasing.  A similar argument holds if $y \lt x$.
All that remains to show is that either $x^2$ is strictly monotonically increasing on the non-negative reals, or that a continuous function with a strictly positive derivative on the interior of a continguous interval is strictly monotonically increasing.
The second implies the first, and can be covered in a solid first year calculus class.  If I remember rightly, use the greatest lower bound property of the reals on the set of elements $L_x := \{y | y > x\} \cup \{y | f(y)<f(x)\}$ then derive a contradiction based on the limit definition of the derivative.
A: I think you are mixing up two things. The value/point $(x,y)$ for which the $d(x,y)$ and $d²(x,y)$ are minimal and the actual value of $d$ and $d²$ for $(x_{min},y_{min})$. The value for  which d and $d^2$ are minimal is the same, as distance is always positive $d>0$ hence multiplying it with $d$ will result in $d^2>0$ Both expressions are equivalent in this chase with respect of minimum and maximum. But the values $d²$ and $d$ are obviously different.
A: Put simply - If $d$ is increasing then $d^2$ is increasing. If $d$ is decreasing  then $d^2$ is decreasing. Therefore the maximum point of  $d$ must coincide with the maximum point of $d^2$. In a formal sense one might have to have d defined on a compact set so that the maximum existed.
A: I believe answers do explain it intuitively, I will just note down a slightly different way;

Let $h(x)$ be strictly increasing. Then $f(x)$ and $h(f(x))$ has the local extremas at the same point.

$$
(h(f(x)))' = h'(f(x))f'(x)
$$
and strictly increasing means $h'>0$. Therefore, $f'=0$ or DNE hold true iff with $(h(f))'=0$ or DNE. Moreover, sign of $f'$ has to be the same for $(h(f))'$. This concludes they have critical points at the same points and classifications do coincide.
