# Finding all local maximum points of a function?

Let ${\boldsymbol \theta}=(\theta_1,\theta_2,\ldots,\theta_n) \in{\mathbb T}^n$ and $P:{\mathbb T}^n\rightarrow {\mathbb R}$ be a function defined on $n$-torus as $$P({\boldsymbol \theta}) = \sum_{i<j}(1+\cos(\theta_i-\theta_j))^2.$$ What are local maximum points of $P$?

One can simply show that the global maximum is ${\boldsymbol \theta} = (\theta,\theta, \ldots,\theta)$ for all $\theta \in {\mathbb S}^1$, but the question is regarding the local maximum points of it.

• certainly, $x=(a,\dots,a)$ is a global maximum for any $a$, not only for $a=0$. Aug 18 '13 at 6:27
• @DimaPasechnik, Thanks! I have edited it. Aug 18 '13 at 6:59
• @TheoJohnson-Freyd This is a potential function originated from a research problem in theory of differential equation for a biological system! Aug 18 '13 at 18:22
• @TheoJohnson-Freyd Is it really that easy to explicitly locate all the local maxima? There are vaguely similar innocuous functions on higher tori where locating the minima could solve the notorious circulant Hadamard conjecture. I vote to re-open Aug 18 '13 at 19:38
• @YemonChoi: That's quite possible — I didn't try to answer the question myself. I keep firmly to a rule that I prefer questions that have motivation and background and so on, and I vote to "put on hold" questions that lack them. If OP includes some background and discussion into the question — what he's tried, what kind of answer he's looking for — then I'll join you in voting to reopen. Aug 19 '13 at 2:07

$$\frac{\partial P}{\partial x_k} = 2 \sum_i \sin(x_i-x_k)\left(1 + \cos(x_i-x_k)\right )$$ We know, local maximums satisfy the equality : $\nabla P({\rm x}) = {\rm 0}$
Some obvious solutions are $x_i - x_j = k\pi, k \in \mathbb Z$
• How can you solve this system of nonlinear equations? besides you need $D^2f({\rm x}) \ge 0$. I have tried these all! Aug 18 '13 at 9:08
• @MohammadKhosravi For the case when $n=3$ and if we set $x_1 = 1$ plotting the function using wolframalpha gives this. I think it could give some ideas to guess solutions. Aug 18 '13 at 9:26
• I have guessed the solutions numerically! but I can't prove it! The solution is ${\rm x}_i -{\rm x}_j = 0, \mod \pi$. Aug 18 '13 at 9:42
• @MohammadKhosravi Those solutions are obvious solutions of the gradient equation (since $\sin(x_i - x_j) = 0$). If you are sure that there aren't any other local maximum, so you've done! and what are you looking for? Aug 18 '13 at 10:09