Finding an expression for the area of the trapezoid as a function of the angle of the flaps to the vertical, is the real meat of the problem.

First, remember that for an isosceles trapezoid with top and bottom bases , and height . According to the picture, , so the area is

I think you can take it from there.