# Thread: Need help with Constrained Optimization

1. ## Need help with Constrained Optimization

Need help to continue with the following solution: Find the stationary points of the function, $\displaystyle f(x,y) = x^2 + y^2$

subject to the constraint, $\displaystyle 3x^2 + 7y^2 + 12x - 28y + 1 = 0$

$\displaystyle L_{xy \lambda} = x^2 + y^2 + \lambda (3x^2 + 7y^2 + 12x - 28y + 1)$

$\displaystyle L_x = 2x + \lambda (6x + 12)$

$\displaystyle L_y = 2y + \lambda (14y - 28)$

$\displaystyle L_ \lambda = 3x^2 + 7y^2 + 12x - 28y + 1$

$\displaystyle L_x = L_y = L_ \lambda = 0$

$\displaystyle 2x + \lambda (6x + 12) = 0$

$\displaystyle 2y + \lambda (14y - 28) = 0$

$\displaystyle 3x^2 + 7y^2 + 12x - 28y + 1 = 0 ---------[1]$

$\displaystyle x + \lambda (3x + 6) = 0$

$\displaystyle y + \lambda (7y - 14) = 0$

$\displaystyle \lambda = \frac{-x}{3x + 6}$

$\displaystyle \lambda = - \frac{y}{7y - 14}$

equating, $\displaystyle - \frac{x}{3x + 6} = - \frac{y}{7y - 14}$

$\displaystyle x(7y -14) = y(3x + 6)$

$\displaystyle 7xy - 14x = 3xy + 6y$

$\displaystyle 7xy - 3xy - 14x = 6y$

$\displaystyle 4xy - 14x = 6y$

$\displaystyle x(4y - 14) = 6y$

$\displaystyle x = \frac {6y}{4y - 14}$

Substituting for x in [1]

$\displaystyle 3 \left ( \frac{6y}{4y - 14} \right )^2 + 7y^2 + 12 \left ( \frac{6y}{4y - 14} \right ) - 28y + 1 = 0$

$\displaystyle ................$

$\displaystyle ................$

2. Originally Posted by ashura
Need help to continue with the following solution: Find the stationary points of the function, $\displaystyle f(x,y) = x^2 + y^2$

subject to the constraint, $\displaystyle 3x^2 + 7y^2 + 12x - 28y + 1 = 0$

$\displaystyle L_{xy \lambda} = x^2 + y^2 + \lambda (3x^2 + 7y^2 + 12x - 28y + 1)$

$\displaystyle L_x = 2x + \lambda (6x + 12)$

$\displaystyle L_y = 2y + \lambda (14y - 28)$

$\displaystyle L_ \lambda = 3x^2 + 7y^2 + 12x - 28y + 1$

$\displaystyle L_x = L_y = L_ \lambda = 0$

$\displaystyle 2x + \lambda (6x + 12) = 0$

$\displaystyle 2y + \lambda (14y - 28) = 0$

$\displaystyle 3x^2 + 7y^2 + 12x - 28y + 1 = 0$

$\displaystyle x + \lambda (3x + 6) = 0$

$\displaystyle y + \lambda (7y - 14) = 0$

$\displaystyle \lambda = \frac{-x}{3x + 6}$

$\displaystyle \lambda = - \frac{y}{7y - 14}$

equating, $\displaystyle - \frac{x}{3x + 6} = - \frac{y}{7y - 14}$

$\displaystyle x(7y -14) = y(3x + 6)$

$\displaystyle 7xy - 14x = 3xy + 6y$

$\displaystyle 7xy - 3xy - 14x = 6y$

$\displaystyle 4xy - 14x = 6y$

$\displaystyle x(4y - 14) = 6y$

$\displaystyle x = \frac {6y}{4y - 14}$

$\displaystyle 3 \left ( \frac{6y}{4y - 14} \right ) + 7y^2 + 12 \left ( \frac{6y}{4y - 14} \right )$
You've got the method. A hint. You've got the system of equations:

$\displaystyle 2x + \lambda (6x + 12) = 0$

$\displaystyle 2y + \lambda (14y - 28) = 0$

$\displaystyle 3x^2 + 7y^2 + 12x - 28y + 1 = 0$

Pick one to solve for $\displaystyle \lambda$ and sub this in to get two equations in x and y. It will go slightly more smoothly.

-Dan

3. That's what i'm trying to do here,

$\displaystyle 3x^2 + 7y^2 + 12x - 28y + 1 = 0 ---------[1]$

$\displaystyle x + \lambda (3x + 6) = 0$

$\displaystyle y + \lambda (7y - 14) = 0$

$\displaystyle \lambda = \frac{-x}{3x + 6}$

$\displaystyle \lambda = - \frac{y}{7y - 14}$

equating, $\displaystyle - \frac{x}{3x + 6} = - \frac{y}{7y - 14}$

$\displaystyle x(7y -14) = y(3x + 6)$

$\displaystyle 7xy - 14x = 3xy + 6y$

$\displaystyle 7xy - 3xy - 14x = 6y$

$\displaystyle 4xy - 14x = 6y$

$\displaystyle x(4y - 14) = 6y$

$\displaystyle x = \frac {6y}{4y - 14}$

Substituting for x in [1]

$\displaystyle 3 \left ( \frac{6y}{4y - 14} \right )^2 + 7y^2 + 12 \left ( \frac{6y}{4y - 14} \right ) - 28y + 1 = 0$

But I would like a simpler expression for,

$\displaystyle x = \frac {6y}{4y - 14}$

4. Originally Posted by ashura
That's what i'm trying to do here,

$\displaystyle 3x^2 + 7y^2 + 12x - 28y + 1 = 0 ---------[1]$

$\displaystyle x + \lambda (3x + 6) = 0$

$\displaystyle y + \lambda (7y - 14) = 0$

$\displaystyle \lambda = \frac{-x}{3x + 6}$

$\displaystyle \lambda = - \frac{y}{7y - 14}$

equating, $\displaystyle - \frac{x}{3x + 6} = - \frac{y}{7y - 14}$

$\displaystyle x(7y -14) = y(3x + 6)$

$\displaystyle 7xy - 14x = 3xy + 6y$

$\displaystyle 7xy - 3xy - 14x = 6y$

$\displaystyle 4xy - 14x = 6y$

$\displaystyle x(4y - 14) = 6y$

$\displaystyle x = \frac {6y}{4y - 14}$

Substituting for x in [1]

$\displaystyle 3 \left ( \frac{6y}{4y - 14} \right )^2 + 7y^2 + 12 \left ( \frac{6y}{4y - 14} \right ) - 28y + 1 = 0$

But I would like a simpler expression for,

$\displaystyle x = \frac {6y}{4y - 14}$
Sorry. I had a brain fart this morning. I see what you are doing now.

I've played with this system for a while and can't see any way to make it less of a nightmare. Whether or not you get the equation in x or in y you wind up with a quartic equation which just doesn't look like it's got nice solutions. You'll have to do it numerically. Looking at the graph of the x equation it looks like you've got 2 real solutions lurking. One is near x = 1/2 and the other is large and negative.

-Dan