# How to find the maximum area

If we have two rectangles A and B, and the rectangle A is inside B.Can any one tell me how to find the maximum area of the outer rectangle when rotate the rectangle A inside the rectangle B? I mean when rotate A inside B, it will make angle with B so the area of the outer rectangle will be a function of the angle $\theta$. So we need to find first the area function and to maximize it assuming that we know the length and width of A.

Thank you.

• I don't get it. You say $A$ is inside $B$. What is the "outer rectangle"? Is it $B$? Your questions suggests not, but it is not clear what the outer rectangle is. – Stefan Smith Apr 30 '13 at 23:30
• Yes the outer rectangle is B. – LoveMath Apr 30 '13 at 23:39
• How does the area of my living room change if I move my couch? – John Douma Apr 30 '13 at 23:58
• Describe your problem using Cartesian coordinate system.We don't get what you mean this way.. – Halil Duru May 1 '13 at 0:08
• Here's my guess as to what the question was supposed to be. Rectangle $A$ rotates. Meanwhile, rectangle $B$ keeps its sides parallel to the coordinate axes but grows and shrinks as needed so that $A$ just barely fits inside it. How large must the area of $B$ get during this process? (I'm imagining the couch in user69810's comment as an attempt to provide safety in the last part of "The Pit and the Pendulum", but I'm afraid that $B$ wasn't a rectangle.) – Andreas Blass May 1 '13 at 0:58

## 1 Answer

Following the suggestion of Andreas Blass in his comment, I'll look at the question of the varying area of the axis-alligned "bounding box" rectangle $B$ as the rectangle $A$ rotates.

Suppose $A$ has side lengths $a,b$. Put one vertex at the origin, and another at $P=(a \cos t,a \sin t)$. The vertex making the right angle at $(0,0)$ with $P$ is then at $Q=(-b \sin t, b \cos t).$ The fourth vertex, diagonally opposite $(0,0)$, ends up (using vector addition) at $$R=(a \cos t-b \sin t, a \sin t + b \cos t).$$

Now for $0 \le t \le \pi/2$ it's clear that the horizontal width of the bounding box $B$ occurs because of the points $P,Q$, i.e. the left side of the bounding box goes through $Q$ while its right side goes through $P$. Thus the width of $B$ is the difference of $x$ coordinates of $P,Q$, i.e. $a \cos t + b \sin t$. At the same time the height is due to the origin and the point $R$ and is the difference of their $y$ coordinates, i.e. the height of $B$ is $a \sin t + b \cos t$.

This gives the area $A(t)$ of the bounding box, in terms of $t$ with $0 \le t \le \pi/2$, as $$A(t)=( a \cos t + b \sin t)(a \sin t + b \cos t).$$ After applying pythagoras' identity and a double angle formula we can rewrite $A(t)$ in the convenient form $$A(t)=ab+\sin(2t)\frac{a^2+b^2}{2}.$$ This makes it clear that the maximum area of $B$ occurs when $t=\pi/4$ where the sine term is $1$, making the maximal area $$ab+\frac{a^2+b^2}{2}=\frac{(a+b)^2}{2}.$$ Side note: the bounding rectangle turns out to be a square at angle 45 degrees from the $x$ axis, with the rotating rectangle $A$ going along diagonal of the bounding box (bounding square). That makes me think there is some kind of symmetry here which would make a more geometric argument possible.