There are many optimization problems in which the variables are symmetric in the objective and the constraints; i.e., you can swap any two variables, and the problem remains the same. Let's call such problems *symmetric optimization problems.* The optimal solution for a symmetric optimization problem - like many of the ones that show up in calculus texts - frequently has all variables equal. To take some simple examples,


* The rectangle with fixed area that minimizes perimeter is a square. (Minimize $2x+2y$ subject to $xy = A$ and $x,y \geq 0$.)
* The rectangle with fixed perimeter that maximizes area is a square. (Maximize $xy$ subject to $2x + 2y = P$ and $x,y \geq 0$.)
* The difference between the arithmetic mean and the geometric mean of a set of numbers is minimized (and equals $0$) when all the numbers are equal.


There are also more complicated symmetric optimization problems for which the variables are equal at optimality, such as the one in [this recent math.SE question](https://math.stackexchange.com/questions/27468/finding-a-lower-bound-of-a-function).


However, it is not true that every symmetric optimization problem has all variables equal at optimality. For example, the problem of minimizing $x +y$ subject to $x^2 + y^2 \geq 1$ and $x, y \geq 0$ has $(0,1)$ and $(1,0)$ as the optimal solutions.



> 
> Does anyone know of general conditions on a symmetric optimization problem that guarantee the optimal solution has all variables equal? 
> 
> 
> 


The existence of such conditions might be very nice. Unless the conditions themselves are ugly, they ought to vastly simplify solving a large class of symmetric optimization problems.


(Maybe convexity plays a role? My last example has a nonconvex feasible region.)



When does symmetry in an optimization problem imply that all variables are equal at optimality?
The Monthly article "[Do symmetric problems have symmetric solutions?](http://www.maa.org/programs/maa-awards/writing-awards/do-symmetric-problems-have-symmetric-solutions)" by William Waterhouse discusses this issue. For global optimality one really needs strong global constraints on the objective function, such as convexity (as in Igor's answer), and there's nothing one can say otherwise. However, local results hold in considerably greater generality. Waterhouse calls this the Purkiss Principle: in a symmetric optimization problem, symmetric points tend to be either local maxima or local minima.


Specifically, suppose we are optimizing a smooth function $f$ on a manifold $M$. The symmetry can be expressed by saying some finite group $G$ acts on $M$ and preserves $f$. If $x$ is a point in $M$ that is fixed by $G$, we would like to understand the behavior of $f$ near $x$. To analyze it, we can study the action of $G$ on the tangent space $T\_x M$. The key hypothesis is that $T\_x M$ should be a nontrivial irreducible representation of $G$. In that case, $x$ is automatically a critical point for $f$, and if it is a nondegenerate critical point, then it must be a local maximum or minimum (i.e., not a saddle point). In fact, even more is true: the Hessian matrix will have only one eigenvalue, which is either zero (degenerate), positive (local minimum), or negative (local maximum).


This is one of those results where finding the right statement is the real issue, and once the statement has been found it takes just a few lines to prove it. In his article, Waterhouse builds up to this formulation in several steps, and he shows how it encompasses various more concrete cases and applications. He also gives a wonderful historical overview.


If the representation on the tangent space is reducible, then the Purkiss Principle can fail. If we break the representation into a direct sum of irreducible subrepresentations, then the Hessian matrix for $f$ will have an eigenvalue for each irreducible (with multiplicity equal to the dimension of the irreducible), and there's no reason why they should all have the same sign. However, this decomposition is nevertheless very useful for doing local calculations, because even if $M$ is high-dimensional, $T\_x M$ may decompose into just a few irreducibles.


So the upshot is this: if you are applying the second derivative test to a symmetric optimization problem, then representation theory will tell you what the symmetry implies, and irreducibility leads to the simplest possible answer.


