Computing local and global minima on Wolfram Alpha

557 Views Asked by At

Consider $\sqrt{x^2+y^2}+2\sqrt{x^2+y^2-2x+1}+\sqrt{x^2+y^2-6x-8y+25}$. I need to find global or local minima of this function, but Wolfram Alpha doesn't seem to find one; the answer is that $1 + 2\sqrt{5}$ is its global minimum

Am I doing something wrong? I use this input for the global minimum, and this input for local minima.

2

There are 2 best solutions below

1
On

Using FindMinimum[Sqrt[x^2+y^2]+2Sqrt[x^2+y^2-2x+1]+Sqrt[x^2+y^2-6x-8y+25],{x,y}] locally, I found the following minimum solutions. The output includes the already mentioned solution $5.47214=1+2\sqrt{5}$ and concretely looks as follows:

$$\{5.47214,\{x\to 1,y\to -7.441589669722822*10^{-10}\}\}$$

Hope it helps you to proceed. The plot is:

enter image description here

And here is the plot of the curve given by $\sqrt{x^2-2 x+y^2+1}+\sqrt{x^2-6 x+y^2-8 y+25}+\sqrt{x^2+y^2}-z=0$:

enter image description here

The partial derivate of $2\sqrt{x^2-2 x+y^2+1}+\sqrt{x^2-6 x+y^2-8 y+25}+\sqrt{x^2+y^2}$ for $x$ is:

$\frac{x}{\sqrt{x^2+y^2}}+\frac{2 x-2}{\sqrt{x^2-2 x+y^2+1}}+\frac{2 x-6}{2 \sqrt{x^2-6 x+y^2-8 y+25}}$

with the following contour plot:

enter image description here

and its PDE for $y$ is given by:

$\frac{y}{\sqrt{x^2+y^2}}+\frac{2 y}{\sqrt{x^2-2 x+y^2+1}}+\frac{2 y-8}{2 \sqrt{x^2-6 x+y^2-8 y+25}}$

with the following contour plot:

enter image description here

And finally here is the intersection plot:

enter image description here

followed by the intersection plot where I removed the coefficient 2 in front of the square:

enter image description here

0
On

Thanks to a valuable help I am using from a German math community member (Matheboard HAL 9000), we can geometrically show that there is only one minimum:

Consider $f(x,y)=\sqrt{x^2+y^2}+2\sqrt{x^2+y^2-2x+1}+\sqrt{x^2+y^2-6x-8y+25}$. We want to find the global or local minima of this function.

The above function $f(x,y)$ specifies for a point $P(x,y)$ and for the three given points $A(0,0)$, $B(1,0)$ and $C(3,4)$ the sum $|AP|+2\cdot|BP|+|CP|$.

It applies that

  • According to the triangle inequality, we have $|AP|+|BP|\ge|AB|$, where the minimum $|AB|$ is reached exactly when $P$ lies on the line $AB$.
  • Analogously, we have $|BP|+|CP|\ge|BC|$, where we reach the minimum $|BC|$ exactly when $P$ is on $BC$.

If it is possible to find a point $P$ which minimizes both sums at the same time, then this point is consequently also a global minimum point of the total sum (if there are several such points, then there are also several global minimum points). In the present case there is exactly one such point, namely $P=B$. It is therefore the only global minimum point of $|AP|+2\cdot|BP|+|CP|$.

However, this is only the proof that there is exactly one global minimum.

To exclude that there are other local minimum points, then this can be done with similar arguments (triangle inequality). Namely, for every assumed local minimum point $P\ne B$, we can prove that the point $P'=(1-\epsilon)P+\epsilon B$ with $0<\epsilon<1$ on the line $PB$ leads to a smaller function value. Since this is also true for $\epsilon\rightarrow0$, one finds such a point $P'$ in every neighborhood of $P$, which contradicts the assumed property "local minimum point".

The point $P'$ is located on the line $PB$, which means that $|PB|=|PP'|+|P'B|$. According to triangle inequality we obtain:

$$ |AP|+2|BP|+|CP|=(|AP|+|PP'|)+2|BP'|+(|CP|+|PP'|)\ge|AP'|+2|BP'|+|CP'| $$

The equality case of this inequality is satisfied only if $A,P,P'$ lie in sequence on a straight line (which is equivalent to $P$ lies on $AB$) and analogously if $C,P,P'$ lie on a straight line (which is equivalent to $P$ lies on $BC$). Equality is thus only possible for $P=B$, which we had excluded here.

Hence $|AP|+2|BP|+|CP|>|AP'|+2|BP'|+|CP'|$ is the desired contradiction to the local minimum property of $P$.