Thread: 2 variable function optimization

1. 2 variable function optimization

f(x,y)=(x^2+y^2)^(1/2)+((a-x)^2+(b-y)^2)^(1/2)+((c-x)^2+y^2)^(1/2)
whats the minimum of this function in function of a,b,c parameters?
tried simple methods but none of them worked

2. Re: 2 variable function optimization

Originally Posted by erekette
f(x,y)=(x^2+y^2)^(1/2)+((a-x)^2+(b-y)^2)^(1/2)+((c-x)^2+y^2)^(1/2)
whats the minimum of this function in function of a,b,c parameters?
tried simple methods but none of them worked
If you put tex tags or dollar signs around your equation, it will display better:

$f(x,y)=(x^2+y^2)^{1/2}+((a-x)^2+(b-y)^2)^{1/2}+((c-x)^2+y^2)^{1/2}$

3. Re: 2 variable function optimization

My recommendation would be to take partial derivatives with respect to $x$ and $y$:

$f_x = \dfrac{x}{\sqrt{x^2+y^2}} + \dfrac{x-a}{\sqrt{(a-x)^2+(b-y)^2}} + \dfrac{x-c}{\sqrt{(c-x)^2+y^2}}$

$f_y = \dfrac{y}{\sqrt{x^2+y^2}} + \dfrac{y-b}{\sqrt{(a-x)^2 + (b-y)^2}} + \dfrac{y}{\sqrt{(c-x)^2+y^2}}$

Set each equal to zero and solve. This will give you the minimums along each axis. This does not guarantee that these will equate to a local minima for the function in general. I do not remember what criteria there was for determining if minimizing the partial derivatives would suffice for minimizing the whole function. It has been years since I studied multivariate analysis, so I only dimly recall that this method does not always produce actual minima.

4. Re: 2 variable function optimization

What "simple methods" did you try? The usual is to set the partial derivatives equal to 0.
The derivative of f with respect to x is $\displaystyle x(x^2+ y^2)^{-1/2}- (a- x)((a- x)^2+ (b- y)^2)^{-1/2}- (c- x)((c- x)^2+y^2)^{-1/2}= 0$
and the derivative with respect to y is $\displaystyle b(x^2+ y^2)^{-1/2}- (a- y)((a- x)^2+ (b- y)^2)^{-1/2}+ y((c- x)^2+y^2)^{-1/2}= 0$

5. Re: 2 variable function optimization

Actually, we might be able to do a little better. The first term is minimized at $(0,0)$. The second term is minimized at $(a,b)$. The third term is minimized at $(c,0)$. My guess would be the whole function is minimized at the center of the triangle created by the three points. My guess is that you can prove this is a minimum using the triangle inequality a bunch of times?

So, I would venture the guess that the minimum occurs at: $\left(\dfrac{a+c}{3},\dfrac{b}{3}\right)$

6. Re: 2 variable function optimization

I've tried the partial differentiation method but i found these equations too hard to solve, I wonder if theres any method which would give us the local minimum(s) of this function.

7. Re: 2 variable function optimization

SlipEternal's second response, written more than two hours before your last post, suggests a method.

8. Re: 2 variable function optimization

I'm looking for a more generalized method, which does not require presumtions, instead straight leads us to a solution.

9. Re: 2 variable function optimization

Originally Posted by erekette
I'm looking for a more generalized method, which does not require presumtions, instead straight leads us to a solution.
Lol, I gave you a general method that does not require presumptions. You just don't want to do any work to prove it. Like I said, I bet it is easily proven with a few applications of the Triangle Inequality that the point I found is the location of the absolute minimum. That is as general a method as there is. I just used a little geometric intuition.

10. Re: 2 variable function optimization

"My guess would be "
You presumed the result then you proving that it's correct, but i asked a solution which does not involve any presumptions.

11. Re: 2 variable function optimization

In geometry, the Fermat point of a triangle, also called the Torricelli point or Fermat–Torricelli point, is a point such that the total distance from the three vertices of the triangle to the point is the minimum possible.[1] It is so named because this problem is first raised by Fermat in a private letter to Evangelista Torricelli, who solved it.

From "Wikipedia"

12. Re: 2 variable function optimization

Originally Posted by erekette
"My guess would be "
You presumed the result then you proving that it's correct, but i asked a solution which does not involve any presumptions.
You have rejected two methods of solution, and decided that my 22 years of mathematical study was a "presumption". I'm done trying to help. Good luck!

13. Re: 2 variable function optimization

Originally Posted by erekette
Dude, this math forum was not made for your mental breakdowns, please make sure that your anwsers are related to the question I asked.
You clearly need more help than can be given through a math help forum. If you don't understand how my answer related to the question asked, then you need a LOT more help than we can provide.

$\sqrt{x^2+y^2}$ is the Euclidean distance from the point $(0,0)$ to the point $(x,y)$.
$\sqrt{(a-x)^2+(b-y)^2}$ is the Euclidean distance from the point $(a,b)$ to the point $(x,y)$.
$\sqrt{(c-x)^2+y^2}$ is the Euclidean distance from the point $(c,0)$ to the point $(x,y)$.

Three coplanar points create a triangle. If they are collinear, a line. Regardless, as HallsofIvy pointed out, Fermat and Torricelli proved that the point you are looking for is the exact point that gives the shortest total distance to the three vertices of the triangle. You are just too lazy to look it up. We literally did your homework for you, and all you can do is complain.

14. Re: 2 variable function optimization

OP has been provided guidance to solve the problem ... take it or leave it.

Thread closed.