It's another late night studying calculus and I can't make heads or tails of this question. Perhaps somebody could help clarify it for me. I have a half-circle with a rectangle inside of it. The circle has a radius of 3 and its origin lies on the x axis at (0, 0).
https://i.stack.imgur.com/XFV2z.png

I am asked to express the area and perimeter of the rectangle as a function of x. But I am confused, am I expected to just manually add together the sides of the rectangle based on the different points? How would I even go about finding the length of PS or RQ?
As always thanks StackExchange, you guys have helped me learn more than I can imagine.
For a given $x$ we can find $y$ as $\sqrt{9-x^2}$.
So we get the points $(x,\sqrt{9-x^2})$ for $R$ and $S$.
So the width is given by $2x$ and the height by $\sqrt{9-x^2}$.
Perimeter: $4 x + 2 \sqrt{9 - x^2}$
Area: $2 x \sqrt{9 - x^2}$