# Max/min problem - show that diagonal is least when rectangle is a square.

A rectangle has constant area, show that the length of a diagonal is least when the rectangle is a square. $$Area (a) = xy$$

$$y=\dfrac{a}{x}$$

$$D^2 = x^2 + y^2$$

$$D^2 = x^2 + (\dfrac{a}{x})^2$$

$$\dfrac{dD^2}{dx} = 2x - \dfrac{2a^2}{x^3}$$

$$2x - (\dfrac{2a^2}{x^3})=0$$

$$x=a^\dfrac{2}{4}$$

$$x=\sqrt{a}$$

$$\dfrac{d^2D^2}{dx^2}=2+\dfrac{6a^2}{x^4}$$

$$2+\dfrac{6a^2}{x^4}>0, minima$$

$$y=\dfrac{a}{\sqrt{a}}$$

$$y=\sqrt{a}$$

Is this correct? I'm assuming it is since the length of $x$ and $y$ are the same..sorry, I don't usually get these questions right and just wanted to make sure this is the way to do it.

Thank you.

• you may want to show its a minima by the second derivative. Otherwise looks ok. – Macavity Jun 20 '15 at 10:50
• I added the second derivative test, hope that's okay – Modrisco Jun 20 '15 at 11:00
• I would make two changes. First you should justify taking the derivative of $D^2$ rather than $D$. This is easy because $f(D)=D^2$ is monotonic for positive $D$. Secondly, follow @Macavity's advice on the second derivative test. – Deepak Jun 20 '15 at 11:02
• @Deepak I did a second derivative test (I've edited the question with these changes)..not sure what you mean by the 1st change, was it wrong to take the derivative of $D^2$ as opposed to $D$? I did that to make it simpler to derive...how do I justify? sorry about this. – Modrisco Jun 20 '15 at 11:16
• It is ok here because maximising $D^2$ is the same as maximising $D$, but that is only because $x^2$ is an increasing function for positives. So a line of justification for that step is warranted as @Deepak says. – Macavity Jun 20 '15 at 12:00

## 2 Answers

the proof above is ok, since $x^2+y^2\geq 2xy$ and this is equivalent to $(x-y)^2\geq 0$ and the equal sign holds if $x=y$ this means we have a square.

$D =\sqrt{x^2+y^2} \geq \sqrt{2xy}=K$, constant. Thus equality occurs when $x = y$, or you have a square.

• Both the inequality and the condition for equality are far from obvious. Could you expand and clarify? – Rory Daulton Jun 20 '15 at 11:24
• @RoryDaulton $(x-y)^2\ge0\implies x^2+y^2\ge 2xy$ with equality iff $x=y$. – Peter Woolfitt Jul 15 '15 at 6:06