If $f(x,y,z,\ldots)$ is symmetric in all variables, (i.e $f$ remains the same after interchanging any two variables), and we want to find the extrema of $f$ given a symmetric constraint $g(x,y,z,\ldots)=0$,
$$\bf\text{When is it true that the extrema is achieved when }\ x=y=z=\ldots?$$
An example where this claim is true: $$ g(x,y,z) = x+y+z - xyz,\ f(x,y,z) =(x-1)(y-1)(z-1)$$ An example where this claim is false (courtesy of @N.S): $$g(x,y,z) = x^2+y^2+z^2-1, \ f(x,y,z) = x^4+y^4+z^4$$
Is there a nice way to know when symmetry can be used to claim that the extrema is achieved when all variables are equal?