Given a vertex with coordinates $\mathbf{x}_0\!=\!(x_0,y_0,z_0)$, I'd like to compute the coordinates of the nearest point to $\mathbf{x}_0$ on the paraboloid whose equation is
\begin{align} z = P(x,y) = c_0 + c_1x + c_2y + c_3xy + c_4x^2 + c_5y^2 \end{align}
How do I analytically minimise the squared-distance from the point to the surface? I'd prefer to not solve this numerically.
Hint: Perhaps you need to consider to minimize $$(x-x_0)^2+(y-y_0)^2 +z-z_0)^2,$$ subject to $$c_1x + c_2y + c_3xy + c_4x^2 + c_5y^2-z=-c_0.$$
For, ones takes the gradient of both relations and makes them proportional, that is $$[2(x-x_0),2(y-y_0),2(z-z_0)]=\lambda [c_1+c_3y+2c_4x,c_2+c_3x+2c_5y,-1]$$ from which you get three equations $$2(x-x_0)=\lambda (c_1+c_3y+2c_4x),$$ $$2(y-y_0)=\lambda (c_2+c_3x+2c_5y),$$ $$2(z-z_0)=-\lambda.$$
Now a strategy is to solve for $\lambda$ in each and from this, the resulting relations, will determine how $x,y,z$ dependent among them.
If this isn't enough to go through let me know.