<s>[INST] Find Rectangle of Constant Perimeter whose diagonal is maximum (My attempt with Lagrange Multipliers) Question is to Find Rectangle of Constant Perimeter whose diagonal is maximum (My attempt with Lagrange Multipliers)  .
I took rectangle with sides $x$ and $y$  .
Since Perimeter is constant so i took $2(x+y) = 2k$  , where k is any constant
And diagonal is $\sqrt{x^{2}+y^{2}}$
So i took $f(x,y)$ = $x^{2}+y^{2}$
And $g(x,y)$ which is constraint as $2(x+y-k)=0$
On solving By routine Lagrange Muliplier Method i get $x = k/2 = y$  ...So rectangle is a square ..Are conditions i have taken for to apply Lagrange Multiplier is correct here ?? (i men f , g )...Thanks
 [/INST] A simpler approach:
If the perimeter is
$2a$,
the sides are
$x$ and $a-x$.
If $d$ is the diagonal,
$\begin{array}\\
d^2
&=x^2+(a-x)^2\\
&=x^2+a^2-2ax+x^2\\
&=2x^2-2ax+a^2\\
&=2(x^2-ax+a^2/2)\\
&=2(x^2-ax+a^2/4+a^2/4)
\text{   (completing the square)}\\
&=2((x-a/2)^2+a^2/4)\\
\end{array}
$
This is maximized when
$(x-a/2)^2$ is maximized,
i.e.,  when
$x=0$ or $x=a$
(since $0 \le x \le a$)
and has a value of
$a^2$,
so
$d = a$.
If you are not allowed
to have a rectangle
with a side of length zero,
then you can get as cloase as you want,
but can never reach this value.
This is minimized when
$x=a/2$
and has a value of
$a^2/2$,
so the result is a square
with diagonal
$a/\sqrt{2}$.
</s>