I have had an answer which differentiates the function and equates it to zero.
But why?
How does the differential bring us to find the "closest" point on a function to another point?
I thought that maybe because it was to the origin we are taking away the general point of the function from the origin (0,0) and then differentiating this to find the minimum but that doesn't work when you do the algebra?
This question is in the middle of finding the closest point on the line $y= x+1$ to the origin by the way