How do you maximize and minimize #f(x,y)=e^-x+e^(-3y)-xy# subject to #x+2y<7#?

1 Answer
Jun 15, 2016

Local minimum at #x = 3.52143, y = 1.73929 #

Explanation:

We will using the so called slack variables to transform inequality into equality relations. So considering #s# as a slack variable, the initial problem

Find local extrema for

#f(x,y) = e^-x+e^(-3y)-x y# subject to #x+2y<7#

is transformed into an equivalent one

#f(x,y) = e^-x+e^(-3y)-x y# subject to #g(x,y,s) = x+2y+ s^2 -7 = 0#

Forming the lagrangian

#L(x,y,s,lambda) = f(x,y) + lambda(x,y,s)#

The local extrema are included in the lagrangian stationary points. This is true mainly because #L(x,y,s,lambda)# is analytical.

The stationary points are determined finding the solutions to

#grad F(x,y,s,lambda) = vec 0#

The resulting equations are

# { (-e^-x + lambda - y=0), (-3 e^(-3 y) + 2 lambda - x=0), (2 lambda s=0), (-7 + s^2 + x + 2 y=0) :} #

This system of equations must be solved numerically using an iterative procedure like Newton-Raphson.
https://en.wikipedia.org/wiki/Newton%27s_method

Calling #X = {x,y,s,lambda}# and #F(X)# the vector of equations the iterative procedure is

#X_{k+1} = X_k - kappa H(X_k)^{-1} F(X_k)#

where #H(X) = grad(grad F(X))#

#H(X) = ((e^-x, -1, 0, 1),(-1, 9 e^(-3 y), 0, 2),(0, 0, 2 lambda, 2 s),(1, 2, 2 s, 0)) #

#kappa# is a convergence factor here choosed as #1#

After some tries we find

#X_0 = {3.52143,1.73929,-3.33992*10^-20,1.76884}# as a stationary point. This point is at the restriction boundary because #s = -3.33992*10^-20 approx 0#

The qualification is made over

#f(x,g(x,y,0)=0) =(f_g)(x) = e^(3/2 (x-7)) + e^-x + 1/2 ( x-7) x#

Calculating #(d^2f_g)/(dx^2)# for #x = 3.52143 # we have

#(d^2f_g)/(dx^2) = 1.04175 > 0# characterizing the stationary point as a local minimum.

Attached a figure with the contour map and the soution point

enter image source here