Wow, Lagrange multipliers in high school!
As a rule with these Lagrange multiplier problems, when the problem is symmetrical with respect to interchange of the variables, the solution almost always ends up with all the variables equal -- what else could it be?
We want to maximize the area of a rectangle with sides x and y subject to the perimeter being constant.
(i)
The area of a rectangle is just the product of its sides:
A = f(x,y) = xy
(ii)
The perimeter of a rectangle is the sum of its sides:
P = g(x,y) = x + x + y + y = 2x+2y
(iii)
Usually I like to form the objective function E=f-λg before I take the derivatives. I usually use a lambda not a gamma for the multiplier.
Let's do what they ask. They want the gradient ∇f(x, y)
[tex]f(x,y)=xy[/tex]
[tex]\dfrac{\partial f}{\partial x} = y[/tex]
[tex]\dfrac{\partial f}{\partial y} = z[/tex]
∇f(x, y) = (y, x)
(iv)
[tex]g(x,y) = 2x+2y[/tex]
[tex]\dfrac{\partial G}{\partial x} = 2[/tex]
[tex]\dfrac{\partial G}{\partial y} = 2[/tex]
λ∇g(x, y) = (2λ, 2λ)
(v)
I'm not sure what γ=1/2y is about; I'll solve it like I know how and see where we are.
[tex]E = f - \lambda g = xy - 2\lambda(x+y)[/tex]
[tex]0=\dfrac{\partial E}{\partial x} = y -2\lambda[/tex]
There it is. We get
y = 2λ
[tex]0=\dfrac{\partial E}{\partial y} = x -2\lambda[/tex]
so we also find
x = 2λ
(vi)
We have y=x=2λ so we've shown the variables are equal, i.e. our rectangle is a square. We can solve for λ using our constraint:
P = 2x+2y = 8λ
λ=P/8
so as expected we have a square with side length P/4:
x=y=2λ=P/4