Finding points of a function's graph that are closest to a given point A question from my calculus book states,

Which points on the graph  $y=4-x^2$ are the closest to the point (0,2)?

Using some of my notes, I have a formula  as follows (not sure what it's actually called):
$$d=\sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}$$
So I plugged in $(0,2)$ as my $x_1/y_1$ values:
$$d=\sqrt{(x_2-0)^2 + (y_2-2)^2}$$
$$d^2 = (x-0)^2 + (y-2)^2$$
I know $y=4-x^2$ so I plug it in:
$$d^2 = (x-0)^2 + ((4-x^2)-2)^2$$ 
$$F(x) = (x-0)^2 + (2-x^2)^2$$
Finding the derivative using the chain rule I get:
$$F'(x) = 2(x-0)(1) + 2(2-x^2)(-1)$$
$$0 = 2(x-0)- 2(2-x^2)$$
$$0 = 2x-0-4+2x^2$$
$$0 = 2x^2+2x-4$$
Thus I have a polynomial, so I tried using the quadratic equation to solve for $[x]$ and ended up with $$x=(-2 + 6)/(4) | x=(-2 - 6)/(4)$$, so $x=1/x=-2$?
Can someone help me out with what I'm missing or doing wrong in trying to find the points of the graph to point $(0,2)$?
 A: This is a classic optimization problem where you are trying to minimize the distance from the point $(0, 2)$. Given the function $$f(x) = 4 - x^2$$, we can represent all of the points on that curve as, $(x, 4 - x^2)$. Now, we can use the distance formula: $$d = \sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$$. When we plug in $(x, 4 - x^2)$ and $(0, 2)$ for $(x_1, y_1)$ and $(x_2, y_2)$, respectively, we obtain, $$d = \sqrt{x^4-3x^2+4}$$ We want to minimize the distance function, so we should find when the derivative is equal to $0$. Since the square root will always increase with the inside function, we can disregard the square root and call $$f(x)=x^4-3x^2+4$$. Taking the derivative yields $$f'(x)=4x^3-6x$$ Which when factored is $$f'(x)=2x(2x^2-3)$$. We can see that the critical numbers of the function $f(x)$ are $x = 0$ and $x = \pm\sqrt{\frac{3}{2}}$ Applying the first derivative test shows that $x = \pm\sqrt{\frac{3}{2}}$ are minimums. Therefore the points that are a minimum distance from $(0, 2)$ and are on $y=4-x^2$ are $(\sqrt{\frac{3}{2}}, \frac{5}{2})$ and $(-\sqrt{\frac{3}{2}}, \frac{5}{2})$.
A: That formula is just called the "Distance formula", or sometimes the "Euclidean distance formula". It is just an application of the Pythagorean theorem.
Your problem is here:

$$F'(x) = 2(x-0)(1) + 2(2-x^2)(-1)$$

(But first of all, surely you know $x - 0 = x$. Why did you keep that $-\ 0$ around?)
The chain rule applied to the second term of $F(x)$ is:
$$\frac{d(2-x^2)^2}{dx} = \frac{d(u^2)}{du}\frac{du}{dx}$$ where $u = 2 - x^2$
$$\frac{d(u^2)}{du} = 2u$$
$$\frac{du}{dx}= \frac{d}{dx}(2 - x^2) = 0-2x=-2x$$
Therefore
$$\frac{d(2-x^2)^2}{dx} = 2u(-2x)= -4ux = -4(2 - x^2)x$$
So $$F'(x) = 2x -4x(2 - x^2)$$
A: If A=(0,2), and B=(a,b) a point of y=4-x^2, then AB is minimum when vector AB is normal to curve. dy/dx=-2a => m=1/2a, but (b-2)/a=1/2a => b=5/2.
