User:Beneficii/hypervolume

$$ \begin{align} H & = \int_{-r}^{r} \frac{4}{3} \pi \left ( \sqrt{r^{2} - x^{2}} \right )^3 dx & = \int_{-r}^{r} \frac{4}{3} \pi r^{3} \left ( \sqrt{1 - \frac{x^{2}}{r^{2}}} \right )^3 dx & = \frac{4}{3} \pi r^{3} \int_{-r}^{r} \left ( \sqrt{1 - \frac{x^{2}}{r^{2}}} \right )^3 dx \end{align} $$

Let $$x = r \sin(u).$$ As a result, $$\arcsin \left ( \frac{x}{r} \right ) = u$$ and $$dx = r \cos(u) du.$$

$$ \begin{align} H & = \frac{4}{3} \pi r^{3} \int_{arcsin \left ( \frac{-r}{r} \right )}^{arcsin \left ( \frac{r}{r} \right )} \left ( \sqrt{1 - \frac{(r \sin(u))^2}{r^{2}}} \right )^3 r \cos(u) du \\ & = \frac{4}{3} \pi r^{3} (r) \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \left ( \sqrt{1 - \sin^{2}(u)} \right )^3 \cos(u) du \\ & = \frac{4}{3} \pi r^{4} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} (cos(u))^3 \cos(u) du \\ & = \frac{4}{3} \pi r^{4} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} cos^4(u) du \\ & = \frac{4}{3} \pi r^{4} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \left [ \frac{1}{8} (3 + 4 \cos(2u) + \cos(4u)) \right ] du \\ & = \frac{4}{3} \left ( \frac{1}{8} \right ) \pi r^{4} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} (3 + 4 \cos(2u) + \cos(4u)) du \\ & = \frac{1}{6} \pi r^{4} \left [ 3u + 2 \sin(2u) + \frac{1}{4} \sin(4u) \right ]_{u=-\frac{\pi}{2}}^{\frac{\pi}{2}} \\ & = \frac{1}{6} \pi r^{4} \left [ \left ( 3 \left (\frac{\pi}{2} \right ) + 2 \sin(\pi) + \frac{1}{4} \sin(2 \pi) \right ) - \left (3 \left ( -\frac{\pi}{2} \right ) + 2 \sin(- \pi) + \frac{1}{4} \sin(-2 \pi) \right ) \right ] \\ & = \frac{1}{6} \pi r^{4} \left [ \left ( 3 \left (\frac{\pi}{2} \right ) \right ) - \left (3 \left ( -\frac{\pi}{2} \right ) \right ) \right ] \\ & = \frac{1}{6} \pi r^{4} \left [ \left ( 3 \left (\frac{\pi}{2} \right ) \right ) + \left (3 \left ( \frac{\pi}{2} \right ) \right ) \right ] \\ & = \frac{1}{6} \pi r^{4} \left ( \frac{3 \pi}{2} \right ) (2) \\ & = \frac{1}{6} \pi r^{4} (3 \pi) \\ & = \frac{1}{2} \pi^{2} r^{4} \end{align} $$