A very thin tube shaped like a quarter of a toroid has one end attached to the origin $(0,0,0)$ and the other end at $(R,0,R)$. Determine its center of mass.
So obviously $y_G = 0$. Using Pappus theorem, we may determine $x_G$ by rotating the tube around the z-axis, giving half a sphere with radius $R$. The surface area is $A = 2 \pi R^2$ and the length of the arc $l$ is $R\pi/2$ (quarter of a circle) so we get $x_G = A/(2\pi l) = \frac{2\pi r^2}{2\pi R\pi/2} = 2R/\pi$.
Now to the tricky part, determining $z_G$. Rotating the arc around the x-axis renders a surface area that can be calculated using the formula $A = 2 \pi \int f(x) \sqrt{1+f'(x)^2} dx $. We can express the arc in terms of $z$ and $x$ as $$z(x) = \sqrt{R^2 - x^2}$$ giving $f'(x)^2 = \frac{x^2}{R^2-x^2}$. Thus the area is: $$A = 2\pi \int_{0}^{R} \sqrt{R^2-x^2} \sqrt{1+\frac{x^2}{R^2-x^2}} dx $$ $$= 2 \pi \int_{0}^{R} \sqrt{\frac{(R^2-x^2)(R^2-x^2+x^2)}{R^2-x^2}} dx$$ $$= 2\pi \int_{0}^{R} |R| dx = 2 \pi R^2 $$ Again, using Pappus theorem to obtain $z_G$, we get $$z_G = A/(2\pi l) = \frac{2\pi R^2}{2 \pi R \pi/2} = 2R/\pi$$
This is however is wrong! According to the book, $z_G = R - \frac{2R}{\pi}$. What did I do wrong?