For symmetry reasons we can assume the rectangle has sides parallel to the axes. In such case if the corner in the first quadrant is the point P(a,b)P(a,b) with 0< a,b < 10<a,b<1. The coordinates of the others are P(+-a,+-b)P(±a,±b) with the constraint:
a^2+b^2 = 1a2+b2=1
so that:
b= sqrt(1-a^2)b=√1−a2
and the perimeter is:
P= 2a+2b = 2(a+sqrt(1-a^2))P=2a+2b=2(a+√1−a2)
Evaluate the first derivative:
(dP)/(da) = 2-(2a)/sqrt(1-a^2)dPda=2−2a√1−a2
And identify critical points solving the equation:
(dP)/(da) = 0dPda=0
1= a/sqrt(1-a^2)1=a√1−a2
a= sqrt(1-a^2)a=√1−a2
a^2 = 1-a^2a2=1−a2
a=1/sqrt2a=1√2
Evaluate the second derivative:
(d^2P)/(da^2) = (-2sqrt(1-a^2)-2a/sqrt(1-a^2))/(1-a^2)d2Pda2=−2√1−a2−2a√1−a21−a2
(d^2P)/(da^2) = (-2(1-a^2)-2a)/((1-a^2)sqrt(1-a^2))d2Pda2=−2(1−a2)−2a(1−a2)√1−a2
(d^2P)/(da^2) = (-2-2a^2-2a)/((1-a^2)sqrt(1-a^2)) <0d2Pda2=−2−2a2−2a(1−a2)√1−a2<0
so that the critical point is a local maximum.
Then the perimeter is maximum when a=b=1/sqrt2a=b=1√2 and the rectangle is a square.