Find the point on the graph of $f (x) = \sqrt x$ closest to the point $(3,0)$ $(x,y)=(x,\sqrt{x})$ 
$d=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$
$=\sqrt{x^4-5x^2+9}$
$g(x)=x^4-5x^2+9$ , $g'(x)=4x^3-10x=0$ $: x=0, x=+-\sqrt{10}/2$
The question is: Should I put those x-values in g(x) or the orginal graph,$ 
 y=\sqrt{x}$. To me, it's logical to put it into g(x), but in an example it was reverse
 A: I feel an issue shared by many students: to apply algorithms without really understanding what they are doing. What is the question? The question is locate a point such that$\ldots$. So the answer is a point, i.e. a couple of coordinates. $f(x)$ is defined only on $[0,+\infty]$, so the answer is given by $(x_0,\sqrt{x_0})$ where $x_0$ is the positive abscissa you have found by solving the minimization problem.
Did you find it correctly? Let us see. The squared distance of $(x_0,\sqrt{x_0})$ from $(3,0)$ is $(x_0-3)^2+x_0 = \left(x_0-\frac{5}{2}\right)^2+\frac{11}{4}$, so the positive abscissa solving the minimization problem is $x_0=\frac{5}{2}$ and the wanted point is $\color{red}{\left(\frac{5}{2},\sqrt{\frac{5}{2}}\right)}$. The minimum distance is $\sqrt{\frac{11}{4}}=\frac{1}{2}\sqrt{11}$ and we don't even need derivatives, it is enough to complete a square.
A: You want to minimize the function
$$
f(x)=\|(x,\sqrt{x})-(3,0)\|^2=\|(x-3,\sqrt{x})\|^2=(x-3)^2+(\sqrt{x})^2=x^2-5x+9
$$
The function $f$ reaches its minimum value at 
$$
h=-\dfrac{-5}{2(1)}=\dfrac{5}{2}
$$
and the minimum value is
$$
k=f(h)=\dfrac{11}{4}
$$
Hence the point of $y=\sqrt{x}$ closest to the point $(3,0)$ is the point
$\left(\dfrac{5}{2},\sqrt{\dfrac{5}{2}}\right)$, and its distance to the point $(3,0)$ is $\sqrt{k}=\dfrac{\sqrt{11}}{2}$.
A: An alternative way is the use of derivative. At any point $(a,\sqrt{a})$, the value of the derivative is $\frac{1}{2\sqrt{a}}$ and so its perpendicular value at that point would be $-2\sqrt{a}$ The perpendicular line follows $y-\sqrt{a}=-2\sqrt{a}(x-a)$ and we want this point to pass through $(3,0)$ so substitute this into the equation: $0-\sqrt{a}=-6\sqrt{a}+2a\sqrt{a}$ which simplifies to $5\sqrt{a}=2a\sqrt{a}$. Squaring and solving leads to $a=5/2$ from where...
