find max and min of: $f(x_1, x_2 ) = \ln(x_1) + \ln(x_2) - 2x_1-2x_2$?

393 Views Asked by At

I need to find max and min (if they exist) of the following function: $f(x_1,x_2) = \ln(x_1) + \ln(x_2) - 2x_1-2x_2$

On the set $C = \{(x_1, x_2) ∈ R^2: x_1 \geq 1, x_2\geq 1, x_1+x_2 \leq 4\}.$

I have checked that the Lagrange theorem assumptions hold, so that I can find the critical points solving the following system of equation:

$\frac{1}{x_1}-2+\lambda_1 -\lambda_3=0$

$\frac{1}{x_2}-2+\lambda_2 -\lambda_3=0$

$\lambda_1(-x_1+1)=0$

$\lambda_2(-x_2+1)=0$

$\lambda_3(x_1+x_2-4)=0$

$-x_1\leq -1, -x_2\leq -1, x_1+x_2\leq 4$

What is the best way to proceed, given that I would like to solve the problem via Lagrange first order conditions?

2

There are 2 best solutions below

4
On BEST ANSWER

Concentrate on the third and fourth equations. There are several possibilities:

  • $x_1=x_2=1$. This gives $(1,1)$, where $f(x_1,x_2) = -4$.
  • $\lambda_1=0$, $x_2=1$. The last equation forces either $x_1=3$, giving the point $(3,1)$ with $f(x_1,x_2) = -8 + \ln 4$, or else $\lambda_3=0$. But if $\lambda_3=0$, then from the first equation, $\frac{1}{x_1} - 2 = 0$ so that $x_1 = \frac{1}{2}$, which is impossible. Thus from this case we get $(3,1)$, $f(3,1) = -8 + \ln 3$.
  • $\lambda_2 = 0$, $x_1=1$. This is similar to the previous case, and gives the point $(1,3)$ with $f(1,3) = -8 + \ln 3$.
  • $\lambda_1 = \lambda_2 = 0$. If $\lambda_3=0$ as well, then (from the first two equations) $x_1=x_2 = \frac{1}{2}$, which is impossible. Thus, $\lambda_3\ne 0$, and the first, second, and last equations together give $x_1 = x_2 = 2$, so we get $(2,2)$ with $f(2,2) = -8 + \ln 4$.

The last solution is extraneous, so that $f$ achieves a minimum of $-4$ and $(1,1)$ and a maximum of $-8 + \ln 3$ at $(1,3)$ and $(3,1)$.

0
On

Actually there is no need for Lagrange multipliers. In order to minimize/maximize $\log(x y)-2(x+y)$ over the triangle $x,y\geq 1,x+y\leq 4$ it is enough to consider $\log(x(s-x))-2s$ for a fixed $s\in[2,4]$ and for $x$ ranging from $1$ to $s-1$. This function shares its stationary points with $x(s-x)$, so the maximum is attained at $x=y$ and the minimum at $x=1$ or $y=1$. Considering $x=y$ we have to maximize $2\log(x)-4x$ over $x\in[1,2]$, and this is a decreasing function, since it has a negative derivative. Considering $x=1$ we have to minimize $\log(y)-2y-2$ over $y\in[1,3]$: this is a decreasing function too. Summarizing, the maximum of $\log(xy)-2(x+y)$ over the given triangle occurs at $(1,1)$ and the points of minimum are $(1,3)$ and $(3,1)$.