Question: Cost function $f(x,y) = x^2 + y^2 + 2xy$ , constraint $g(x,y) = x+y-1 = 0$
When using the Lagrangian method of optimization to optimize this problem I came across this ambiguity.
Approach:
Lagrangian $L(x,y,\lambda) = x^2 + y^2 + 2xy - \lambda(x + y -1) $
Partial differential equations,
wrt $x$ and equate to $0$,
$2x + 2y - \lambda =0 $
wrt $y$ and equate to $0$,
$2x + 2y - \lambda =0 $
Now we have $3$ equations,
$1.$ $2x + 2y - \lambda =0 $
$2.$ $2x + 2y - \lambda =0 $
$3.$ $x+y-1 = 0$
But we observe that equations $1$ and $2$ are linearly dependent thus providing infinite number of solutions to the system of equations. Am I doing something wrong here? Or is it the fact that the chosen cost function cannot be optimized under the given constraint? Thanx in advance.
Further I've added the plots of cost function and the constraint,


You are correct; there are infinitely many solutions to the system. For you are asked to find the critical points of the function $$ f(x,y) = (x+y)^2 $$ subject to the constraint that $x+y=1$. On the constraint set, it follows that $f$ is identically one. So every point of the constraint set is a critical point of the constrained function.