Maximize $\sum\limits_{k =1}^n x_k (1 - x_k)^2$ Given problem for maximizing
\begin{align}
&\sum_{k =1}^n x_k (1 - x_k)^2\rightarrow \max\\
&\sum_{k =1}^n x_k = 1,\\
&x_k \ge 0, \; \forall k \in 1:n.
\end{align}
My attempt: first of all i tried AM-GM, or we can just say, that $x_k (1 - x_k)^2 \le x_kx_k^2 =x_k^3$, but now we got just sum of cubes. Can we say, that $\sum\limits_{k =1}^n x_k^3 \le \sum\limits_{k =1}^n x_k,$ because $x_i \le 1$ and get our maximum - 1?
It looks very easy, but i suppose i'm wrong

For $x_1=x_2=...=x_n=\frac{1}{n}$ we get a value $\frac{(n-1)^2}{n^2}.$
We'll prove that it's a maximal value.
Indeed, 
\begin{align}
\frac{(n-1)^2}{n^2}-\sum_{k=1}^nx_k(1-x_k)^2&=\sum_{k=1}^n\left(\frac{(n-1)^2}{n^3}-x_k(1-x_k)^2\right)\\
&=\frac{1}{n^3}\sum_{k=1}^n(1-nx_k)(n^2x_k^2-n(2n-1)x_k+(n-1)^2) 
\end{align}
\begin{align}
&=\frac{1}{n^3}\sum_{k=1}^n\left((1-nx_k)(n^2x_k^2-n(2n-1)x_k+(n-1)^2)-(1-nx_k)(n^2-4n+3)\right)\\
&=\frac{1}{n^3}\sum_{k=1}^n(1-nx_k)^2(2n-2-nx_k)\geq0\text{ for any } n\geq2.
\end{align}
For $n=1$ we have $x_1=1$ and $$x_1(1-x_1)^2=0=\frac{(n-1)^2}{n^2},$$
which says that $\frac{(n-1)^2}{n^2}$ is the answer.
