Rapsinincke

2022-07-08

Maximize
$f\left(x,y,z\right)=xy+{z}^{2},$
while $2x-y=0$ and $x+z=0$. Lagrange doesnt seem to work.

poquetahr

Expert

Since there are two constraints, we must use
$\mathrm{\nabla }f\left(x,y,z\right)=\lambda \mathrm{\nabla }g+\mu \mathrm{\nabla }h.$

We have
1. $f\left(x,y,z\right)=xy+{z}^{2}$
2. $g\left(x,y,z\right)=2x-y$
3. $h\left(x,y,z\right)=x+z$
So we get
$\begin{array}{}\text{(1)}& {f}_{x}=\lambda {g}_{x}+\mu {h}_{x}& \phantom{\rule{thickmathspace}{0ex}}⟹\phantom{\rule{thickmathspace}{0ex}}y=2\lambda +\mu \text{(2)}& {f}_{y}=\lambda {g}_{y}+\mu {h}_{y}& \phantom{\rule{thickmathspace}{0ex}}⟹\phantom{\rule{thickmathspace}{0ex}}x=-\lambda \text{(3)}& {f}_{z}=\lambda {g}_{z}+\mu {h}_{z}& \phantom{\rule{thickmathspace}{0ex}}⟹\phantom{\rule{thickmathspace}{0ex}}2z=\mu \end{array}$
$\begin{array}{}\text{(4)}& 2x-y& =0\text{(5)}& x+z& =0\end{array}$