[Math] Volume of a cube in spherical polars

integrationpolar coordinatesspherical coordinates

Let us calculate the volume of the cube using spherical coordinates. The cube has side-length $a$, and we will centre it on the origin of the coordinates. Denote elevation angle by $\theta$, and the azimuthal angle by $\phi$.
Split the cube into 6 identical square based pyramids, by the planes $x = y, x = -y, x = z$ etc.
Take the square-based pyramid with the base on the plane $x = \frac{a}{2}$.
Then this pyramid is described by the following set of inequalities;
$\frac{\pi}{4} < \theta < \frac{3\pi}{4},
\;-\frac{\pi}{4} < \phi < \frac{\pi}{4},
\;0 < x < \frac{a}{2}$

Rewriting the last inequality in polar coordinates gives
$0 < r < \frac{a}{2 \cos(\phi)\sin(\theta)}$
and now we are in a position to write down the integral.

$V_\mathrm{cube} = 6 V_\mathrm{pyramid} = 6\iiint_\mathrm{pyramid} r^2 \sin(\theta) \mathrm{d}r \mathrm{d}\theta \mathrm{d}\phi$

Solve first the r integral, which gives

$\int_0^\frac{a}{2 \cos(\phi)\sin(\theta)} r^2 dr = \frac{1}{24}\frac{a^3}{ \cos(\phi)^3\sin(\theta)^3}$

and so

$V_\mathrm{cube} = \frac{a^3}{4} \int_{-\frac{\pi}{4}}^\frac{\pi}{4} \frac{\mathrm{d}\phi}{\cos(\phi)^3} \int_{\frac{\pi}{4}}^\frac{3\pi}{4} \frac{\mathrm{d}\theta}{\sin(\theta)^2} $

The antiderivative of $\sin^{-2} \theta$ is $-\cot \theta$, so the $\theta$ integral evaluates to 2, giving

$V_\mathrm{cube} = \frac{a^3}{2} \int_{-\frac{\pi}{4}}^\frac{\pi}{4} \frac{\mathrm{d}\phi}{\cos(\phi)^3}$

Mathematica tells me the remaining integral is not equal to 2, so I must've messed up somewhere. I can't see where though, can anyone else see what I've done wrong?

Best Answer

The surfaces $\theta=\pi/4$ and $\theta=3\pi/4$ are cones, but your pyramid is bounded by planes that touch these cones, not by the cones.

Related Question