From: rych on
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


From: cire g on
Hello,
I have the similar problem in finding an analytical solutions of a cone
intersection a line, two cones intersecting, and three cones intersecting.
best regards,
eric

rych wrote:
> 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
>
>
>
>