How to find the maximum value of this expression?

92 Views Asked by At

expression:$$\sum_{i=1}^{n-1} \frac{\sqrt{1+\cos(\theta_i)}}{\sqrt{2}} +\frac{\sqrt{1-\cos(\sum_{i=1}^{n-1}\theta_i)}}{\sqrt{2}}$$ I guess its maximum value is obtained when all $\theta_i=\pi/n$ are the same and the the max value is $n\cos(\frac{\pi}{2n})$.The partial derivatives is so complex that I can't analytically solve it.

3

There are 3 best solutions below

0
On

Here is an attempt at solving the problem using Lagrange multipliers. There is some angle $\theta_n$ such that $\sum_{i = 1}^n \theta_i = \pi$. Using this $\theta_n$, the problem becomes equivalent to maximizing: \begin{equation} f(\theta_1,\dots,\theta_n) := \sum_{i = 1}^n \frac{\sqrt{1 + \cos(\theta_i)}}{\sqrt{2}}, \end{equation} subject to the condition $g(\theta_1,\dots,\theta_n) := \sum_{i = 1}^n \theta_i = \pi$. For this one can use the method of Lagrange multipliers. So we calculate the partial derivatives: \begin{align} \frac{\partial f}{\partial \theta_j} & = \frac{-\sin(\theta_j)}{2\sqrt{2}\sqrt{1 + \cos(\theta_j)}} \\ \frac{\partial g}{\partial \theta_j} & = 1. \end{align}

Now we need to solve the following system of $n+1$ equations in $n+1$ unknowns ($\theta_1,\dots,\theta_n,\lambda$):

\begin{align} \lambda & = \frac{-\sin(\theta_j)}{2\sqrt{2}\sqrt{1 + \cos(\theta_j)}}, \quad j = 1,\dots, n \\ \pi & = \sum_{i = 1}^n \theta_i. \end{align}

Observe that $\theta \mapsto \frac{\sin(\theta)}{\sqrt{1 + \cos(\theta)}}$ is a bijection between $(-\pi,\pi)$ and $(-\sqrt{2},\sqrt{2})$. Hence WLOG, we may assume that $\theta_j = \theta^* = \theta + 2\pi m_j$ for integers $m_j$ and some fixed angle $\theta$. The last equation then becomes: \begin{equation} n\theta + 2\pi \sum_{i = 1}^n m_j = \pi \implies \theta = \pi/n + 2\pi N/n, \end{equation} for some integer $N$. Evaluate $f$ at these angles to get: \begin{equation} f(\theta^*,\dots,\theta^*) = \frac{n}{\sqrt{2}}\sqrt{1 + \cos(\pi/n + 2\pi N/n)}. \end{equation} But this is maximized when $N = 0$ (the argument is a close as possible to $2\pi m$, there are other possible choices of $N$ that maximize $f$) and in this case we have: \begin{equation} f(\pi/n,\dots, \pi/n) = \frac{n}{\sqrt{2}}\sqrt{1 + \cos(\pi/n)} = n\cos\left(\frac{\pi}{2n}\right), \end{equation} where we have used the double angle formula in the end, just like OP suspected. A remark is in order, the map $\theta \mapsto \sin(\theta)/\sqrt{1 + \cos(\theta)}$ is discontinuous at the points $\pi + 2\pi m$ for $m \in \mathbb{Z}$, so there might be some issues in justifying the use of Lagrange multipliers.

1
On

Hint.

Calling $\sum_{i=1}^{n-1}\theta_i = \phi_{n-1}$ we have

$$ \frac{d}{d\theta_i}\left(\sqrt{1+\cos(\theta_i)} +\sqrt{1-\cos(\phi_{n-1})}\right)=\frac 12\left(-\frac{\sin(\theta_i)}{\sqrt{1+\cos(\theta_i)}}+\frac{\sin(\phi_{n-1})}{\sqrt{1+\cos(\phi_{n-1})}}\right)=0 $$

so we have as a consequence for $i\ne j$

$$ \frac{\sin(\theta_i)}{\sqrt{1+\cos(\theta_i)}}=\frac{\sin(\theta_j)}{\sqrt{1+\cos(\theta_j)}} $$

as the stationary condition. So the maximum is obtained by solving

$$ \max_{\theta}\frac{n-1}{\sqrt{2}}\left(\sqrt{1+\cos(\theta)} +\sqrt{1-\cos((n-1)\theta)}\right) $$

or when

$$ \frac{\sin(\theta)}{\sqrt{1+\cos(\theta)}}=\frac{\sin((n-1)\theta)}{\sqrt{1+\cos((n-1)\theta)}} $$

0
On

We seek the maximum of $\displaystyle f(\theta_1,\ldots,\theta_{n-1})=\sum_{i=1}^{n-1} \frac{\sqrt{1+\cos(\theta_i)}}{\sqrt{2}} +\frac{\sqrt{1-\cos(\sum_{i=1}^{n-1}\theta_i)}}{\sqrt{2}}$ on $\mathbb R^{n-1}$. By $2\pi$-periodicity and parity, we can seek this maximum on $[0,\pi]^{n-1}$. Then, for $(\theta_1,\ldots,\theta_{n-1}) \in[0,\pi]^{n-1}$:

$f(\theta_1,\ldots,\theta_{n-1})=\displaystyle \sum_{i=1}^{n-1} \cos\dfrac{\theta_i}{2} + \left|\sin \dfrac{\sum_{i=1}^{n-1} \theta_i}{2}\right|$

Let $k\in\mathbb Z$ such that: $\ \ \displaystyle 2k\pi \leqslant \sum_{i=1}^{n-1} \theta_i \leqslant 2(k+1)\pi\ \ $

Let $\ \ \displaystyle \theta_n= (2k+1)\pi - \sum_{i=1}^{n-1}\theta_i \ \ $.

$\theta_n$ is in $[-\pi,\pi]$ and $\ \ f(\theta_1,\ldots,\theta_{n-1})=\displaystyle \sum_{i=1}^n \cos\dfrac{\theta_i}{2}$

By concavity of $\cos$ on $[-\frac{\pi}{2},\frac{\pi}{2}]$, we can write that:

$f(\theta_1,\ldots,\theta_{n-1}) \leqslant n \displaystyle \cos \dfrac{\sum_{i=1}^n \theta_i}{2} = n \cos \dfrac{(2k+1)\pi}{2n} \leqslant n \cos\dfrac{\pi}{2n}$

And: $\fbox{$\displaystyle\max_{(\theta_1,\ldots,\theta_{n-1})\in\mathbb R^{n-1}} f(\theta_1,\ldots,\theta_{n-1}) = f\left( \frac{\pi}{2n},\ldots,\frac{\pi}{2n}\right) = n\cos \dfrac{\pi}{2n}$}$