Closest point in $y = \sqrt{x}$ to the origin is at $x=-1/2$? When I solve for the point in $y = \sqrt{x}$ closest to the origin using calculus, I get $x = -1/2$. And this is the case for ALL functions $y = \sqrt{x + c}$ using the distance formula $d^2 = x^2 + y^2$.
Why is it that the extreme point is somewhere the function is not even defined? Obviously (at least to me), isn't the closest point to the origin (0, 0)?
EDIT:
Solution:
We want the nearest distance from the origin to some point P in the function $y = \sqrt{x}$. We can use $d^2 = (x2 - x1)^2 + (y2 - y1)^2$ as the optimization function with the constraint that the other point (say, (x2, y2)) be on the curve $y = \sqrt{x}$. We set the other point, say (x1, y1), to the origin and be (0, 0).
When you put them all together, you get $d^2 = (x - 0)^2 + (\sqrt{x} - 0)^2 = x^2 + x$. You get the derivative of that and set it to zero to optimize. $d(d^2)/dx = 2x + 1 = 0$ and so $x = -1/2$.
My question is why is this the case? Is there a way to end up with x = 0 using calculus? Without necessarily JUST looking at the graph.
 A: I'm assuming you're saying that each point can be written as $(x, \sqrt{x})$ and hence the square of the distance from the origin is $d^2=x^2+(\sqrt{x})^2=x^2+x$ which is a parabola with a minimum at $x=-\frac{1}{2}$. The problem with this is that you are neglecting the domain of the function. The original function can not take negative x-values and similarly the square of the distance can't be negative. So you have to solve for the minimum distance subject to these constraints and the solution (as should be intuitively obvious) is then the point $(0,0)$
A: The reason your method doesn't work is because if you allow $x$ to be negative, then $y$ is allowed to be complex, and the distance to the origin  is no longer $x^2+y^2$, it is $x^2+|y|^2$. In this case then the distance to the origin is $x^2+|x|$, and since $x^2+|x|\ge 0$, the minimum distance is $0$ when $x=0$.
A: The square of the distance from the origin is as follows:
$$d^2=x^2+y^2$$
$$d^2=x^2+x$$
$$\frac{d}{dx}(x^2+x)=2x+1$$
In optimizing this, make sure you're considering all the critical points, including the endpoints of the domain (in this case $x=0$), not just the points where the derivative equals $0$.
