# Thread: Optimization of two variable function with constraint

1. ## Optimization of two variable function with constraint

Find the min and max of the function:
f(x,y) = x - 3y - 1

Restricted by the ellipse x^2 + 3y^2 = 16.

Since f(x,y) is a plane, that means it has no critical points, which means the minimum and maximum lie on the boundary of the ellipse.

But to find those specific points, I'm not sure how to do...

2. If you projected that ellipse on to your plane, and the ellipse was not parallel to the plane (I'm sure it isn't), then the maximum or minimum points on the plane, in the region defined by the ellipse should occur at the major or minor radius correct?

3. I don't think that works...
However, if I weret to sub those values into the f(x,y) equation, you get
f(4,0) = (4) - 3(0) - 1 = 3
f(0, -(16/3)^0.5) = 0 - 3(-(16/3)^0.5) - 1 = 5.92820323 (max?)
and
f(0,(16/3)^0.5) = (0) - 3(16/3)^0.5 - 1 = -7.92820323 (min?)
f(-4, 0) = -4 - 0 - 1 = -5

But (-2, 2) and (2, -2) are on the ellipse as well. Using those values for f(x,y):
f(-2, 2) = -2 - 3(2) - 1 = -9
f(2,-2) = 2 -3(-2) - 1 = 7

Which outperform the values of the major and minor radius. Unless my understanding of those definitions are wrong.

4. Hmm. Perhaps you are right. The only other thing I can think of is solving your ellipse for one of your values x or y, and using that in your plane equation.

5. That's way too time-consuming and still has room for inaccuracy. There should be a way to compare f(x,y) with the ellipse and find the points directly instead of trial and error.

6. I don't mean to double post, but this problem really has me stumped, and I honestly don't know where to go.

7. Using Lagrange multipliers:

$\displaystyle f(x) = x - 3y - 1$

$\displaystyle g(x) = x^2 + 3y^2$

$\displaystyle \frac{\delta f}{\delta x} = 1$

$\displaystyle \frac{\delta f}{\delta y} = -3$

$\displaystyle \frac{\delta g}{\delta x} = 2x$

$\displaystyle \frac{\delta g}{\delta y} = 6y$

$\displaystyle \left<\frac{\delta f}{\delta x}, \frac{\delta f}{\delta y}\right> = \lambda \left<\frac{\delta g}{\delta x}, \frac{\delta g}{\delta y}\right>$

$\displaystyle 1 = \lambda (2x)$
$\displaystyle -3 = \lambda (6y)$

$\displaystyle 2x = \frac{6y}{-3}$

$\displaystyle 2x = -2y$

$\displaystyle x = -y$

$\displaystyle y = -x$

So the minimum and maximum of the function $\displaystyle f(x) = x - 3y + 1$ occur on the line $\displaystyle y = -x$ where it intersects the ellipse.