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

Jun 15, 2016

A local minimum at $\left\{x = 1.12872 , y = 0.847942\right\}$ and
a local minimum also at $\left\{x = 0 , y = 0\right\}$

#### Explanation:

Introducing the so called slack variables ${s}_{1} , {s}_{2}$ the optimization problem is transformed into an equivalent one

Find local minima, maxima of

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

subject to

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

The lagrangian is

$L \left(x , y , {s}_{1} , {s}_{2} , {\lambda}_{1} , {\lambda}_{2}\right) = f \left(x , y\right) + {\lambda}_{1} {g}_{1} \left(x , y , {s}_{1}\right) + {\lambda}_{2} {g}_{2} \left(x , y , {s}_{2}\right)$

$L$ is analytical so the stationary points include the relative maxima and minima.

The determination of stationary points is done solving for $x , y , {s}_{1} , {\lambda}_{1} , {s}_{2} , {\lambda}_{2}$ the system of equations given by

$\nabla L \left(x , y , {s}_{1} , {\lambda}_{1} , {s}_{2} , {\lambda}_{2}\right) = \vec{0}$

or

{(2 x + lambda_1 (1 + 3 y) + lambda_2 (1 + 3 y)=0), (3 lambda_1 x + 3 lambda_2 x + 3 y^2=0), ( -s_1^2 + x + 3 x y=0), (-2 lambda_1 s_1=0), (-4 + s_2^2 + x + 3 x y=0) ,( 2 lambda_2 s_2=0) :}

Solving we get

$\left(x = 0. , y = 0. , {\lambda}_{1} = 0. , {s}_{1} = 0. , {\lambda}_{2} = 0. , {s}_{2} = 2.\right)$

and

$\left(x = 1.12872 , y = 0.847942 , {\lambda}_{1} = 0. , {s}_{1} = 2. , {\lambda}_{2} = - 0.637008 , {s}_{2} = 0.\right)$

Both points are at the boundaries of ${g}_{1} \left(x , y , 0\right) = 0$ and ${g}_{2} \left(x , y , 0\right) = 0$ respectively.

Their qualification must be done with ${f}_{{g}_{1}}$ and ${f}_{{g}_{2}}$ respectively. So,

${f}_{{g}_{1}} \left(x\right) = {x}^{2} - \frac{1}{27}$
${f}_{{g}_{2}} \left(x\right) = - {\left(x - 4\right)}^{3} / \left(27 {x}^{3}\right) + {x}^{2}$

${d}^{2} / \left({\mathrm{dx}}^{2}\right) {f}_{{g}_{1}} \left(0\right) = 2$ qualifying this point as a local minimum
${d}^{2} / \left({\mathrm{dx}}^{2}\right) {f}_{{g}_{2}} \left(1.12872\right) = 11.5726$ qualifying this point as a local minimum also

Attached a figure with a contour mapping with the found points