distance to quadratic surface

*To*: mathgroup at smc.vnet.net*Subject*: [mg106922] distance to quadratic surface*From*: rych <rychphd at gmail.com>*Date*: Thu, 28 Jan 2010 02:44:59 -0500 (EST)

I'm trying to find a distance from a point {xi,yi,zi} to a quadratic surface g(x,y,). (With the intent to use the least squares to actually determine the best quadratic surface later) dist2[x_, y_, z_] = (x - xi)^2 + (y - yi)^2 + (z - zi)^2; g[x_, y_] = c0 + c1 x + c2 y + c3 x y + c4 x^2 + c5 y^2; dx = D[dist2[x, y, g[x, y]], x] dy = D[dist2[x, y, g[x, y]], y] Solve[{dx == 0, dy == 0}, {x, y}] Solve never comes back. Neither would Resolve. It's a system of cubic equations in x and y, is it not solvable? Thanks

**Follow-Ups**:**Re: distance to quadratic surface***From:*cire g <eric.phys@gmail.com>