Extrema of a multivariable function

1. The problem statement, all variables and given/known data
Show that among all parallelograms with perimeter [tex]l[/tex], a square with sides of length [tex]l/4[/tex] has maximum area. Do this using the second partials test, and then using Lagrange multipliers.

2. Relevant equations
Area of a parallelogram: [tex]A = absin\phi[/tex], where a and b are the lengths of two adjacent sides and [tex]\phi[/tex] is the angle between them.

Second partials test: [tex]D=f_{xx}f_{yy} - f_{xy}^{2}[/tex]

Method of Lagrange multipliers: [tex]\nabla f=\lambda\nabla g[/tex]

3. The attempt at a solution
To do it using the second partials test, I would have to reduce A to a function of two variables. I know this has to do with expressing [tex]\phi[/tex] as a function of [tex]a[/tex] and [tex]b[/tex]. After this, I'm stuck.

For the Lagrange multipliers method, I can use [tex]A(a,b)[/tex] as the function to be maximized and use [tex]g(a,b)= 2a + 2b - l[/tex] as the constraint equation. However, I'm still stuck on how to reduce [tex]A[/tex] to a function of two variables. Any help?

Actually you don't really have to take [tex]\phi[/tex] into consideration. Can you show that one particular critical point occurs when a=b? So geometrically that reduces the possibilities to either a square or a rhombus. Since the area function you want to maximise is given by [tex]ab\sin \phi[/tex] and a=b, it's easy to tell that the expression is maxed when [tex]\phi = \frac{\pi}{2}[/tex].