Find the rectangle with the maximum area inside the ellipse $\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$ 
Find the rectangle with the maximum area inside the ellipse $\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$, whose edges are parallel to the axises. Hint: Find the function we need to maximize.

Well in the answers it says that the function we need to maximize is $4xy$ and the area is $2ab$. How do we solve this?
 A: Consider the first quadrant for simplicity. 
Let $x = a\cos \theta$, $y =b\sin \theta$, then the area of the rectangle in the first quadrant is 
$$
A = xy = \frac12ab\sin(2\theta)
$$
As $0\le\sin(2\theta)\le 1$, we can see the maximum area of $A_{\max}$ is $\frac12ab$.
Because of the axial symmetry of the ellipse about both $X$ and $Y$ axis, the  maximum area of the rectangle inside the ellise would be $4A_{\max}$, that is, $2ab$.
A: A comment has suggested extending this to include rectangles whose sides may not be parallel to the axis. The way to do this is to extend even more and consider any inscribed quadrilateral. To simplify this, stretch everything vertically by $\sqrt\frac{a}{b}$, and compress horizontally by the same factor. This transforms the ellipse into a circle of radius $\sqrt{ab}$ . Areas are preserved, straight lines remain straight lines, and parallel lines remain parallel. Now it is easy to show that in a circle, any inscribed square will have the maximum area of $2r^2$, and any other inscribed quadrilateral will have less. Now transform back to the original geometry. The inscribed squares become inscribed parallelograms of area $2ab$. Only one of these will be a rectangle, with sides parallel to the axis. This is the only one which preserves the right angles under transformation. So in particular, any other inscribed rectangle will have less area.
A: Another solution is:
the area of rectangle with one vertex $(x,y)$ (in the first quadrant) is $4xy$. From the equation of ellipse we can express $y$ by terms of $x$, as $y=b\sqrt{1-\frac{x^2}{a^2}}$, so the function to maximize is
$$A(x)=4x\cdot b\sqrt{1-\frac{x^2}{a^2}}$$
We can then apply the inequality of geometric and arithmetic means for the positive numbers $\frac{x^2}{a^2}$ and $1-\frac{x^2}{a^2}$ to get the solution.
