[Math] Cartesian to Spherical Coordinate Conversion for Triple Integral

definite integralsintegrationspherical coordinates

I have a question regarding what happens to the boundaries when converting a triple integral from Cartesian to Spherical Coordinates.

Example

$$\int_{-a}^{a}\int_{-\sqrt{a^2-x^2}}^{\sqrt{a^2-x^2}}\int_{-\sqrt{a^2-x^2-y^2}}^{\sqrt{a^2-x^2-y^2}}f(x,y,z)dzdydx$$

So the bounds of this integral indicate that we're integrating over the whole sphere of radius $a$ correct?

I believe that I have found the correct conversion in the integral:

$$\int_0^{2\pi}\int_0^\pi\int_0^a{\rho}^2sin(\phi)f(\rho,\phi,\theta)d{\rho}d{\phi}d{\theta}$$

while I believe this is correct, I'm confused at why it is. It seems to me that these bounds would indicate that we would only be integrating over the top half of the sphere.

In order to integrate over the whole sphere I would would either think:

$\rho$ would have to run from $-a$ to $a$. (Everywhere I've looked $\rho$ is always $>0$, is this always true and if so why?)

Or

$\phi$ would have to run from $0$ to $2\pi$ if the $\rho$ remains $0$ to $a$.

If the above conversion is correct I am not sure how changing the lower bound of $z$ to $0$ will affect the conversion.

Namely, what would $$\int_{-a}^{a}\int_{-\sqrt{a^2-x^2}}^{\sqrt{a^2-x^2}}\int_{0}^{\sqrt{a^2-x^2-y^2}}f(x,y,z)dzdydx$$

look like converted to spherical coordinates?

Thanks in advance for the help.

Best Answer

No, the version that you doubt is absolutely correct. $\rho$ signifies the distance between the points in your integration domain and the origin. As such, it can only be positive. You get the "lower" points for $\phi \in (\frac \pi 2, \pi)$. ($\phi$ is the angle formed by your point $(x,y,x)$ and the vertical axis.)

Related Question