Let
\begin{align*} f &:= 4-x-y\\ g &:= x+y+5 \end{align*}
We want to maximize $fg$ subject to $f \ge 0$ and $g \ge 0$.
I tried to solve it using Lagrange multipliers but could not.
Let
\begin{align*} f &:= 4-x-y\\ g &:= x+y+5 \end{align*}
We want to maximize $fg$ subject to $f \ge 0$ and $g \ge 0$.
I tried to solve it using Lagrange multipliers but could not.
Copyright © 2021 JogjaFile Inc.
Lagrange multiplier is not really needed,
Let $p=x+y$, you want to $$ \max (4-p)(p+5)$$
subject to
$$4-p \geq 0 \iff p\leq 4$$
and
$$p+5 \geq 0 \iff p\geq -5$$
We can notice that the constraints are indeed redundant.
Can you solve $$\max (4-p)(p+5)?$$
Notice that this is just a quadratic problem.
After you solve for $p$. Choose $x=x_0$, you can solve for $y=p-x_0$.