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

Dec 22, 2016

Constrain even more to $x + 3 y = 1$. Then we can treat this as a cubic in $y$, therefore unbounded.

#### Explanation:

Suppose we constrain $x + 3 y = 1$. Then $f \left(x , y\right)$ is still unbounded:

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

The end behaviour is dominated by the ${y}^{3}$ term and hence:

${\lim}_{y \to + \infty} f \left(x , y\right) = + \infty$

${\lim}_{y \to - \infty} f \left(x , y\right) = - \infty$

Dec 22, 2016

See below.

#### Explanation:

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

$\Omega \left(x , y\right) = \left\{\left(x , y\right) | 0 < x + 3 y < 2\right\}$

We are looking for local minima/maxima.

This problem can be handled using lagrange multipliers. This can be done following the steps:

1) Describe $\Omega \left(x , y\right)$ through equality constraints
This can be done introducing the so called slack variables ${s}_{1} , {s}_{2}$ and making

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

then $\Omega \left(x , y\right) \equiv {g}_{1} \left(x , y , {s}_{1}\right) \cap {g}_{2} \left(x , y , {s}_{2}\right)$

2) Form the Lagrangian

$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)$

3) Determine the stationary points of $L \left(x , y , {s}_{1} , {s}_{2} , {\lambda}_{1} , {\lambda}_{2}\right)$

This is done computing the solution to

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

where $\nabla$ represents the partial derivatives operator

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

so the equations which define the stationary points are

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

Solving for $x , y , {s}_{1} , {s}_{2} , {\lambda}_{1} , {\lambda}_{2}$ we obtain

((x,y,s_1,s_2,lambda_1,lambda_2),(18., -6., 0, -1.41, -36., 0), (0, 0, 0, -1.41, 0, 0), (21.81, -6.60,-1.41, 0, 0, -43.63), (0.183, 0.60, -1.41, 0, 0, -0.36))

4) Qualifying the stationary points

This can be done computing $\frac{{d}^{2} \left(f \circ {g}_{i}\right)}{{\mathrm{dx}}^{2}}$ for $i = 1 , 2$

and depending on the sign, if positive it is a local minimum and if negative a local maximum.

Ex.

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

$\frac{{d}^{2}}{{\mathrm{dx}}^{2}} \left(f \circ {g}_{1}\right) \left(x\right) = 2 - \frac{2 x}{9}$
$\frac{{d}^{2}}{{\mathrm{dx}}^{2}} \left(f \circ {g}_{2}\right) \left(x\right) = - \frac{2}{9} \left(x - 11\right)$

The evaluations must be done according to the values found for ${s}_{1}$ and ${s}_{2}$ so, the first and second points shall be qualified with $\frac{{d}^{2}}{{\mathrm{dx}}^{2}} \left(f \circ {g}_{1}\right) \left(x\right) , \left({s}_{1} = 0\right)$ and the second and third shall be qualified with $\frac{{d}^{2}}{{\mathrm{dx}}^{2}} \left(f \circ {g}_{2}\right) \left(x\right) , \left({s}_{2} = 0\right)$

Attached a plot showing the region with the objective function level curves, and the stationary points showing the gradient direction.

The qualification is left to the reader.

Note. Of course if the evaluation gives zero we will continue the qualification process but this is another chapter.