I need to find max and min (if they exist) of the following function: $f(x, y, z) = x + 2z$ On the set $C = \{(x, y, z) ∈ R^3: x + y + z = 1, x^2 + y^2 + z =7/4\}.$
I have checked that the Lagrange theorem assumptions hold, so that I can find the critical points solving the following system of equation:
$1-\lambda_1-2\lambda x=0$
$-\lambda_1-2\lambda_2 y=0$
$2-\lambda_1-\lambda_2=0$
$x+y+z=1$
$x^2+y^2+z=7/4$
From (3) we get $\lambda_1=2-\lambda_2$, that I can substitute into (2) but then I am stuck. Could you help me??
We have that $\nabla f \equiv (1,0,2)$. The restrictions are $g_1(x,y,z) = x+ y+z -1$ and $g_2(x,y,z) = x^2+y^2+z - 7/4$. We have hence
\begin{align} \nabla g_1(x,y,z) &= (1,1,1)\\ \nabla g_2(x,y,z) &= (2x,2y,1) \end{align}
We hence need to find solutions to $\nabla f(x,y,z) = \lambda_1\nabla g_1(x,y,z) + \lambda_2\nabla g_2(x,y,z)$ that respect the restrictions, that is
$$\left\{ \begin{align} 1 &= \lambda_1+2\lambda_2x\\ 0 &= \lambda_1 + 2\lambda_2y\\ 2 &= \lambda_1+\lambda_2\\ 1 &= x+y+z\\ 7/4 &=x^2+y^2+z \end{align} \right. $$
From the third, we get $\lambda_1 = 2-\lambda_2$. We may substitute back into the first equation to obtain $\lambda_2(2x-1) = -1$ and into the second equation to obtain $\lambda_2(2y-1) = -2$.
Any two of the first three equations imply that $\lambda_2\neq 0$, and hence $2x-1 = -1/\lambda_2$ and $2y-1 = -2/\lambda_2$. Therefore $2y-1 = 2(2x-1)$, giving $y$ in terms of $x$.
Now the fourth has $z = 1 - x - y$, and with $y$ in terms of $x$ from above we obtain $z$ in terms of $x$.
Substituting it all into the last we get a quadratic equation in $x$. Solve it, and back substitute.