Deriving the Minimum of a Summation Function - How Do I Do It?

rider-pt
Messages
2
Reaction score
0
Hello,

Could you help me derive this function, so I can find the minimum of it.

z=\sum_{i=1}^{n}{\sqrt{\left( x-x_{i} \right)^{2}+\left( y-y_{i} \right)^{2}}}

Thank you.
 
Physics news on Phys.org
This looks like homework. We help you do your own homework; we do not do it for you.

You need to show some work before someone will help you.
 
It is not homework. It is just some curiosity of mine.

What I want to do is find the point (x,y), that has the smallest sum of distances to a series of points (x_{1},y_{1}), (x_{2},y_{2}), (x_{3},y_{3}), ...,(x_{n},y_{n}). Something like a centre of gravity.

I don't need just the result, I would like to see the path to it.

Thank you.
 
Welcome to Physics Forums.
rider-pt said:
It is not homework. It is just some curiosity of mine.
Thanks for the clarification, it makes a difference in how we approach helping you. There are designated homework subforums (not this one however) that some new members ignore.

First, realize that there is not necessarily a unique solution to this. Consider a set of just 2 points. Any point on the line segment joining them will have the same sum-of-distances.

That being said, you would take the partial derivatives of z with respect to both x and y, set each equal to zero, and solve the two equations you get.
 

Similar threads

Back
Top