[Math] Find the absolute maximum and minimum of function $f(x,y)=x^2+3y^2-y$ over the region $x^2+2y^2\le2$

maxima-minimaoptimizationqcqp

Find the absolute maximum and minimum of function $f(x,y)=x^2+3y^2-y$ over the region $x^2+2y^2\le2$.

I know how to find maxima/minima if the constraint was the boundary of the circle (by Lagrange's multiplier method). How do I find it for a region? Can I maximise/minimise $f(x,y)$ by finding its saddle points, and then using only those points that lie within the region?

Best Answer

You can also solve this by using Lagrangian multipliers. You have the problem $$ \underset{x,y}{\text{minimize}}\ \quad \quad x^2+3y^2-y\\ \text{subject to}\ \ x^2+2y^2-2\leq 0 $$ To put it in Lagrangian form, we simply restate the problem as $$ L(x,y,\lambda) = x^2+3y^2-y + \lambda(x^2+2y^2-2) $$ What we need to do now is to find all the KKT points. To do so, we solve the following problem $$ \frac{\partial L}{\partial x}=0 \iff 2x+2\lambda x=0\quad (1)\\ \frac{\partial L}{\partial y}=0 \iff 6y-1+4\lambda y=0\quad (2)\\ \lambda(x^2+2y^2-2)=0 \quad (3) $$ First, assume that $\lambda=0$, then we must have (from $(1)$ and $(2)$) $x=0,y=1/6$. This is our first KKT-point. To find the others, assume that $\lambda\neq 0$. Then from $(1)$ we get either $x=0$ or $\lambda=-1$ from $(2)$. This yields the points $(x,y)=(0,1)$, $(x,y)=(0,-1)$, and $(x,y) = (\frac{\pm\sqrt(3)}{2},\frac{1}{2})$. Now lets check which point is minimium/maximum: $$ f(0,1/6) = -\frac{1}{12}\\ f(0,1) = 2\\ f(0,-1) = 4\\ f(\frac{\sqrt(3)}{2},\frac{1}{2})=1\\ f(\frac{-\sqrt(3)}{2},\frac{1}{2})=1 $$ Thus the minimum is $-\frac{1}{12}$ attained at $(x,y) = (0,\frac{1}{6})$ and the maximum is $4$ attained at $(x,y) = (0,-1)$.

Note: If you had more constraints (equality or inequality) you could use the same approach, however then you would have more Lagrange multipliers. (3) is called complementary slackness.