Question: The triangle formed by the three straight lines y =0, y=2x and y = 3-x is rotated about the side y = 0.

Find the volume of the solid so generated, and the x-coordinate of its centre of gravity.

my attempt:

a) find the volume of the solid

element of the volume = $\displaystyle \pi y^2 \mathrm{d} x $

$\displaystyle v_{1} = \int_{0}^{1}\pi y^2 \mathrm{d} x $

$\displaystyle v_{1} = \int_{0}^{1}\pi (2x)^2 \mathrm{d} x = \frac{4}{3} \pi $

$\displaystyle v_{2} = \int_{1}^{3}\pi y^2 \mathrm{d} x $

$\displaystyle v_{1} = \int_{1}^{3}\pi (x-3)^2 \mathrm{d} x = \frac{8}{3} \pi $

$\displaystyle v_{1}+ v_{2} = 4 \pi $

b) element of volume = [tex] x y^2 \pi \mathrm{d} x [\tex]

$\displaystyle \bar{x}_{1}\int_{0}^{1} \pi y^2 \mathrm{d} x = \int_{0}^{1} \pi x y^2 \mathrm{d} x $

$\displaystyle \bar{x}_{1}\int_{0}^{1} \pi (2x)^2 \mathrm{d} x = \int_{0}^{1} \pi x (2x)^2 \mathrm{d} x $

$\displaystyle \bar{x}_{1}\int_{0}^{1} \pi 4x^2 \mathrm{d} x = \int_{0}^{1} \pi 4x^3 \mathrm{d} x $

$\displaystyle \bar{x}_{1}\left ( \frac{4}{3} \right ) = 1 $

$\displaystyle \bar{x}_{1} = \frac{3}{4} $

$\displaystyle \bar{x}_{2}\int_{1}^{3} \pi y^2 \mathrm{d} x = \int_{1}^{3} \pi x y^2 \mathrm{d} x $

$\displaystyle \bar{x}_{2}\int_{1}^{3} \pi (3-x)^2 \mathrm{d} x = \int_{2}^{3} \pi x (3-x)^2 \mathrm{d} x $

$\displaystyle \bar{x}_{2}\int_{1}^{3} \pi (9-6x+x^2) \mathrm{d} x = \int_{1}^{3} \pi (9x-6x^2+x^3) \mathrm{d} x $

$\displaystyle \bar{x}_{2}\left ( \frac{8}{3} \right ) = 4 $

$\displaystyle \bar{x}_{2} = \frac{3}{2} $

$\displaystyle \bar{x}_{1} + \bar{x}_{2} = \frac{3}{2} + \frac{3}{4} = \frac{9}{4} $

the book gives an answer for part a) $\displaystyle 4 \pi $ b) $\displaystyle \frac{5}{4} $

I applied the same method i used in part a if part b

I want to know if there is another way to do part a

Please can someone help me with part b