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.