I need to find minimum of objective function $Q=f(x,y,z)$ inside a cube region. Hence the constraints are in the form $0 \leq x \leq 1$ and $0 \leq y \leq 1$ and $0 \leq z \leq 1$. Should the Lagrangian be
$$ L = Q + \lambda_1(x) + \lambda_2(1-x) + \lambda_3(y) + \lambda_4(1-y) + \lambda_5(z) + \lambda_6(1-z) $$
All the examples I've seen have constraints on one side, such as $x\leq 1$, but what to do when the constraints have inequality on both sides? In general, how do I constraint the $Q$ for minimization inside 3D object such a cube.
An example $Q= n-z-x-y+x^2+y^2$ where $n$ is a number. and I want to find its min in a cube, hence constraints are the sizes of each of the three edges as given above. Just need to know how to write the constraints.