Question 6 As shown in Figure 7, there is a semi-elliptical steel plate, with the length of the major semi-axis being $2 r$ and the length of the minor semi-axis being $r$. It is planned to cut this steel plate into the shape of an isosceles trapezoid, with the lower base $A B$ being the minor axis of the semi-ellipse, and the upper base $C D$ having endpoints on the ellipse, denoted as $C D=2 x$, and the area of the trapezoid as $S$.
(1) Find the function of the area $S$ with $x$ as the independent variable, and write down its domain;
(2) Find the maximum value of the area $S$.
(1) According to the problem, establish a rectangular coordinate system $xOy$ with the midpoint $O$ of $AB$ as the origin (Figure 8). Clearly, point $C(x, y)$ satisfies the equation $\frac{x^{2}}{r^{2}} + \frac{y^{2}}{4 r^{2}} = 1 (y \geqslant 0)$,

Solving for $y$ gives $y = 2 \sqrt{r^{2} - x^{2}} (0 < x < r)$.

Let $f(x) = 2 \sqrt{r^{2} - x^{2}} \left(2 r - 2 \sqrt{r^{2} - x^{2}}\right) = 4 r \sqrt{r^{2} - x^{2}} - 4 (r^{2} - x^{2})$.

Then, $f^{\prime}(x) = 4 \left(2 x - \frac{x r^{2}}{\sqrt{r^{2} - x^{2}}}\right) = \frac{4 x \left(2 \sqrt{r^{2} - x^{2}} - r\right)}{\sqrt{r^{2} - x^{2}}}$.

When $0 < x < \frac{r}{2}$, $f^{\prime}(x) > 0$; when $\frac{r}{2} < x < r$, $f^{\prime}(x) < 0$, so $f\left(\frac{1}{2} r\right)$ is the maximum value of the function $f(x)$.

Therefore, when $x = \frac{1}{2} r$, $S$ reaches its maximum value, that is, the maximum value of the trapezoid area is $\sqrt{f\left(\frac{1}{2} r\right)} = \frac{3 \sqrt{3}}{2} r^{2}$.