If $A+B+C+D+E = 540^\circ$ what is $\min (\cos A+\cos B+\cos C+\cos D+\cos E)$? Let each of $A, B, C, D, E$ be an angle that is less than $180^\circ$ and is greater than $0^\circ$. Note that each angle can be neither $0^\circ$ nor $180^\circ$.
If $A+B+C+D+E = 540^\circ,$ what is the minimum of the following function? $$\cos A+\cos B+\cos C+\cos D+\cos E$$
I suspect the minimum is achieved when $A=B=C=D=E$, but I can't prove it. I need your help.
 A: ${\bf 1\ }$ For the moment a configuration $a=(\alpha_1,\alpha_2,\ldots,,\alpha_5)$ of angles $\alpha_i$ is admissible when
$$0\leq\alpha_1\leq\alpha_2\leq\alpha_3\leq\alpha_4\leq\alpha_5\leq\pi,\qquad
\sum_{i=1}^5\alpha_i=3\pi\ .$$
Let $Q$ be the compact set of admissible configurations $a$, and put
$$\Phi(a):=\sum_{i=1}^5\cos\alpha_i\quad(a\in Q)\ ,\qquad \mu:=\min_{a\in Q}\Phi(a)\ .$$
When $\Phi(a)=\mu$ then $a$ is called an optimal configuration.
${\bf 2\ }$ Let $a\in Q$ be an optimal configuration. Then
$$0\leq\alpha_1\leq\ldots\leq\alpha_r<{\pi\over2}\leq \alpha_{r+1}\leq\ldots\leq\alpha_5\leq\pi$$
for some $r\geq0$. Since the function $\cos$ is properly convex in the interval $\bigl[{\pi\over2},\pi\bigr]$ it follows from Jensen's inequality that $$\alpha_{r+1}=\ldots=\alpha_5=\alpha\tag{1}$$ for a certain $\alpha\in\bigl[{\pi\over2},\pi\bigr]$. We then have
$$3\pi=\alpha_1+\ldots+\alpha_r+(5-r)\alpha<r{\pi\over2}+(5-r)\alpha=(5-r)\left(\alpha-{\pi\over2}\right)+5{\pi\over2}\ ,$$
or
$$(5-r)\left(\alpha-{\pi\over2}\right)>{\pi\over2}\ .$$
It follows that $r\leq3$ (whence $r+2\leq5$) and that $\alpha>{\pi\over2}$.
${\bf 3\ }$ Let $a\in Q$ still be optimal and assume that $0<\alpha_i\leq\alpha_j<\pi$ for two entries $\alpha_i$, $\alpha_j$. Then one would have
$${d\over d\epsilon}\bigl(\cos(\alpha_i+\epsilon)+\cos(\alpha_j-\epsilon)\bigr)\biggr|_{\epsilon=0}=0\ ,$$
or $\sin\alpha_i=\sin\alpha_j\>$. This implies that all $\alpha_i\notin\{0,\pi\}$ have the same sine.
${\bf 4\ }$ We first consider the case ${\pi\over2}<\alpha<\pi$. I claim that $\sin\alpha_r=\sin\alpha$ is impossible. Proof: We then would have $\cos\alpha_r=-\cos\alpha$ and could replace $\alpha_r$, $\alpha_{r+1}$ by $$\alpha_r'=\alpha_{r+1}':={\pi\over2}\quad <\alpha=\alpha_{r+2}$$ and still have $\Phi(a')=\mu$. This would contradict property $(1)$ of optimal configurations.
It follows that $\alpha_1=\ldots=\alpha_r=0$. This leaves us with the following configurations:
$$\eqalign{&r=0:\quad a=({3\pi\over5},{3\pi\over5},{3\pi\over5},{3\pi\over5},{3\pi\over5}), \quad \Phi(a)=5\cos{3\pi\over5}\doteq-1.54508,\cr
&r=1:\quad a=(0,{3\pi\over4},{3\pi\over4},{3\pi\over4},{3\pi\over4}), \quad \Phi(a)=1+4\cos{3\pi\over4}\doteq-1.82843.\cr}$$
It is easily checked that $r=2$ and $r=3$ are impossible in this case.
${\bf 5\ }$ When $\alpha=\pi$ then necessarily $r=2$ or $r=3$. The case $r=2$ enforces the configuration
$$a=(0,0,\pi,\pi,\pi),\quad \Phi(a)=-1\ ,$$
and the case $r=3$ together with $\alpha_r<{\pi\over2}$ enforces the configuration
$$a=({\pi\over3},{\pi\over3},{\pi\over3},\pi,\pi),\quad \Phi(a)=-{1\over2}\ .$$
${\bf 6\ }$ Comparing the obtained data we conclude that
$$\mu=\Phi\bigl(0,{3\pi\over4},{3\pi\over4},{3\pi\over4},{3\pi\over4}\bigr)=1-2\sqrt{2}\doteq-1.82843\ .$$
In the  formulation of the problem by the OP angles $\alpha_i\in\{0,\pi\}$ are forbidden. It follows from our analysis that the function $\Phi$ assumes no minimum on $Q_{\rm OP}$. All we can say is that
$$\inf\nolimits_{a\in Q_{\rm OP}}\Phi(a)=1-2\sqrt{2}\ .$$
A: What you're looking at is a constrained optimization problem. 
Put another way, you are being asked to minimize $\cos A+\cos B+\cos C+\cos D+\cos E$ given the constraint $A+B+C+D+E=540$. 
Using lagrange multipliers, we can rewrite this as the minimization of the function
$L(A,B,C,D,E,\lambda)=\cos A+\cos B+\cos C+\cos D+\cos E+\lambda(540-A-B-C-D-E)$
To minimize the function, you want to set each partial derivative of L ($\frac{\partial L}{\partial A},\frac{\partial L}{\partial B},...,\frac{\partial L}{\partial \lambda})$ to zero. This should get you the value for $\lambda$ as well as values for each angle. 
With that I think you can take the last step.
A: We can argue using the  notion of compacity and continuity of the $\cos$ function that the minimum exists and attained.
Suppose that the minimum is given by the angles $A,B,C,D$ and $E$. Now WLG suppose that $A>B$ and take from $B$ an arbitrary small (angle) $\epsilon$   and add it to $A$, we have
$$\cos(A+\epsilon)+\cos(B-\epsilon)=\cos(A)\cos(\epsilon)+\cos(B)\cos(\epsilon)+\sin(B)\sin(\epsilon)-\sin(A)\sin(\epsilon)$$
and using the approximation $\cos(\epsilon)\approx 1$ and $\sin(\epsilon)\approx \epsilon$ we have
$$\cos(A+\epsilon)+\cos(B-\epsilon)\approx \cos(A)+\cos(B)+\underbrace{\epsilon(\sin(B)-\sin(A))}_{<0}$$
hence we find a contradiction since the minimum is attained at $A,B,C,D$ and $E$.
Remarks


*

*The case $A>B$ and $\sin(A)\leq \sin(B)$ is not a problem in the reasoning because in this case we take $\epsilon$ from $A$ and add it to $B$.

*This reasoning is clearly valid if $ B \neq 0$ or $ A \neq180 $ and these few cases  should be treated separately.

A: Ugly Partial Solution
Note first that by Jensen Inequality, if $x_1,..,x_k$ are angles in $[90^o, 180^o]$ then 
$$\cos(\frac{x_1+...+x_k}{k}) \leq \frac{\cos(x_1)+..+\cos(x_k)}{k}$$
This proves that the absolute minimum (which exists as Sami proved) is attained at a point where all the obtuse angles are equal.
We split now the problem in few cases:
Case 1: All $5$ angles are $\geq 90^o$. Then by Jensen
$$\cos(A)+\cos(B)+\cos(C)+\cos(D)+\cos(E) \geq 5 \cos(108^o) \sim -1.545 \,.$$
Case 2:  Exactly $4$ angles are $\geq 90^o$. Without loss of generality $A =x <90^o$. Then by Jensen
$$\cos(A)+\cos(B)+\cos(C)+\cos(D)+\cos(E) \geq \cos(A)+ 4 \cos(\frac{B+C+D+E}{4}) $$
$$= \cos(x)+4 \cos(\frac{540^o-x}{4})\,.$$
Now, the only Critical number of $f(x)=\cos(x)+4 \cos(\frac{540^o-x}{4})$ on $[0^o,90^o]$ is $60^o$.
So the absolute minimum of $\cos(x)+4 \cos(\frac{540^o-x}{4})$ is one of $\cos(60^o)+4 \cos(120^o) \,;\, \cos(90^o)+4 \cos(112.5^o)  \,;\, \cos(0^o)+4 \cos(135^o)$.
Then
$$\cos(A)+\cos(B)+\cos(C)+\cos(D)+\cos(E) \geq 1+4 \cos(135^o) \sim -1.828$$
It is easy to show (using the Jensen for the acute angles) that $3$ or more acute angles lead to higher minimum, so the only case left to study is :
Case 3:  Exactly $3$ angles are $\geq 90^o$. Without loss of generality $A =x <90^o$ and $B =y <90^0. Then by Jensen
$$\cos(A)+\cos(B)+\cos(C)+\cos(D)+\cos(E) \geq \cos(A)+ \cos(B)+ 3 \cos(\frac{C+D+E}{4}) $$
$$= \cos(x)+\cos(y)+3 \cos(\frac{540^o-x-y}{3})\,.$$
The minimum of this function on $[0^o,90^o] \times [0^o,90^o]$ can be calculated with multivariable calculus. Yikes.
A: What the differentiation-based arguments in other answers are really proving is that

extrema (on the allowed domain plus its boundary) can occur only at points where a set of $k$ of the sines of the angles are equal, and the other set of $(5 - k)$ sines are zero (from points on the boundary), for some value of $k$ between $0$ and $5$.  

Five equal sines ($k = 5$) happen at permutations of 
$f(108,108,108,108,108)= 5 \cos 108 = -1.545... 0$ (from Ron Gordon's comment)  
$f(120,120,120,120,60)= 4 \cos 120 + \cos 60 = 3 \cos 120 = -3/2 $  
$f(180,180,180,0,0)=-1$
Four equal sines ($k=4$)
$f(135,135,135,135,0) = -2\sqrt{2}+1 = -1.8...$ (from N.S.' comment)
$f(90,90,90,90,180) = -1$
$f(x,x,180-x,180-x,180) = -1$
I stopped here, but it does not look like $k \leq 3$ can do better than $-\frac{3}{2}$. If that is true, then the result is 

any value slightly higher than $a = -2\sqrt{2}+1$ occurs at $(4u,135-u,135-u,135-u,135-u)$ for a small positive $u$, and no value $\leq a$ is attained.

