Part of your problem is the confusion that arises with the inconsistencies in the literature regarding the notation for spherical coordinates, i.e., some authors use $r,\theta,\phi$ while others use $r,\phi,\theta$. Your equation for $V$ is correct, but the interpretation of $\theta$ is not. If you derive the equation for volume of revolution in spherical coordinates you can find that
$$V=\frac{2\pi}{3}\int r^{3}\sin\varphi\,d\varphi$$
where $\varphi$ is measured from the vertical axis. It would then be apparent that you would have $r=\sin(\pi/2-\varphi)=\cos\varphi$, then
$$V=\frac{2\pi}{3}\int_0^{\pi/2} \cos^{3}\varphi~\sin\varphi\,d\varphi=\frac{\pi}{6}$$
as expected.
NOTE ADDED FOR CLARIFICATION
If you derive the equation for volume of revolution in polar coordinates as shown here you obtain
$$
V_{y-\text{axis}}=\frac{2\pi}{3}\int r^3 \cos \theta~d\theta\\
V_{x-\text{axis}}=\frac{2\pi}{3}\int r^3 \sin \theta~d\theta
$$
which will lead to the same result. In fact, you can now see that you derived the volume for rotation about the $x$-axis.
Call $r_k$ the distance from the axis of an elemental area $\Delta A_k$.
Then the elemental volume it generates in a revolution would be approximately
$$
\Delta V_{\,k} = 2\pi \,r_{\,k} \, \Delta A_{\,k}
$$
Now, suppose that you have a figure composed by $n$ elemental areas, so
$$
\left\{ \matrix{
A = \sum\limits_{k = 1}^n {\Delta A_{\,k} } \hfill \cr
V \approx 2\pi \sum\limits_{k = 1}^n {\,r_{\,k} \,\Delta A_{\,k} } \hfill \cr} \right.
$$
The distance of the barycenter (centroid) from the axis is by definition
$$
r_{\,g} = {1 \over {\sum\limits_{k = 1}^n {\Delta A_{\,k} } }}\sum\limits_{k = 1}^n {\,r_{\,k} \,\Delta A_{\,k} } = {1 \over A}\sum\limits_{k = 1}^n {\,r_{\,k} \,\Delta A_{\,k} }
$$
so that
$$
V \approx 2\pi \,r_{\,g} \,A
$$
Can you proceed from here same as for Riemann sum ?
Note that if the axis crosses the area, and you take a revolution of $2 \pi$, then the above formula
will provide the volume between the more external surface and the more internal, which will define a "cavity".
Otherwise, when the axis crosses the area, you shall take the centroid of the "left" and "right" part separately
and turn by $\pi$ radians only, .. etc.
See the Pappus Theorem
Best Answer
Building a higher dimensional shape from rotation is an easy process. Starting with a circle , $S^1$ , there are two distinct ways to rotate into 3D. These rotations happen around an n-1 plane, into n+1. Axes that lie on the n-1 plane remain stationary, while leaving one axis over to be transformed mathematically. One can establish the plane of rotation to pick out the single axis "$x_m$", for any shape.
Bisecting Rotate into $x_n$, transforming $x_m$:
$x_m^2 \rightarrow x_m^2 + x_n^2$
Examples:
• circle, $S^1$ :
$x^2 + y^2 = r^2$
Bisecting rotate around axis x into z will transform y, making the 2-sphere:
$y^2 \rightarrow y^2 + z^2$,
$x^2 + y^2 + z^2 = r^2$
Continuing to bisecting rotate will only add dimensions to the $S^n$, leading to higher n-spheres.
• sphere, $S^2$ :
$x^2 + y^2 + z^2 = r^2$,
Bisecting rotate around plane xy into w, will transform z, making the 3-sphere:
$z^2 \rightarrow z^2 + w^2$,
$x^2 + y^2 + z^2 + w^2 = r^2$
Bisecting rotate around plane xyz into v, will transform w, making $S^4$:
$w^2 \rightarrow w^2 + v^2$,
$x^2 + y^2 + z^2 + w^2 + v^2 = r^2$
Bisecting rotate around plane xyzw into u, will transform v, making $S^5$:
$v^2 \rightarrow v^2 + u^2$,
$x^2 + y^2 + z^2 + w^2 + v^2 + u^2 = r^2$
As we can see from this, bisecting rotation of $S^n$ around any hyperplane, m-number of times, will yield $S^{n+m}$ .
Non-Intersecting Rotate into $x_n$, transforming $x_m$:
$x_m \rightarrow (\sqrt{x_m^2 + x_n^2}-a)$
• Performed by shifting the starting shape by a certain value of -a , then sweep around the n-1 plane, into n+1, to make a toroidal ring.
circle : $x^2 + y^2 = r^2$
shift the circle by -a along y, then sweep around x, into z:
$y \rightarrow (\sqrt{y^2 + z^2} -a)$,
$x^2 + (\sqrt{y^2 + z^2} -a)^2 = r^2$
and re-orienting the shape,
$(\sqrt{x^2 + y^2} -a)^2 + z^2 = r^2$,
we get the equation for a torus, $T^2$. For $S^1$, we're not confined to only transforming y , as x can be used equally so.
Building 4D Shapes
• Starting with either $S^2$ or $T^2$, we can bisecting or non-intersecting rotate to build 4D shapes. There are two ways to rotate $S^2$ , and four ways to rotate $T^2$. The bisecting rotate for $S^2$ into $S^3$ was already detailed above, so I'll show the non-intersecting rotation:
• $S^2$ :
$x^2 + y^2 + z^2 = r^2$,
shift the sphere by -a along x, sweep along circular path around plane yz, into w:
$x \rightarrow (\sqrt{x^2 + w^2} -a)$,
$(\sqrt{x^2 + w^2} -a)^2 + y^2 + z^2 = r^2$
And, rearranging to
$(\sqrt{x^2 + y^2} -a)^2 + z^2 + w^2 = r^2$,
we get a compact 3-manifold of genus-1, defined as $S^2$ x $S^1$ , sphere bundle over the circle.
The four ways to rotate a torus into 4D:
• Torus, $T^2$:
$(\sqrt{x^2 + y^2} -a)^2 + z^2 = r^2$
Degree-4 Surfaces
1. Bisecting rotate around plane xz (or yz), into w, will transform y:
$y^2 \rightarrow y^2 + w^2$,
$(\sqrt{x^2 + y^2 + w^2} -a)^2 + z^2 = r^2$
reorient to
$(\sqrt{x^2 + y^2 + z^2} -a)^2 + w^2 = r^2$
A 3-manifold of genus-1, $S^1$ x $S^2$ , circle bundle over the sphere.
2. Bisecting rotate around plane xy, into w, will transform z:
$z^2 \rightarrow z^2 + w^2$,
$(\sqrt{x^2 + y^2} -a)^2 + z^2 + w^2 = r^2$
A 3-manifold of genus-1, $S^2$ x $S^1$ , sphere bundle over the circle.
Degree-8 Surfaces
3. Non-intersecting rotate around plane xz (or yz), into w, transforms y. Shifted by -a along y-axis:
• Torus, $T^2$:
$(\sqrt{x^2 + y^2} -b)^2 + z^2 = r^2$,
$y \rightarrow (\sqrt{y^2 + w^2} -a)$,
$(\sqrt{x^2 + (\sqrt{y^2 + w^2} -a)^2} -b)^2 + z^2 = r^2$
reorient to
$(\sqrt{(\sqrt{x^2 + y^2} -a)^2 + z^2} -b)^2 + w^2 = r^2$
A 3-manifold of genus-2, the 3-torus $T^3$, torus bundle over the circle.
4. Non-intersecting rotate around plane xy, into w, transforms z. Shifted by -a along z-axis:
$z \rightarrow (\sqrt{z^2 + w^2} -a)$,
$(\sqrt{x^2 + y^2} -b)^2 + (\sqrt{z^2 + w^2} -a)^2 = r^2$,
A 3-manifold of genus-2, the tiger, circle bundle over the Clifford flat torus. For simplicity and clarity, I'm adopting the notation C2 to represent the Clifford torus, in fiber bundle terms. Not to be mistaken for the space $C^2$. (I hope that's okay with everyone). So, in the case of this 4D hypertorus, we can define it as $S^1$ x C2 , which is homeomorphic to $T^3$, as the product of three circles, but uniquely different.
So, to recap 4D:
$S^3$ : $x^2 + y^2 + z^2 + w^2 = r^2$
$S^1$ x $S^2$ : $(\sqrt{x^2 + y^2 + z^2} -a)^2 + w^2 = r^2$
$S^2$ x $S^1$ : $(\sqrt{x^2 + y^2} -a)^2 + z^2 + w^2 = r^2$
$T^3$ : $(\sqrt{(\sqrt{x^2 + y^2} -a)^2 + z^2} -b)^2 + w^2 = r^2$
$S^1$ x C2 : $(\sqrt{x^2 + y^2} -b)^2 + (\sqrt{z^2 + w^2} -a)^2 = r^2$
Building 5D Shapes
Now, we can continue this process of rotating 4D shapes into 5D, producing the $S^4$ , and 11 distinct types of hypertoric rings.
The compact 4-manifolds that curve into 5D:
Degree-2 Surface of genus-0
$S^4$ : $x^2 + y^2 + z^2 + w^2 + v^2 = r^2$
Degree-4 Surfaces of genus-1
$S^3$ x $S^1$ : $(\sqrt{x^2 + y^2} - a)^2 + z^2 + w^2 + v^2 = b^2$
$S^2$ x $S^2$ : $(\sqrt{x^2 + y^2 + z^2} - a)^2 + w^2 + v^2 = b^2$
$S^1$ x $S^3$ : $(\sqrt{x^2 + y^2 + z^2 + w^2} - a)^2 + v^2 = b^2$
Degree-8 Surfaces of genus-2
$S^2$ x $T^2$ : $(\sqrt{(\sqrt{x^2 + y^2} - a)^2 + z^2} - b)^2 + w^2 + v^2 = c^2$
$S^1$ x $S^2$ x $S^1$ : $(\sqrt{(\sqrt{x^2 + y^2} - a)^2 + z^2 + w^2} - b)^2 + v^2 = c^2$
$T^2$ x $S^2$ : $(\sqrt{(\sqrt{x^2 + y^2 + z^2} - a)^2 + w^2} - b)^2 + v^2 = c^2$
$S^2$ x C2 : $(\sqrt{x^2 + y^2} - a)^2 + (\sqrt{z^2 + w^2} - b)^2 + v^2 = c^2$
$S^1$ x [$S^2*S^1$] : $(\sqrt{x^2 + y^2 + z^2} - a)^2 + (\sqrt{w^2 + v^2} - b)^2 = c^2$
Degree-16 Surfaces of genus-3
$S^1$ x C2 x $S^1$ : $(\sqrt{(\sqrt{x^2 + y^2} - a)^2 + z^2} - b)^2 + (\sqrt{w^2 + v^2} - c)^2 = d^2$
$T^2$ x C2 : $(\sqrt{(\sqrt{x^2 + y^2} - a)^2 + (\sqrt{z^2 + w^2} - b)^2} - c)^2 + v^2 = d^2$
$T^4$ : $(\sqrt{(\sqrt{(\sqrt{x^2 + y^2} - a)^2 + z^2} - b)^2 + w^2} - c)^2 + v^2 = d^2$
And, getting into 6D, we'll get $S^5$ , and 32 distinct toroidal shapes. The interesting ones are a degree-32 surface, as compact 5-manifolds of genus-4. Moving further, 7D will have $S^6$ and 89 types of hypertorus, some of which are degree-64 of genus-5. What's neat about the combinatoric nesting of diameters, is that it follows rooted trees with nested leaves, the integer sequence A000669. All combinations of bisecting and non-intersecting rotations of a circle exhaust the total possible combinations in each dimension. Part of my self-study and personal research has been this combination sequence, that defines the implicit surface equations of hypertoric shapes. I can elaborate on this further, if anyone is interested.
I have done quite a bit of illustration of these shapes, too:
4D Hypertoric Shapes
5D Hypertoric Shapes
and many of the 6D and 7D, and 9D as well.