I need to find $P(x,y)$ such that sum of squares of distance to points $A(3,4), B(20,8), C(4,24)$ is minimized. So I had a general expression of distance,
$D_\alpha = \sqrt{(x_\alpha - x_P)^2 + (y_\alpha - y_P)^2}$
Then the sum is:
$S = D^2_A + D^2_B + D^2_C$ $= (x_A - x_P)^2 + (y_A - y_P)^2 + (x_B - x_P)^2 + (y_B - y_P)^2 + (x_C - x_P)^2 + (y_C - y_P)^2$
Now it becomes a 8 variable function? Is it correct?
If so to find the critical points I need $S_{x_A}, S_{y_A}, S_{x_B}, S_{y_B}, S_{x_C}, S_{y_C}, S_{x_P}, S_{y_P}$
Or is there an easier way?