In optimization problem using Lagrange multiplier..
$f(x, y, z) = x + 2z$, subject to $g_1(x, y, z) = x + y + z = 1$, $g_2(x; y; z) = 2x + z = 2$
Find $x, y, x, \lambda_1, \lambda_2$
.............................................
I couldn't find the right solution using with equation $ℒ = f(x)-\lambda_1 g_1(x, y, z)-λ_2g_2(x, y, z)=0$ Should I have doubts about the problem? Thank you for reading.
For the first case. let $$f(x,y,z,\lambda_1,\lambda_2)=x+2z+\lambda_1(x+y+z-1)+\lambda_2(2x+z-2)$$ then we get
$$\frac{\partial f}{\partial x}=1+\lambda_1+2\lambda_2$$ $$\frac{\partial f}{\partial y}=\lambda_1$$ $$\frac{\partial f}{\partial z}=2+\lambda_1+\lambda_2$$ $$\frac{\partial f}{\partial \lambda_1}=x+y+z-1$$ $$\frac{\partial f}{\partial \lambda_2}=2x+z-2$$ The system has no solutions, since we get $$\lambda_2=-\frac{1}{2}$$ and $$\lambda_2=-2$$
we must solve $$\frac{\partial f}{\partial x}=0$$ $$\frac{\partial f}{\partial y}=0$$ $$\frac{\partial f}{\partial z}=0$$ $$\frac{\partial f}{\partial \lambda_1}=0$$ $$\frac{\partial f}{\partial \lambda_2}=0$$