Substitution method
sum of x and y is 1. i.e. x + y = 1, therefore this can be written as, y = (1 - x)
f(x,y) = x(1 - x)
fx = 1 - 2x
Hence, x =1/2
Lagrangian multiplier method
We know that, x + y = 1. This can be written as 1 - x - y = 0
L= f(x,y) + λ(1 - x - y)
Taking the first order condition, we get;
∂L/∂x = y - λ
∂L/∂y = x - λ
∂L/∂λ = 1- x - y
y - λ = 0
y =λ
x - λ = 0
x = λ
Therefore, x = y
1 -x - y = 0
1 = x + y
Since y = x, then 1 =x + x
1 = 2x
Therefore, x = 1/2
Comments
Leave a comment