Prove that the rectangle of greatest perimeter which can be inscribed in a given circle is a square. The result changes if, instead of maximising the sum of lengths of sides of the rectangle, we seek to maximise the sum of $n$th powers of the lengths of those sides for $n\geqslant 2$. What happens if $n=2$? What happens if $n=3$? Justify your answers.