How to restrict Lagrange multiplier on positive values?

2.1k Views Asked by At

Here's the function that i want to optimize:

$$f(x,y) = x-2y$$

and the constraint is:

$$g(x,y) = x^2 + y - 10 = 0$$

Solving with Lagrange multiplier I get:

$$F(x,y,\lambda) = x-2y - x^2\lambda - y\lambda + 10\lambda$$

$$F_x = 1 - 2x\lambda = 0$$ $$F_y = -2-\lambda = 0 \iff \lambda = -2 $$ $$F_\lambda = x^2 + y - 10 = 0$$

Then:

$$1+4x = 0$$ $$4x = -1$$ $$x = -\frac 14$$

$$\frac1{16} + y - 10 = 0$$ $$y = \frac{159}{16}$$

So I found one stationary point and obviously it's the minimum of the function and it's:

$$f(-\frac{1}{4},\frac{159}{16}) = -20,125$$

At these conditions this function doesn't have maximum, but if we restrict x and y only to positive values we should be able to obtain one. How can we do that?

1

There are 1 best solutions below

5
On BEST ANSWER

You want to maximize the function $f(x,y)=x-2y$ on the part of the parabola $y=10-x^2$ within the first quadrant. Substituting we have the function $f(x,10-x^2)=2x^2+x-20$, and we are only considering values of $x$ from $0$ to $\sqrt{10}$. You've already shown there is no local extrema within these values, so we only check the endpoints. $f(0,10)=-20$ and $f(\sqrt{10},0)=\sqrt{10}$, so we have a maximum of $\sqrt{10}$ at $(\sqrt{10},0)$.

Suppose instead we were trying to optimize the function $f(x,y,z)=x-2y+z$ on the sphere $x^2+y^2+z^2=1$, but we only wanted to consider points in the first octant. Call this part of the sphere $S$. First, we would apply Lagrange to see if there are any local extrema on $S$. Then, we would need to consider the boundary of $S$, which consists of three quarter arcs. Let's only work with the arc specified by the constraint $x^2+y^2=1$ for $x$ and $y$ positive (note we've set $z=0$). Hence, now we are trying to optimize $f(x,y,0)=x-2y$ on $x^2+y^2=1$, for $x$ and $y$ positive. Again, we apply Lagrange to search for local extrema, and then check the boundary, which in this case is just two points.

After checking all three boundary arcs, along with the points defining the boundaries of the arcs, we collect all of our values (local extrema as well as the boundary values) and find the largest and smallest.

In general, this is how you search for global extrema on a closed region.