I need to find max and min of $f(x,y)=x^3 + y^3 -3x -3y$ with the following restriction: $x + 2y = 3$.

I used the multiplier's Lagrange theorem and found $(1,1)$ is the minima of $f$. Apparently, the maxima is $(-13/7, 17/7)$ but I could not find it via Lagrange's theorem.

Here's what I did:

I put up the linear system:

$\nabla f(x,y) = \lambda \, \nabla g(x,y)$

$g(x,y) = 0$


$(3x^2 -3, 3y^2 -3) = \lambda (1,2)$

$x + 2y -3 = 0$

Solving for $\lambda$, I got $\lambda = 0$, which gave me $x = 1$ and $y = 1$.

How can I find the maxima if lambda only gives one value which is $0$?

  • 1
    $\begingroup$ no global maximum or global minimum. One local for each. As a one variable problem, take $x= 1 + 2 t,$ $ y = 1 - t$ as a parametrization of the constraint (line), calculate $x^3 + y^3 - 3x - 3y$ in terms of $t$ $\endgroup$
    – Will Jagy
    Dec 2 '20 at 17:45
  • 1
    $\begingroup$ "But I need to use Lagrange's theorem...". If I had known that, then I wouldn't have answered. Unfortunately, I'm not familiar with this theorem. I have therefore removed my answer. It would help if (for next time), you try to make your query very clear. $\endgroup$ Dec 2 '20 at 18:07
  • $\begingroup$ @user2661923 The last line of the question is: "How can I find the maxima if $\lambda$ only gives one value which is $0$?" It is clear that the OP is trying to solve this problem a certain way and got stuck. $\endgroup$
    – Théophile
    Dec 2 '20 at 18:26
  • $\begingroup$ @Théophile Yes, that was clear. What was not clear was that he was required to use the method for which he was stuck. Given how off-the-wall many mathSE queries are, re an OP often taking unusual avenues, I was fully justified in answering the query that he originally posed, which is "how do I determine the minimum and maximum values?" $\endgroup$ Dec 2 '20 at 18:34
  • $\begingroup$ @user2661923 Yes, there are many questions on MSE that are missing context or necessary information. This is not one of them; the OP specifically asked what went wrong with $\lambda$. You chose to take a different avenue because you are unfamiliar with Lagrange's Theorem. Rather than getting upset, why not take this as an opportunity to learn the theorem? :) $\endgroup$
    – Théophile
    Dec 2 '20 at 18:43

As others have said, you don't necessarily need to use Lagrange multipliers. But since you've set up the system, we can see what happens:

$$ 3x^2-3=\lambda\\ 3y^2-3=2\lambda\\ x+2y-3=0 $$

From the first two equations, we have $3y^2-3=2(3x^2-3)$, which simplifies to $y^2-1=2(x^2-1)$. Rearranging the linear constraint, we have $x=3-2y$. Putting this information together leads to $$7y^2-24y+17=0.$$

You could solve this using the quadratic formula, but it is quicker to observe that $-24 = -7-17$:


and so $(7y-17)(y-1)=0$.

This will give you the two local extrema.

  • $\begingroup$ Right, I found the maxima as (-13/7, 17/7) but if I plug this pair into the hessian function (det = | (6x, 0), (0,6y)| and I get a negative value, which means this point is not local extrema. Why this contradiction? $\endgroup$ Dec 2 '20 at 18:26
  • $\begingroup$ @Brasilian_student Good question. Keep in mind that the point in question is not actually a critical point of $f(x,y)$ because it does not satisfy $f_x(x,y)=f_y(x,y)=0$. Rather, it is only an extreme point with respect to the restriction $x+2y=3$. On the other hand, $(x,y)=(1,1)$ is an extreme point of $f$. $\endgroup$
    – Théophile
    Dec 2 '20 at 18:39

This is from your working -

$(3x^2 -3, 3y^2 -3) = \lambda (1,2)$

$3x^2 - 3 = \lambda, 3y^2-3 = 2\lambda$

Equating $\lambda$ from both equations,

$6x^2-6 = 3y^2-3 \implies 2x^2 - y^2 = 1$

Substitute $x$ from $x+2y = 3$

$2(3-2y)^2 - y^2 = 1$

$\implies 7y^2 - 24y + 17 = 0 \, $ or $(7y-17)(y-1) = 0$

Can you take it from here and find possible points for extrema?


In this case, it is really not a great idea to use Lagrange multipliers. We can write $x$ in terms of $y$ (or vice-versa) using the restriction and reduce this question to a one variable optimisation problem. Substituting $x = 3 - 2y$, the problem reduces to finding the extrema of $f(y)=-7 y^3+36 y^2-51 y+18$. The critical points are $y = \frac{17}{7}$ and $y = 1$ and, considering that $f''(1)>0$ and $f''(\frac{17}{7})<0$, they are a local minimum and maximum, respectively.

It is also worth noticing that, since $\displaystyle \lim_{y \to \pm \infty} f(y) = \mp \infty$, there will not be any global extrema.

  • 2
    $\begingroup$ It is useful to leave some comment together with a downvote. I totally accept the down vote, but would be happy to improve the answer. $\endgroup$ Dec 2 '20 at 17:57
  • 1
    $\begingroup$ @AnindyaPrithvi Thanks for the feedback. I'll make some changes to the answer. Regarding the Lagrange multipliers, it was a very conscious option not to use them: I think that this a bad illustration of their use because the results are weaker than changing to a 1d problem. $\endgroup$ Dec 2 '20 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.