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

Jun 29, 2016

There are local minima and local maxima points.

#### Explanation:

This problem will be solved using the Lagrange Multipliers technique.
(see https://en.wikipedia.org/wiki/Lagrange_multiplier)
This technique applies to analytic maximization/minimization problems with equality restrictions.

We will transform our problem which is with inequality restrictions into an equivalent one, now with equality restrictions. For this purpose we will introduce the so called slack variables ${s}_{1} , {s}_{2}$ and the equivalent problem is stated as:

Minimize/Maximize $f \left(x , y\right) = \frac{{x}^{2} + 4 y}{e} ^ y$
subjected to

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

The set of lagrangian stationary points contains the local minima/maxima points.

The lagrangian is stated as

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

The lagrangian stationary points are the solutions of

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

or

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

This nonlinear system of equations can be solved using a technique similar to Newton-Raphson's
(see https://en.wikipedia.org/wiki/Newton%27s_method)
obtaining

((x= 0, y= 1., lambda_1 = 0, s_1 = 1., lambda_2= 0, s_2 =0), (x= 0.381966, y= 0.381966, lambda_1= -0.421819, s_1 = 0, lambda_2 = 0, s_2 = -1.), (x = 2., y -> 3., lambda_1 = 0, s_1 = 1., lambda_2 = 0.0995741, s_2= 0), (x= 2.61803, y = 2.61803, lambda_1 = 0.118029, s_1 = 0, lambda_2 = 0, s_2 = 1.))

The first and the third are qualified by the restriction ${g}_{2} \left(x , y , 0\right)$ because ${s}_{2} = 0$.
The second and fourth are qualified by the restriction ${g}_{1} \left(x , y , 0\right)$ because for them ${s}_{1} = 0$.

The qualification is done over

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

So first and second points are local minima
the third and fourth points are local maxima.

Attached the $f \left(x , y\right)$ contour plot, into the feasible domain, showing the local minima/maxima points.