U can also solve it using

as the variable.(see figure)
'r' being the radius of the given semicircle,
Let 'l' and 'b' be the length and breadth of the rectangle.
So,l=2rcos

b=rsin

so, area A=2r
2sin

cos

=r
2sin2

dA/d

= r
2cos2

x2
for maximum area,
dA/d

=0
or,r
2cos2

x2
i.e,cos2

=0
putting the value of

in the length and breadth ,u get the dimensions of the rectangle
l=

2xr
b=r/

2
so,
A=r2