Determine the extreme values of the function $f$ with $f(x,y)=x^2y(4-x-y)$

75 Views Asked by At

Determine the extreme values of the function $f$ with $f(x,y)=x^2y(4-x-y)$ for the points located inside and on the triangle delimited by the lines $x=0$, $y=0$ and $x+y=6$.

Is this the function I'm going to need?

$$F\left(x,y,\lambda _1,\lambda _2,\lambda _3\:\right)=x²y\left(4-x-y\right)+\lambda _1x+\lambda _2y+\lambda _3\left(x+y-6\right)$$

1

There are 1 best solutions below

0
On

Lagrange multipliers method allows for optimization under equality constraint ; our problem being an equation solving one and the constraint being an inequation one, this method is irrelevant.

So, we are back to the trivial solution of generating candidate solutions to the equation solving the check the constraint satisfaction. Being lazy, I'll use Sage for this.

# Setup
sage: y = var("y")
sage: f(x,y)=x^2*y*(4 - x - y) # Objective function whose extrema are sought
sage: Conds=[x>=0, y>=0, x+y<=6] # (Shortcut definition of the) domain of search.

All extremal points are poins where all the derivatives of the objective function are zero ; this gives us a first list of candidates :

sage: Args = f.args()
sage: C1 = solve([f(x, y).diff(u) for u in Args], Args) ; C1
[[x == 0, y == r4], [x == 4, y == 0], [x == 2, y == 1]]

But his condition is also true for saddle points ; extremal points are also points where the second derivatives of the objective function are either all (strictly) positive or all (strictly) negative ; hence a second list of candidates :

sage: C2 = [s for s in C1 if all([bool(d.subs(s)>0) for d in D]) or all([bool(d.subs(s)<0) for d in D]) ] ; C2
[[x == 2, y == 1]]

It remains to check that this solution is in the search domain :

sage: Sol = [s for s in C2 if all([c.subs(s) for c in Conds])] ; Sol
[[x == 2, y == 1]]

One notes that the only possible solution is on the boundary of the search domain.