Since the slices are vertical, we can find the volume of the solid using the formula
\begin{equation*}
\text{Volume} = \int_a^b A(x)\, dx
\end{equation*}
So the two things we want to find are (1) the area of the cross section, and (2) the interval in which the \(x\)-values are in.
Letβs figure out the area of the cross section first. By the problem, we know that the cross sections are
squares, whose area can be computed by
squaring the sides. So the question now becomes
what the side of the squares are?
By the Desmos applet in the hint, the base of the square is the height of the function \(y = \sqrt{9 - x^2}\text{,}\) which is the function value. Then the area of the cross section is
\begin{equation*}
A(x) = \left(\sqrt{9 - x^2}\right)^2 = 9 - x^2
\end{equation*}
Now we will determine the interval in which the
\(x\)-values live in. Graphically, we can observe that the
\(x\)-values will be within the interval of
\([-3,3]\text{.}\)
Putting these two pieces together, the volume of the solid is
\begin{align*}
\text{Volume} \amp= \int_{-3}^3 \left(9 - x^2\right)\, dx \\
\amp= \left(9x - \frac{x^3}{3}\right)\bigg|_{-3}^3 \\
\amp= \left(9(3) - \frac{(3)^3}{3}\right) - \left(9(-3) - \frac{(-3)^3}{3}\right) \\
\amp= 18 - (-18) \\
\amp= 36 \qquad \text{unit}^3
\end{align*}