Single constraint with multiple conditions in Lagrange multipliers

23 Views Asked by At

I was solving the following question:

Find the dimensions of the rectangle of largest area that can be inscribed in: the region in the first quadrant bounded by $x=0$, $y=0$, and $y=1-\frac{x}{3}$

I set up the system as:
$\nabla f=\lambda\nabla g$
$g(x,y)=0$

Where $g(x,y)=y-1-\frac{x}{3}=0$ and $f(x,y)=xy$ (the area of the rectangle).

Now I didn't really take into account the boundaries $y=0$ and $x=0$ however after solving the system I got $y=\frac{1}{2}$ and $x=\frac{3}{2}$ which are obviously located in the first quadrant and match the given boundaries but my question is what if I got a solution not in the first quadrant, how could I take into account the other boundaries directly?