buscandoaireka8u

2023-02-18

How to find the maximum value of the function $f(x,y,z)=x+2y-3z$ subject to the constraint $z=4{x}^{2}+{y}^{2}$?

Jakob Howell

Beginner2023-02-19Added 4 answers

Forming the lagrangian

$L(x,y,z,\lambda )=f(x,y,z)+\lambda g(x,y,z)$

with

$g(x,y,z)=4{x}^{2}+{y}^{2}-z=0$

calculating and solving for the stationary points

$g(x,y,z)=4{x}^{2}+{y}^{2}-z=0$

or

$\{\begin{array}{l}1+8\lambda z=0\\ 2+2\lambda y=0\\ 3+\lambda =0\\ 4{x}^{2}+{y}^{2}-z=0\end{array}$

and solving for $(x,y,z,\lambda )$ we obtain

$\{\begin{array}{l}x=\frac{1}{24}\\ y=\frac{1}{3}\\ z=\frac{17}{144}\\ \lambda =-3\end{array}$

and the maximum value is

$\frac{17}{48}$

NOTE: To qualify the stationary point it is necessary to form

$(f\circ g)(x,y)=x+2y-3(4{x}^{2}+{y}^{2})$

and then calculate

$H={\nabla}^{2}(f\circ g)=\left(\begin{array}{cc}-24& 0\\ 0& -6\end{array}\right)$

As we can observe, $H$ has negative eigenvalues indicating that the found solution represents a maximum.

$L(x,y,z,\lambda )=f(x,y,z)+\lambda g(x,y,z)$

with

$g(x,y,z)=4{x}^{2}+{y}^{2}-z=0$

calculating and solving for the stationary points

$g(x,y,z)=4{x}^{2}+{y}^{2}-z=0$

or

$\{\begin{array}{l}1+8\lambda z=0\\ 2+2\lambda y=0\\ 3+\lambda =0\\ 4{x}^{2}+{y}^{2}-z=0\end{array}$

and solving for $(x,y,z,\lambda )$ we obtain

$\{\begin{array}{l}x=\frac{1}{24}\\ y=\frac{1}{3}\\ z=\frac{17}{144}\\ \lambda =-3\end{array}$

and the maximum value is

$\frac{17}{48}$

NOTE: To qualify the stationary point it is necessary to form

$(f\circ g)(x,y)=x+2y-3(4{x}^{2}+{y}^{2})$

and then calculate

$H={\nabla}^{2}(f\circ g)=\left(\begin{array}{cc}-24& 0\\ 0& -6\end{array}\right)$

As we can observe, $H$ has negative eigenvalues indicating that the found solution represents a maximum.

Guadara0c2x

Beginner2023-02-20Added 1 answers

Given: $f(x,y,z)=x+2y-3z$ and the constraint function $g(x,y,z)=4{x}^{2}+{y}^{2}-z=0$

The Lagrange function is:

$L(x,y,z,\lambda )=f(x,y,z)+\lambda g(x,y,z)$

$L(x,y,z,\lambda )=x+2y-3z+4\lambda {x}^{2}+\lambda {y}^{2}-\lambda z$

We compute the partial derivatives:

$\frac{\partial L(x,y,z,\lambda )}{\partial x}=1+8\lambda x$

$\frac{\partial L(x,y,z,\lambda )}{\partial y}=2+2\lambda y$

$\frac{\partial L(x,y,z,\lambda )}{\partial z}=-3-\lambda$

$\frac{\partial L(x,y,z,\lambda )}{\partial \lambda}=4{x}^{2}+{y}^{2}-z$

These 4 derivatives should be set to zero before they are solved as a system of equations:

$0=1+8\lambda x\phantom{\rule{1ex}{0ex}}\text{[1]}$

$0=2+2\lambda y\phantom{\rule{1ex}{0ex}}\text{[2]}$

$0=-3-\lambda \phantom{\rule{1ex}{0ex}}\text{[3]}$

$0=4{x}^{2}+{y}^{2}-z\phantom{\rule{1ex}{0ex}}\text{[4]}$

Solve equation [3] for $\lambda$:

$\lambda =-3$

Substitute -3 for $\lambda$ into equation [1]:

$0=1+8(-3)x\phantom{\rule{1ex}{0ex}}\text{[1]}$

$x=\frac{1}{24}$

Substitute -3 for $\lambda$ into equation [2]:

$0=2+2(-3)y$

$y=\frac{1}{3}$

Use equation [4] to find the value of z:

$z=4{\left(\frac{1}{24}\right)}^{2}+{\left(\frac{1}{3}\right)}^{2}$

$z=\frac{17}{144}$

$f(\frac{1}{24},\frac{1}{3},\frac{17}{144})=\frac{1}{24}+\frac{2}{3}-\frac{51}{144}$

$f(\frac{1}{24},\frac{1}{3},\frac{17}{144})=\frac{17}{48}$

Note: One cannot use the second derivative to test whether the Lagrange multiplier has given you a maximum or a minimum; the only way to determine whether the value is a local maximum is perturbation of values. I will leave that exercise to you.

The Lagrange function is:

$L(x,y,z,\lambda )=f(x,y,z)+\lambda g(x,y,z)$

$L(x,y,z,\lambda )=x+2y-3z+4\lambda {x}^{2}+\lambda {y}^{2}-\lambda z$

We compute the partial derivatives:

$\frac{\partial L(x,y,z,\lambda )}{\partial x}=1+8\lambda x$

$\frac{\partial L(x,y,z,\lambda )}{\partial y}=2+2\lambda y$

$\frac{\partial L(x,y,z,\lambda )}{\partial z}=-3-\lambda$

$\frac{\partial L(x,y,z,\lambda )}{\partial \lambda}=4{x}^{2}+{y}^{2}-z$

These 4 derivatives should be set to zero before they are solved as a system of equations:

$0=1+8\lambda x\phantom{\rule{1ex}{0ex}}\text{[1]}$

$0=2+2\lambda y\phantom{\rule{1ex}{0ex}}\text{[2]}$

$0=-3-\lambda \phantom{\rule{1ex}{0ex}}\text{[3]}$

$0=4{x}^{2}+{y}^{2}-z\phantom{\rule{1ex}{0ex}}\text{[4]}$

Solve equation [3] for $\lambda$:

$\lambda =-3$

Substitute -3 for $\lambda$ into equation [1]:

$0=1+8(-3)x\phantom{\rule{1ex}{0ex}}\text{[1]}$

$x=\frac{1}{24}$

Substitute -3 for $\lambda$ into equation [2]:

$0=2+2(-3)y$

$y=\frac{1}{3}$

Use equation [4] to find the value of z:

$z=4{\left(\frac{1}{24}\right)}^{2}+{\left(\frac{1}{3}\right)}^{2}$

$z=\frac{17}{144}$

$f(\frac{1}{24},\frac{1}{3},\frac{17}{144})=\frac{1}{24}+\frac{2}{3}-\frac{51}{144}$

$f(\frac{1}{24},\frac{1}{3},\frac{17}{144})=\frac{17}{48}$

Note: One cannot use the second derivative to test whether the Lagrange multiplier has given you a maximum or a minimum; the only way to determine whether the value is a local maximum is perturbation of values. I will leave that exercise to you.