Wikipedia:Reference desk/Archives/Mathematics/2017 January 31

= January 31 =

Lagrangian problem redux
A thread from January 27 posed the problem of finding the extrema of  $$f(x,y)=x-2y^2$$ subject to $$g(x,y)=x^2+y^2-1=0.$$The first-order conditions for the Lagrangian expression are $$1-2\lambda x=0$$ and  $$-4y-2\lambda y=0$$ and  $$x^2+y^2-1=0.$$ The solution I gave there was as follows:


 * Solving your first order conditions for x and y in terms of $$\lambda$$ gives y=0 and x=$$\frac{1}{2\lambda}.$$ Using these in the constraint allows you to solve for $$\lambda =\pm 1/2.$$ Using this in the earlier provisional solution for x gives x=1 and x=–1. Using these in the objective function f gives f= 1 and f=–1.

(A) My confusion is that when I check the second-order condition via the bordered Hessian, I find that these are both local maxima. So there have to be two local minima on the unit circle. But since the Lagrange multiplier approach gives necessary conditions for a local extremum, it implies that there are no other local extrema. Why isn't this approach giving the local minima?

(B) The following approach finds only the local minima. Solve the constraint for y and substitute into f to get  the objective function $$h(x)=x-2(1-x^2)$$ (subject to x in the range [–1, 1], which turns out not to be binding). When I solve this, I get $$(x,y)=(-1/4,\pm \sqrt{15/16},)$$ both of which give f=h=–17/8, which the second-order condition shows are minima. Why doesn't this approach give the maxima too?

(C) If I use the approach in (B) but solve out first for x in terms of y, I get all four local extrema.

Why don't all three approaches give all four local extrema? Loraof (talk) 18:08, 31 January 2017 (UTC)


 * Did you forget $$\lambda = -2$$ which was the first solution that was found there for $$-4y-2\lambda y=0$$? Dmcq (talk) 18:53, 31 January 2017 (UTC)


 * Thanks, yes, I missed that.
 * (A) But why didn't my approach in my indented paragraph above find that? I treat the FOCs as a 2-variable system parametric on lambda:
 * $$2\lambda x+\, 0y\quad \, \,\,\,\,\,=1$$
 * $$0x+(2\lambda +4)y=0.$$
 * Using Cramer's rule I get $$x=1/2\lambda,$$ and $$y=0.$$ Using this in the unit circle constraint gives $$\lambda=\pm1/2.$$ What happened to the solution $$\lambda = -2$$?
 * Ah, I see it now: My denominator in Cramer's rule is zero when lambda= –2, so by doing Cramer's rule I implicitly assumed away that case.


 * (B) My other question remains: why didn't method (B) give all four solutions? Loraof (talk) 20:06, 31 January 2017 (UTC)


 * If you are optimizing something over a closed interval, you must also check the endpoints. --JBL (talk) 21:13, 31 January 2017 (UTC)
 * Silly me--thanks! Loraof (talk) 21:51, 31 January 2017 (UTC)