# How do you minimize and maximize f(x,y)=x^2/y^3+xy^2 constrained to 0<x+3xy<4?

May 20, 2017

Use two Lagrange multipliers and two slack variables. Here is a reference regarding Inequality Constraints

#### Explanation:

Given: $f \left(x , y\right) = {x}^{2} / {y}^{3} + x {y}^{2}$

A little better form:

$f \left(x , y\right) = {x}^{2} {y}^{-} 3 + x {y}^{2}$

We need to work on the constraint functions.

${g}_{1} \left(x , y , {s}_{1}\right) = x + 3 x y - {s}_{1}^{2} = 0$
${g}_{2} \left(x , y , {s}_{2}\right) = 4 - x - 3 x y - {s}_{2}^{2} = 0$

NOTE: ${s}_{1} \mathmr{and} {s}_{2}$ are called "slack variables" they allow us to take up the slack for the inequality.

We have two constraint functions, therefore we have two Lagrange multipliers and the Lagrange function is:

$L \left(x , y , {\lambda}_{1} , {\lambda}_{2} , {s}_{1} , {s}_{2}\right) = {x}^{2} {y}^{-} 3 + x {y}^{2} + {\lambda}_{1} x + 3 {\lambda}_{1} x y - {\lambda}_{1} {s}_{1}^{2} + 4 {\lambda}_{2} - {\lambda}_{2} x - 3 {\lambda}_{2} x y - {\lambda}_{2} {s}_{2}^{2}$

The six partial derivatives are:

$\frac{\partial L \left(x , y , {\lambda}_{1} , {\lambda}_{2} , {s}_{1} , {s}_{2}\right)}{\partial x} = 2 x {y}^{-} 3 + {y}^{2} + {\lambda}_{1} \left(1 + 3 y\right) - {\lambda}_{2} \left(1 + 3 y\right)$

$\frac{\partial L \left(x , y , {\lambda}_{1} , {\lambda}_{2} , {s}_{1} , {s}_{2}\right)}{\partial y} = - 6 x {y}^{-} 4 + 2 x y + 3 x \left({\lambda}_{1} - {\lambda}_{2}\right)$

$\frac{\partial L \left(x , y , {\lambda}_{1} , {\lambda}_{2} , {s}_{1} , {s}_{2}\right)}{\partial {\lambda}_{1}} = x + 3 x y - {s}_{1}^{2}$

$\frac{\partial L \left(x , y , {\lambda}_{1} , {\lambda}_{2} , {s}_{1} , {s}_{2}\right)}{\partial {\lambda}_{2}} = 4 - x - 3 x y - {s}_{2}^{2}$

$\frac{\partial L \left(x , y , {\lambda}_{1} , {\lambda}_{2} , {s}_{1} , {s}_{2}\right)}{{s}_{1}} = - 2 {\lambda}_{1} {s}_{1}$

$\frac{\partial L \left(x , y , {\lambda}_{1} , {\lambda}_{2} , {s}_{1} , {s}_{2}\right)}{{s}_{2}} = - 2 {\lambda}_{2} {s}_{2}$

Set them equal to zero and solve them as a system of equations:

$0 = 2 x {y}^{-} 3 + {y}^{2} + {\lambda}_{1} \left(1 + 3 y\right) - {\lambda}_{2} \left(1 + 3 y\right)$

$0 = - 6 x {y}^{-} 4 + 2 x y + 3 x \left({\lambda}_{1} - {\lambda}_{2}\right)$

$0 = x + 3 x y - {s}_{1}^{2}$

$0 = 4 - x - 3 x y - {s}_{2}^{2}$

$0 = - 2 {\lambda}_{1} {s}_{1}$

$0 = - 2 {\lambda}_{2} {s}_{2}$

I substituted $u , v , w , \mathmr{and} z$ for ${\lambda}_{1} , {\lambda}_{2} , {s}_{1} \mathmr{and} {s}_{2}$, respectively and gave the equations to WolframAlpha. It came up with:

$x \approx 0.754146 , y \approx 1.43467$