# Cartesian to Spherical Coordinate Conversion for Triple Integral

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.

## 1 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.)

• Ah ok that makes sense. I wasn't thinking of $\rho$ in terms of distance. So would the bounds for the second example I gave be $\theta$ from $0$ to $2\pi$, $\phi$ from $0$ to ${\pi}/2$, and $\rho$ from $0$ to $a$? – FofX Mar 26 '15 at 21:33
• Yes. $\rho$ always goes from $0$ to $a$, $\theta$ makes a full turn from $0$ to $2 \pi$ in the $xOy$ plane, while $\phi$ descends from the north pole $(0,0,a)$ to the equatorial $xOy = \{z=0\}$ plane, i.e. from $0$ to $\frac \pi 2$ (assuming that you view $xOy$ as being a horizontal plane, and $Oz$ perpendicular to it and directed upwards). – Alex M. Mar 26 '15 at 21:45