4
$\begingroup$

Suppose a unit square $ABCD$. Where is point $P$, inside or on the square, such that $Q=PA\cdot PB\cdot PC\cdot PD$ is maximized?

I solved this numerically with a computer, and curiously and counterintuitively (after all, there's symmetry), the answer is not the middle of the square but rather the midpoint of any of the four edges (for the former $Q=\frac{1}{4}$ while for the latter $Q=\frac{5}{16}$).

Two questions arise: firstly, how does one solve this problem using calculus (without a computer), and secondly, is there a nice explanation for why the maximum does not occur at the center of the square?

  • 4
    This is a surprisingly interesting question. The log of your function, $\log q = \log\|P-A\| + \log\|P-B\| + \log\|P-C\| + \log\|P-D\|$, is a [harmonic function](https://en.wikipedia.org/wiki/Harmonic_function) and so has no local extrema; any minima or maxima must be attained at the boundary. An intuition for why the sum of logs is a harmonic function in 2D though, I don't know.2017-01-12
  • 0
    @Rahul since $\ln q$ is harmonic, it is a real part of some holomorphic function. Do you have a corresponding imaginary part at hand?2017-01-12
  • 0
    A more symmetric form of this problem would be to put vertexes of the square into points of the form $(\pm 1,\pm1)$. This trick does not give an immediate solution, but it somewhat simplifies algebraic manipulations.2017-01-12
  • 0
    @TZakrevskiy: Yes, the holomorphic function is simply the complex logarithm.2017-01-12
  • 0
    @Rahul In $\Bbb R^2$ the logarithm of distance to a point is always a harmonic function - it is easy to see that $\Delta \ln (x^2+y^2)=0$ for $(x,y)\ne (0,0)$. This is a well-known fact in PDE, which I somewhow forgot (must be the end of the day and lack of coffee=) ). Anyway, each term in your sum is harmonic.2017-01-12
  • 0
    @TZakrevskiy: I'm aware, but for some reason I was under the impression that the question was asking for an intuitive or obvious explanation of the fact. Looking at it again, I'm not so sure. You can post an answer if you like.2017-01-12

1 Answers 1

-1

Starting with the second question, I would intuitively put the point in the middle if I were to minimize the distance to all four vertices. Perhaps your intuition betrayed you?

Nonetheless, onto the first question:

Assume that the square's vertices are the points $(0,0), (1,0), (1,1), (0,1)$. Therefore a point $P = (x, y)$ inside the square has $0 \leq x \leq 1; 0 \leq y \leq 1$. Also, the distance of the point to the vertices can be found with the pythagorean theorem.

  • Distance to $(0, 0)$ is $\sqrt{x^2 + y^2}$;

  • Distance to $(1, 1)$ is $\sqrt{(1-x)^2 + (1-y)^2}$;

  • Distance to $(0, 1)$ is $\sqrt{x^2 + (1-y)^2}$;

  • Distance to $(1, 0)$ is $\sqrt{(1-x)^2 + y^2}$;

Thus you want to maximize the function

$$D(x, y) = \sqrt{x^2 + y^2}\cdot\sqrt{(1-x)^2 + (1-y)^2}\cdot\sqrt{x^2 + (1-y)^2}\cdot\sqrt{(1-x)^2 + y^2}$$

We can use derivatives to find all the candidate points for the maximum and then find it; If we derive $D$ and find the zeroes of its gradient, we see that its only zero is at $(\frac12, \frac12)$. We then check if it is a maximum, and we see it is not. Now, the square is limited and compact and our $D$ function is continuous, thus because of the Weierstrauss Theorem, $D$ must have a maximum on the square. If we could not find it with our test, it is because the function must be growing as we step away from the center; therefore the maximum occurs at the border of the square, in one edge.

Because of the symmetry of our function, one can understand that the values at the edges are the same, so the $4$ edges will have a point that maximizes the distance function. One can then use intuition to understand that the farther away from the two vertices of that edge, the better. If "intuition" is not good enough for you, one can then again use calculus. Let me know if you think it is needed.

  • 0
    How do you check that $(\frac12,\frac12)$ is not a maximum?2017-01-12
  • 0
    @Rahul you can either derive the distance function again, and check the sign of the second derivative or you can pick some point **inside** the square and compare the values.2017-01-12
  • 2
    The second derivative matrix is zero at $(\frac12,\frac12)$ so the sign doesn't tell you anything. If you are unlucky and pick the point $(0.6,0.6)$, the value of the function is smaller there.2017-01-12
  • 0
    @Rahul you are most right. I am going to give it a thought and come back later.2017-01-12