from the diagram we see that the area of the rectangle in the first quadrant is so the total area is

solving for x in the ellipse we get

subbing into the Area formula we get

taking the derivative

setting the numerator equal to zero we get

subbing y into the equation for x we get

So The area of the whole rectangle is