Integral- Volumes by Slicing and Rotation About an Axis..Volume of a Pyramid... Could you help me solving this question, please?

Answer: volume is 9 cubic units
===================================================
Explanation:
Each cross section is a square with side length x, so the area of this cross section is x^2
We're integrating from x = 0 to x = 3
So we have
[tex]\displaystyle f(x) = x^2\\\\\\\displaystyle g(x) = \int x^2 dx = \frac{1}{3}x^3+C\\\\\\\displaystyle \int_{a}^{b} f(x) dx = g(b) - g(a)\\\\\\\displaystyle \int_{0}^{3} x^2 dx = g(3) - g(0)\\\\\\\displaystyle \int_{0}^{3} x^2 dx = \left(\frac{1}{3}(3)^3+C\right) - \left(\frac{1}{3}(0)^3+C\right)\\\\\\\displaystyle \int_{0}^{3} x^2 dx = 9\\\\\\[/tex]