F(x,y) = x^2y – y^2x
The constraint is x^2 + y^2 <=1
Let g(x,y) = x^2 + y^2 – c = 0, where c = 1 – k, 0 <= k <= 1.
Let G(x,y,λ) = F(x,y) – λg(x,y)
G = x^2y – y^2x – λ(x^2 + y^2 – c)
Now take the three partial derivatives and set them to zero.
dG/dx = 2xy – y^2 – 2λx = 0
dG/dy = x^2 – 2yx – 2λy = 0
dG/dλ = x^2 + y^2 – c = 0
Adding together the first two equations above,
x^2 – y^2 – 2λ(x + y) = 0
(x + y)(x – y – 2λ) = 0
Solutions: x = -y, or x – y = 2λ
But if x = -y, and x – y = 2λ, then this gives λ = -y.
However, λ = -y is inconsistent with the rest of the equations, so ignore that solution, thus giving the only solution as
x = -y
Substituting for x = -y into either of the first two partial differential equations, we get
3y^2 - 2λy = 0
y(3y - 2λ) = 0
λ = 3y/2. Ignore the trivial solution, y = 0.
Now, F = x^2y – y^2x
Using x = -y,
F = y^3 + y^3
F = 2y^3
F = 2y(c – x^2)
Looking at the above, we can see that F is at a maximum for y positive and c = 1, which means that k = 0.
Since k = 0, then the constraint is x^2 + y^2 = 1.
Using x = -y in the constraint,
2y^2 = 1
y = +/- 1/sqrt(2)
x = -/+ 1/sqrt(2)
But we need y positive, hence x is negative.
So the solutions are: x = -1/sqrt(2), y = 1/sqrt(2)
Fmax = 2y^3 = 2/(2sqrt(2)) = 1/sqrt(2)