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.