6

I want to find the maximum (or a relatively tight upper bound on the maximum) of $$\sum_{i = 1}^n \Big(\arccos(x_i) - \arccos(y_i)\Big)$$ subject to the constraint that $x_1 + \dots + x_n = y_1 + \dots + y_n$ (of course $x_i, y_i \in [-1, 1], \forall i$).

From simulations, it seems like a maximum occurs at $$(x_1, \dots, x_n) = \left(-1, -1, \dots, -1, \frac{n-1}{n+1}\right) \qquad \text{and} \qquad (y_1, \dots, y_n) = \left(-\frac{n-1}{n+1}, \dots, -\frac{n-1}{n+1}\right)$$ for small $n$, but I'm not sure if this remains true as $n$ grows.

River Li
  • 49,125
EMV
  • 311
  • 1
  • 5
  • 1
    Presumably $(x_1, \dots, x_n) = \left(\frac{n-1}{n+1}, \dots, \frac{n-1}{n+1}\right)$ and $(y_1, \dots, y_n) = \left(1, 1, \dots, 1, -\frac{n-1}{n+1}\right)$ works just as well. – Henry Jan 23 '25 at 22:43
  • 2
    When $n = 8$, the maximum does not occur at $$(x_1, \cdots, x_8) = (-1, -1, \cdots, -1, 7/9), \quad (y_1, \cdots, y_8) = (-7/9, \cdots, -7/9),$$ since we have strictly larger objective value at $$(x_1, \cdots, x_8) = (-1, -1, \cdots, -1, 3/5, 3/5), \quad (y_1, \cdots, y_8) = (-3/5, \cdots, -3/5).$$ – River Li Jan 25 '25 at 01:27

2 Answers2

7

Some thoughts.

Using $-\arccos u = \arccos(-u) - \pi$ on $[-1, 1]$, we have $$\sum_{i = 1}^n \Big(\arccos(x_i) - \arccos(y_i)\Big) = -n\pi + \sum_{i=1}^n \Big(\arccos(x_i) + \arccos( -y_i)\Big).$$ Thus, equivalently we turn to find the maximum of $$-n\pi + \sum_{i=1}^{2n} \arccos z_i$$ subject to $z_i\in [-1, 1], \forall i$ and $\sum_{i=1}^{2n} z_i = 0$.

Let $f(u) := \arccos u$. Note that $f(u)$ is convex on $[-1, 0]$, and concave on $[0, 1]$.

To proceed, we need the following auxiliary result. For more details, see Bin Zhao's half concave half convex theorem. Also, see my answer here.

Theorem 1. Let $a, b, c$ be fixed reals ($a < c < b$), and let $x_1, x_2, \cdots, x_n \in [a, b]$ ($n\ge 2$) with $x_1 + x_2 + \cdots + x_n = S$ (constant). Let $f$ be a continuous function on $[a, b]$, convex on $[a, c]$ and concave on $[c, b]$. Then $f(x_1) + f(x_2) + \cdots + f(x_n)$ is maximal for $x_1 = \cdots = x_{k-1} = a$ and $x_{k+1} = \cdots = x_n$ for some $k \in \{1, 2, \cdots, n\}$.

By Theorem 1 ($a=-1, c = 0, b = 1$), $-n\pi + \sum_{i=1}^{2n} \arccos z_i$ is maximal for $z_1 = \cdots = z_{k-1} = -1$, and $z_k \in [-1, 1]$, and $z_{k+1} = \cdots = z_{2n} = \frac{k - 1 - z_k}{2n - k} \in [-1, 1]$ for some $k \in \{1, 2, \cdots, n+1\}$. Moreover, if $k = n + 1$, then from $\frac{k - 1 - z_k}{2n - k}\in [-1, 1]$, we have $z_k = 1$, $z_{k+1} = \cdots = z_{2n} = 1$, and $-n\pi + \sum_{i=1}^{2n} \arccos z_i = 0$. Thus, we can assume that $k \in \{1, 2, \cdots, n\}$.

Thus, equivalently we turn to solve $$\max_{z \in [-1, 1],\, 1 \le k \le n} \left[-n\pi + (k-1)\pi + \arccos z + (2n-k)\arccos \frac{k - 1 - z}{2n - k}\right]. \tag{1}$$ Let $$F(z) := -n\pi + (k-1)\pi + \arccos z + (2n-k)\arccos \frac{k - 1 - z}{2n - k}.$$ We have $$F'(z) = 0, \quad z \in (-1, 1) \implies z \in \left\{ - \frac{k-1}{2n - 1 - k},\quad \frac{k-1}{2n+1-k}\right\}. \tag{2}$$ Furthermore, we have $$F(-1) - F\left(- \frac{k-1}{2n - 1 - k}\right) $$ $$= (2n-k)\arccos\frac{k}{2n-k} - (2n-1-k)\arccos\frac{k-1}{2n-1-k} \ge 0, \tag{3}$$ and $$F\left(\frac{k-1}{2n+1-k}\right) - F(1) $$ $$ = (2n+1-k)\arccos\frac{k-1}{2n+1-k} - (2n-k)\arccos\frac{k-2}{2n-k}\ge 0. \tag{4}$$

Using (2)-(4), (1) is equivalent to $$\max_{1 \le k \le n, \, z = -1, \frac{k-1}{2n+1-k}} \left[-n\pi + (k-1)\pi + \arccos z + (2n-k)\arccos \frac{k - 1 - z}{2n - k}\right],$$ which is further equivalent to $$\max_{0 \le k \le n} \left[-n\pi + k\pi + (2n-k)\arccos \frac{k}{2n - k}\right]. \tag{5}$$

Remark. From (5), $-n\pi + \sum_{i=1}^{2n} \arccos z_i$ is maximal for $z_1 = \cdots = z_k = -1,\, z_{k+1} = \cdots = z_{2n} = \frac{k}{2n-k}$ for some $k \in \{0, 1, \cdots, n\}$. Back to the original problem, the maximizer is the form of $(x_1, \cdots, x_n) = (-1, \cdots, -1, c, \cdots, c)$ and $(y_1, \cdots, y_n) = (-c, \cdots, -c)$ for some $c\in (0,1)$.

When $n=8$, the maximizer is $(x_1, \cdots, x_8) = (-1, -1, \cdots, -1, 3/5, 3/5), \quad (y_1, \cdots, y_8) = (-3/5, \cdots, -3/5)$.

River Li
  • 49,125
3

Not an answer, just a start: The optimization problem can be simplified to the minimization of the following sum: $$\begin{align} &k\cdot \arccos x + (n-k)\cdot \arccos -x \\-&(k'\cdot \arccos y + (n-1-k')\cdot \arccos -y) \\- &\arccos ( (2k-n)x -( 2k-n)y) \end{align}$$ with $k\in\{0,...,n\}$ and no restrictions on $x$ and $y$.

This can be somewhat simplified using $\arccos x + \arccos -x = \pi$.


Substitute $y_n\leftarrow x_1 + \dots + x_n -( y_1 + \dots + y_{n-1})$ into $$ \sum_{i = 1}^n \arccos(x_i) - \arccos(y_i).\tag1 $$ Then $$ \frac{d}{dx_i} (1) = 0 \\\Leftrightarrow \\ -\frac1{\sqrt{1-x_i^2}} +\frac1{\sqrt{1-(x_1 + \dots + x_n -( y_1 + \dots + y_{n-1}))^2}}=0 \\\Rightarrow \\ \frac1{{1-x_i^2}} = +\frac1{{1-(x_1 + \dots + x_n -( y_1 + \dots + y_{n-1}))^2}} \\\Leftrightarrow \\ {{x_i^2}} = +{{(x_1 + \dots + x_n -( y_1 + \dots + y_{n-1}))^2}} \\\Leftrightarrow \\ \pm{{x_i}} = \pm{{(x_1 + \dots + x_n -( y_1 + \dots + y_{n-1}))}} $$

Now summing $\left(\frac{d}{dx_i} (1) = 0\right)+\left(\frac{d}{dx_j} (1) = 0\right)$ or $\left(\frac{d}{dx_i} (1) = 0\right)-\left(\frac{d}{dx_j} (1) = 0\right)$ gives you $x_i = \pm x_j$

Similarly we get (here for $i,j\neq n$) $y_i = \pm y_j$.

So (1) can be simplified to $$\begin{align} &k\cdot \arccos x + (n-k)\cdot \arccos -x \\-&(k'\cdot \arccos y + (n-1-k')\cdot \arccos -y) \\- &\arccos ( (2k-n)x -( 2k-n)y) \end{align}$$

Because $\arccos x + \arccos -x = \pi$ this can be further simplified to, where $m_x:=\min (k,n-k), m_y:=\min (k',n-1-k')$. This devolves into a lot of case work, so I threw it at a CAS, and obtained the following 4 extremal cases: $$ [2·k - n = 0, x =- y·\frac{n - 2·k}{2·k - n - 1}, x =-y·\frac {n - 2·k}{2·k - n + 1} = 0, x = 0 ∧ y = 0] $$

ConnFus
  • 1,387