When we take our Lagrangian and we include non-negativity constraints. If a variable $x = 0$ do we take FOC first or set $x=0$ first?


$Max \; L(x, y, λ) = f(x,y) - λ_1(g(x,y) - k) - λ_x(-x) - λ_y(-y)$

Or alternately written as :

$Max \;(x, y, λ) = f(x,y) + λ_1(k - g(x,y)) +λ_x(x) + λ_y(y)$

In the case where one of our variables is actually = 0, E.g. $x=0$ hence $λ_x > 0$

  1. Do we differentiate first getting the FOC.

$\frac{\partial d}{\partial x} = f_x - λ_1g_x + λ_x \le 0$

  1. Or do we take $x = 0$ first and then derive our FOC.

$\frac{\partial d}{\partial x} = f_x - λ_1g_x\le 0$

  • The reason i ask is that i assumed it would be the first way. Because otherwise what is the point of the Lagrange multiplier for the non-negativity constraint. Either it's 0 because $x > 0$ or it disappears because we get $λ(0) = 0)$ in the Lagrangian.

  • The mark scheme for this question i asked here would suggest it's actually the second approach? This tiny thing ruined the rest of my analysis, as the following questions relied on their being no $λ_κ$.

  • This problem is really bugging me as exam commentaries are incredibly vague as to when they subtly do and don't use non-negativity constraints. Please let me know your thoughts, thanks!

  • $\begingroup$ Do you mean that $x=0$ is part of the given information? Or just that $0$ has to be considered as a possible value of $x$? $\endgroup$ May 3, 2023 at 16:42
  • $\begingroup$ Yes that x = 0 has to be considered in our cases . I.e. the question provides us with no immidiate intuition as to why we can dismiss x = 0. The quetsion I link to at the end, is from an exam and did exactly this with k. $\endgroup$
    – CormJack
    May 3, 2023 at 18:52
  • $\begingroup$ It’s actually the question that sparked all this for me. As they didn’t explicitly use a non-negativity constraint, but produced a result kind of as if they had assumed a binding non-negativity constraint. $\endgroup$
    – CormJack
    May 3, 2023 at 18:53

1 Answer 1


The way I’d do it is to simply optimize the usual Lagrangian

$\mathcal{L} = f(x,y) + \lambda (k - g(x,y))$.

If all variables end up being non-negative, that is your solution.

If any variable, let’s say $x$ ends up being negative, you take $x^\star = 0$ in your optimal solution, then substitute and solve for the other variables.

An alternative way to solve it but a bit more complicated is to optimize the bigger Lagrangian you proposed

$\mathcal{L}(x, y, λ) = f(x,y) + λ_1(k - g(x,y)) +λ_x(x) + λ_y(y)$.

When the variables would’ve still been non-negative without adding the non-negativity constraints, you’d get $\lambda_x = \lambda_y = 0$.

This could be interpreted as the constraints being non-binding, therefore representing no marginal benefit/cost as in your other question: Lagrange Multiplier Dual Meaning?

  • $\begingroup$ Hi Nicholas, thanks again for this! I appreciate wha you are saying here, and in principle it make sense. If no $x \le 0$, then all those non-negativity constraints disapear. However my concern is for when we "test" for $x = 0$. With the context of this question in mind, I'd be so grateful if you could check out the linked question below. In it my original question at the top, and then i post an answer trying to clarify the question further. Thanks so much! economics.stackexchange.com/questions/55161/… $\endgroup$
    – CormJack
    May 6, 2023 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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