# Lagrange Multiplier question

Given a utility function $R(x,y) = x(100-6x) + y(192-4y)$ and a constraint equation $C(x,y) = 2x^2+2y^2+4xy-8x=-20$, maximize.

As usual with Lagrange, I got stuck on the juicier part of solving a set of equations: Lagrangian function $L = x(100-6x) + y(192-4y) - \lambda(2x^2+2y^2+4xy-8x+20)$

$$L_x = 100−12x-λ(4x+4y−8)$$

$$L_y = 192-8y-4\lambda(x+y)$$

setting $L_x$ and $L_y$ to 0, I get $12x+\lambda(4x+4y-8)$ = 100 and $8y-4\lambda(x+y) = 192$

And here's where I got stuck. Anyone have any ideas?

-
You should also compute $\frac{dL}{d\lambda}$ and set that to 0. – tards Nov 13 '11 at 1:45
I'm not getting the same first equation as you. I get $100-12x=\lambda(4x+4y-8)$. – Grumpy Parsnip Nov 13 '11 at 2:05
Oh whoops, my bad. – khchan Nov 13 '11 at 2:22

It will help somewhat in discussing results for this problem to make a geometrical interpretation. The "level curves" of the utility function

$$R(x,y) \ = \ x \ (100 - 6x) \ + \ y \ (192 - 4y) \ = \ U \$$

can be represented as ellipses

$$-6x^2 \ + \ 100x \ - \ 4y^2 \ + \ 192y \ = \ U$$ $$\Rightarrow \ \ 6 \left(x^2 \ - \ \frac{50}{3}x \ + \left[ \frac{25}{3} \right]^2 \right) \ + \ 4 \left(y^2 \ - \ 48y \ + \ 24^2 \right) \ = \ -U \ + \ 6 \cdot \left[ \frac{25}{3} \right]^2 \ + \ 4 \cdot 24^2$$

$$\Rightarrow \ \ 6 \left(x \ - \frac{25}{3} \right)^2 \ + \ 4 \left(y \ - \ 24 \right)^2 \ = \ \frac{3750}{9} \ + \ 2304 \ - \ U$$

$$\Rightarrow \ \ \frac{\left(x \ - \frac{25}{3} \right)^2}{(8162 - 3U)/18} \ + \ \frac{\left(y \ - \ 24 \right)^2}{(8162 - 3U)/12} \ = \ 1 \ \ .$$

The equation for the ellipses in standard form makes clear that they become smaller as $\ U \$ increases.

The constraint function $\ C(x,y) \ = \ 2x^2 \ + \ 2y^2 \ + \ 4xy \ - \ 8x \ + 20 \ = \ 0 \$ is specified by an equation in general form for a conic section. The relation between the quadratic and "mixed term" coefficients, $\ 4^2 \ - \ 4 \cdot 2 \cdot 2 \ = \ 0 \$ tells us that this is a parabola; since the quadratic coefficients are equal, this parabola is rotated 45º relative to the coordinate axes. Under the substitution $\ x \ = \ \frac{x' \ + \ y'}{\sqrt{2}} \ \ , \ \ y \ = \ \frac{-x' \ + \ y'}{\sqrt{2}} \$ , this equation for the conic section becomes

$$4 \ y \ ' \ ^2 \ - \ 4 \sqrt{2} \ y' \ = \ 4 \ \sqrt{2} \ x' \ - \ 20$$ $$\Rightarrow \ \ 4 \left( y \ ' \ ^2 \ - \ \sqrt{2} \ y' \ + \ \left[ \frac{\sqrt{2}}{2} \right]^2 \right) \ = \ 4 \ \sqrt{2} \ x' \ - \ 20 \ + \ 4 \cdot \left[ \frac{\sqrt{2}}{2} \right]^2$$

$$\Rightarrow \ \ 4 \left( y \ ' \ - \ \frac{\sqrt{2}}{2} \right)^2 \ = \ 4 \ \sqrt{2} \ x' \ - \ 20 \ + \ 2 \ \ \Rightarrow \ \ \left( y \ ' \ - \ \frac{\sqrt{2}}{2} \right)^2 \ = \ \sqrt{2} \ \left(x' \ - \ \frac{9\sqrt{2}}{4} \right) \ \ .$$

The "focal distance" of this parabola is $\ p \ = \ \frac{\sqrt{2}}{4} \$ , and in the transformed plane, its vertex lies at $\ (x \ ' , \ y \ ') \ = \ \left( \frac{9\sqrt{2}}{4} \ , \frac{\sqrt{2}}{2} \right) \$ . Its focus is thus located at $\ (x \ ' , \ y \ ') \ = \ \left( \frac{5\sqrt{2}}{2} \ , \frac{\sqrt{2}}{2} \right) \$ and the "upper" endpoint of its latus rectum, at $\ (x \ ' , \ y \ ') \ = \ \left( \frac{5\sqrt{2}}{2} \ , \ \sqrt{2} \right) \$ . Transforming these points back into the original plane, they lie at $\ (x , \ y) \ = \ \left( \frac{11}{4} , \ -\frac{7}{4} \right) \$ [vertex] , $\ \left( 3 , \ -2 \right) \$ [focus] , and $\ \left( \frac{7}{2} , \ -\frac{3}{2} \right) \$ [endpoint of latus rectum] . The graph below presents the situation.

The level curve for the utility function $\ R \$ for $\ U \ = \ 0 \$ is the blue ellipse, with the lines of its horizontal and vertical axes shown; the constraint parabola is drawn in red, with its symmetry axes and line of latus rectum marked. The "close-up" graph at right shows the curves where they come close to meeting.

We find that the chosen level curve comes quite close to contacting the constraint parabola. From the above equation for the ellipses, we see that smaller values of $\ U \$ would make the ellipse intersect the parabola, while larger values would cause it to miss the constraint entirely. So we are in fact in the process of determining the maximal value for $\ U \$ , and that said value will be something close to zero.

We can confirm that estimate by noting that the tangent point between the appropriate level curve of the utility function and the constraint curve falls in the vicinity of that upper endpoint of the latus rectum . The distance from the center of the elliptical level curves to that point is

$$s \ = \ \sqrt{ \ \left( \frac{25}{3} \ - \ \frac{7}{2} \right)^2 \ + \ \left( 24 \ - \ \left[ -\frac{3}{2} \right] \ \right)^2} \ \approx \ 25.95 \ \ .$$

This is pretty close to the length of the "semi-vertical axis" of the level ellipse for $\ U \ = \ 0 \$ , which is $\ b \ = \ \sqrt{\frac{8162}{12}} \ \approx \ 26.08 \$ . So we would expect the maximal value for $\ U \$ not to be far from zero.

We could, of course, simply use a graphing device to experiment with various values of $\ U \$ to see the approximate value for which a point of tangency can be produced. We find that $\ U \ = \ -1 \$ doesn't quite reach the constraint parabola [in red], while $\ U \ = \ -2 \$ crosses the parabola at two points. So we have a candidate interval of $\ -2 \ < \ U \ < -1 \$ for the maximal value of the utility function.

We would like to improve on this estimate by applying Lagrange multipliers. As you discovered, however, an algebraic solution alone is not very helpful. We can conclude that

$$\lambda \ = \ \frac{25 \ - \ 3x}{x \ + \ y \ - \ 2} \ = \ \frac{48 \ - \ 2y}{x \ + \ y} \ \ \Rightarrow \ \ 3x^2 \ - \ 2y^2 \ + \ xy \ + \ 23x \ + \ 27y \ - \ 96 \ = 0$$

is the (rotated) hyperbola on which the tangent point between the maximal utility level curve and the constraint parabola lies (the lines $\ x \ + \ y \ = \ 0 \$ and $\ x \ + \ y \ = \ 2 \$ are excluded). Unfortunately, combining this last equation with that for either the parabola or the ellipses doesn't present a convenient algebraic solution. Instead, we will just graph the "Lagrange" hyperbola [in blue] and the constraint parabola [in red]; the excluded lines are in black:

The tangent point is found to lie very nearly at $\ (x, \ y) \ = \ (4.25, \ -1.60) \$ . Upon inserting these coordinates into the level ellipse equation, we obtain

$$6 \left(4.25 \ - \frac{25}{3} \right)^2 \ + \ 4 \left( \ [-1.60] \ - \ 24 \right)^2 \ = \ \frac{8162}{3} \ - \ U$$

$$\Rightarrow \ \ U \ = \ \frac{8162}{3} \ - \ 6 \cdot 16.67 \ - \ 4 \cdot 655.36 \ \approx \ -1.4 \ \ .$$

It should be noted that our result is rather sensitive to "round-off errors", but we can reasonably conclude that the maximum value for the utility function under the given constraint is $\ R(4.25, \ -1.60) \ \sim \ -1 \$ .

-