Where the semicircle has radius of 3 and the rectangle with height x and width y touches the edges of the semicircle.

My thoughts are

Area (rectangle) = [semicircle] - [2 segments]

where the area a segment is \(\displaystyle \frac{1}{2}(\theta-\sin\theta)r^2\)

\(\displaystyle A = \frac{1}{2} \pi \times 3^2 - f(x,y,\theta)\)

I need to find where \(\displaystyle A' = 0\)

and I also think \(\displaystyle \tan\frac{\theta}{2} = \frac{y}{2x}\)

I have all these relationships yet I can't reduce it to one variable.

You can use Pythagoras' theorem or trigonometry.

If x=half the length of the rectangle and y=height,

then the x giving max area for a half rectangle will give max area for the full rectangle.

So you can just work with a quadrant.

\(\displaystyle Sin\theta=\frac{y}{R}, Cos\theta=\frac{x}{R}\)

\(\displaystyle xy\ =\ area\ of\ half-rectangle\ =\ R^2Sin\theta\ Cos\theta\)

Minimum area is zero, so you can easily solve for maximum area.

Differentiate the area function with respect to the angle and equate to zero.

\(\displaystyle 2SinACosB=Sin(A+B)+Sin(A-B)\)

\(\displaystyle Sin\theta\ Cos\theta=0.5\left(Sin2\theta+Sin0\right)=0.5Sin2\theta\)

Hence find \(\displaystyle \frac{d}{d\theta}Sin2\theta=0\)

\(\displaystyle 2Cos2\theta=0\ \Rightarrow\ Cos2\theta=0\ \Rightarrow\ 2\theta=\frac{{\pi}}{2}\)

Maximum area of the rectangle is \(\displaystyle 2R^2(0.5)Sin\frac{{\pi}}{2}=R^2\)