Optimization, under costraint $f(x_1,\ldots,x_n)=\sum a_k x_k^2$ under the constraint $\sum x_k =c$ with $a_k > 0,$ $k=1,\ldots,n$
The associated Lagrangian is : $L(x_1,\ldots, x_n)=f(x_1,\ldots,x_n)+ \lambda(\sum x_k -c)$
How to deduce that: $\lambda = \dfrac{-2c}{\sum \dfrac 1 {a_k}}$ and the value of $x_k$
I can not show it, someone can help me thanks