Find the rectangle of largest area that can be inscribed in a semicircle of radius r, assuming that one side of the rectangle lies on the diameter of the semicircle.