Being new to optimization please do not downvote this question. I am solving following optimization problem. And my findings are not where neat the optimality. Following is what I have done.
$$f = 2x^2+y^2+3z^2 +10 +8y+6z-100$$ $$s.t. \ \ x+y+z =200$$
My Langrage Equation is: $\mathcal{L} = f -\lambda g$, (where $g = x+y+z-200$)
Following $\frac{d\mathcal{L}}{dx} = 0$, $\frac{d\mathcal{L}}{dy} = 0$, $\frac{d\mathcal{L}}{dz} = 0$, $\frac{d\mathcal{L}}{d\lambda} = 0$, I get
$\lambda = 4x+10$, $\lambda = 2y+8$, $\lambda = 6z+16$
With manipulations, I get $x = \frac{\lambda-10}{4}$, $y = \frac{\lambda-8}{2}$, $z= \frac{\lambda-6}{6}$. Inserting these $x$, $y$, $z$ in $g$, I get $\lambda = 2490$.
But something is not right, this does not satisfy the constraint at all. The values of $x$, $y$, $z$ are found as $620$, $1241$, $414$ respectively.
Where I am going wrong?
Write the Lagrangian
$$ \mathcal{L} = 2x^2 + y^2 + 3z^2 + 10x + 8y + 6z − 100 - \lambda(x + y + z - 200) $$
and calculate
\begin{eqnarray} \frac{\partial \mathcal{L}}{\partial x} &=& 4x + 10 - \lambda \\ \frac{\partial \mathcal{L}}{\partial y} &=& 2y + 8 - \lambda \\ \frac{\partial \mathcal{L}}{\partial z} &=& 6z + 6 - \lambda \\ \frac{\partial \mathcal{L}}{\partial \lambda} &=& x + y + z - 200 \end{eqnarray}
From this you get
\begin{eqnarray} x &=& \frac{1}{4}(\lambda - 10)\\ y &=& \frac{1}{2}(\lambda - 8) \\ z &=& \frac{1}{6}(\lambda - 6) \\ \end{eqnarray}
In the last equation
$$ \frac{1}{4}(\lambda - 10) + \frac{1}{2}(\lambda - 8) + \frac{1}{6}(\lambda - 6) = 200 \\ 3(\lambda - 10) + 6 (\lambda - 8) + 2 (\lambda - 6) = 2400 \\ 11\lambda - 90 = 2400 \\ \lambda = 226 $$