A rectangle is inscribed in a semicircle of radius r with one of its sides on the diameter of the semicircle .Find the dimensions of the rectangle so that its area is maximum.Also find the maximum area.

Rohit Raj's image