# Finding the least positive integer such that $\sum \cos{\theta_{i}} \leq \gamma$

Let $n \in \mathbb{N}$. How to find the least positive integer $\gamma$ such that $$\sum\limits_{i=1}^{n} \cos{\theta_i} \leq \gamma$$ provided $$\prod\limits_{i=1}^{n} \tan{\theta_i} = 2^{\frac{n}{2}}$$ for any $\theta_i \in (0,\frac{\pi}{2})$, $i=1, 2, \ldots, n$?

I had trouble solving this problem, some time ago. If I am not mistaken, I had seen this in Loney's trigonometry book. (Although I don't remember it correctly!).

-

Try this. Find the maximum of $$\sum_{k=1}^n \frac{1}{\sqrt{1+{x_k}^2}},$$ where $\prod_{k=1}^n {x_k}^2=2^n,$ and $x_k = \tan\theta_k$, using Lagrange multipliers. Each $x_k$ satisfies the same equation involving the multiplier $\lambda,$ $$\lambda 2^{n+1} = \frac{{x_k}^2}{(1+{x_k}^2)^{3/2}}.$$ And so all the $x_k$ are equal and hence $x_k = \sqrt{2}.$ Therefore the maximum value of our sum is $n/\sqrt{3}$ and so the required smallest integer is $$\lceil \frac{n}{\sqrt{3}} \rceil.$$
I am not sure if this is right. For $i = 1 \dots n-1$ pick $\theta_{i}$ such that $\cos \theta_{i} > 1 - 1/n$. Pick $\theta_{n}$ so that the constraint is satisfied. We also have $\cos \theta_{n} > 0$. For these $\theta_{i}$, $\sum \cos \theta_{i}$ is at least $n-2$ –  Aryabhata Sep 8 '10 at 21:38
I think that with a modification of Aryabhata's argument, namely taking $\cos\theta_i>1-\epsilon$, we can show that the sum can be bigger than $n-1-(n-1)\epsilon$. The sum also has to be smaller or equal to $n$. So there really are only two possible candidates for $\gamma$. –  Raskolnikov Dec 25 '11 at 13:52
When $n=2$, I found that $\gamma=2$. The maximal value for $\cos\theta_1+\cos\theta_2$ is around 1.1547. However, for $n>2$, I don't seem to find examples for now with a value over $n-1$. –  Raskolnikov Dec 25 '11 at 14:59