Let $n\in\Bbb N,n\ge2$. Find the maximum of $$f:[0,\pi]^n\to\Bbb R$$ $$f(x_1,...,x_n):=\sum_{i=1}^n\sin(x_i)$$ with the constraint: $\sum_{i=1}^n x_i=2\pi$
My attempt:
Let $g(x_1,...,x_n):=\sum_{i=1}^n x_i$
I need to find components $c_1,...,c_n:=c$ such that $\nabla f(c)=\lambda \nabla g(c)$
$$\nabla f(c)=\bigl(\cos(c_1),...,\cos(c_n)\bigr)$$ $$\nabla g(c) =(c_1,...,c_n)$$
I end up with this system of equations $$\cos(c_j)=\lambda c_j \; \;j=1,...,n $$
And I am stuck here, how should I proceed?
When you are maximizing a function you are looking for
$$ [\nabla \cdot f](\mathbf{x}) = \mathbf{0} $$
when you are maximizing a function within a finite subset of the definition space $[0,\pi]^n$ you must both look for all points with $[\nabla \cdot f](\mathbf{x}) = \mathbf{0}$ and compare with the maximums along the border of the search subset. In your case you have a taxi cab norm $n-1$ sphere centered at the origin.
So first solving for
$$ [\nabla \cdot f](\mathbf{x}) = (cos(x_1),\dots,cos(x_n))^T = \mathbf{0} \leftrightarrow x_i = (2n_i+1) \frac{\pi}{2} \forall i\in[1,n]$$
so you have one extreme point inside your definition interval, $x_i = \frac{\pi}{2}$. The border of your search interval is a hyper-plane of dimension $n-1$, but since $sin$ is concave (as Adayah pointed out) on the interval you know that if the extreme value you found is outside the border: the best value will be ON the border. (it is easy to show that this extreme value is a maximum by the second derivative) If it is inside the border: the highest value is already found as all other values will be smaller. If it is on the border you are also done as all other values will be smaller.
I will leave the rest to you!
If you are interested in taxi cab metrics here is a circle :P