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

Dec 23, 2016

The intent may have been to apply derivatives, but the explanation below would seem to provide a simpler solution: $\left(- \infty , + \infty\right)$

#### Explanation:

Maximization
Note that the constraint $0 < x + 3 y < 2$
allows $x \rightarrow + \infty$ (provided $3 y \rightarrow - \infty$)
In which case $f \left(x , y\right) \rightarrow + \infty$

Minimization
Note that the constraint $0 < x + 3 y < 2$
allows $x \rightarrow 0 +$ (provided $y > 0$)
In which case $f \left(x , y\right) \rightarrow - \infty$

Dec 23, 2016

See below.

#### Explanation:

Given $f \left(x , y\right) = {x}^{2} - \frac{y}{x}$ 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 + y/x^2= 0), (3 lambda_1 + 3 lambda_2 -1/x= 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 the only real solution

((f(x,y),x,y,s_1,s_2,lambda_1,lambda_2),(1.775,-0.693, 0.897., -1.414, 0,0, -0.480) )

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.

In our case,

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

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

The evaluations must be done according to the values found for ${s}_{1}$ and ${s}_{2}$ so, this point 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 point.

The qualification is left to the reader. I think it is a local minimum.

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