# substituting spherical coordinates to evaluate an integral.

I have to evaluate

$$\int^1_{-1} \int^{ \sqrt {1-x^2}}_{-\sqrt {1-x^2}} \int^1_{-\sqrt{x^2+y^2}} \, dz \, dy \, dx$$

using spherical coordinates.

This is what I have come up with

\begin{align} & \int^1_0 \int^{2\pi}_0 \int^{3\pi/4}_0 r^2\sin\theta \, d\theta \, d\phi \, dr \\[10pt] = {} & \int^1_0 r^2 \, dr \int^{2\pi}_0 d \phi \int^{3\pi/4}_0 r^2\sin\theta \, d\theta \\[10pt] = {} & \frac 1 3 \times 2\pi \times \left[-\cos\theta\vphantom{\frac 1 1}\right]^{3\pi/4}_0 \end{align}

by a combination of sketching and substituting spherical coordinates.

After evaluating I obtain this integral to equal 3.57.

where as the first one evaluates to 5.236.

EDIT: A bit of thought shows me that the above integral gives a spherical volume. We need to restrict $r$

As $x^2 + y^2 = 1 \implies \rho = \csc \theta$

$$\int^{3\pi/4}_{\pi/4} \int^{2\pi}_0 \int^{\csc \theta}_1 r^2\sin\theta \, dr d\phi \, d\theta$$

However

This, yet again, does not give me what I want.

• Can you describe geometrically what the (first) region is supposed to be? That might help us tell you where you went awry... Dec 1, 2015 at 16:19
• The region $0 \leq z \leq -\sqrt{x^2 + y^2}$ ? That is a cone with maximum at the origin. the remaining two describe a disk. at the origin with radius 1.
– user214138
Dec 1, 2015 at 16:33
• Unless I am screwing it up - cough - is it not the region bounded by a cylinder of radius 1 ($x^2 +y^2 =1$), by $z=1$ on the top, and by the cone $z=-\sqrt{x^2+y^2}$ on the bottom? So I would have been inclined to do this in cylindrical coordinates... Not allowed? Also - just to get every thing down: what are your $\phi$ and $\theta$? For me - usually! -$\theta$ is the counter-clockwise angle from the $x$ axis (in the $x/y$ plane), and $\phi$ the downwards angle from the $z$ axis: the volume element is then $\rho^2 \sin \phi \,d\phi\,d\theta\,d\rho$ - which is not what you have. Dec 1, 2015 at 17:28
• My sketch totally agrees with you, but he asked for spherical. I have $\theta$ as the angle from the downward z-axis. and $\phi$ in the x,y plane. although in my question I do have them the wrong way around. I will edit now. In my calculations I had it the correct way around.
– user214138
Dec 1, 2015 at 17:32
• So - first of all I suggest that you do this first in cylindrical, as a sanity test - regardless of the asked question.... So - assuming $\theta =0$ points south - the maximum $\rho$ - my notation -must depend on $\theta$ - correct? It is not $1$ always... For instance, if $\theta = \pi/4$, $\rho$ can be as large as $\sqrt 2$. You will need two formulas for $\rho$-maximum, because the constraints on the top and the cylinder sides are different. Dec 1, 2015 at 17:47

## 2 Answers

To compare various answers: As described in the comments, the region is a enclosed by the cylinder $x^2+y^2 = 1$, with top $z=1$, and bottom the cone $z=-\sqrt{x^2+y^2}$.

Sol 1: The region has volume $V$ = that of a cylinder minus the cone, i.e., $$V = 2 \pi 1^2 - 1/3 \cdot \pi 1^2 \cdot 1 = 5 \pi/3.$$ (The volume of the cone can most easily be done by Pappus's theorem, aka, looking it up, or by the disc method of integration.)

Sol 2: Using cylindrical coordinates - as in Michael Hardy's solution: $$V = \int_{\phi=0}^{2\pi}\int_{r=0}^1\int_{z=-r}^1\, dz\, r dr \, d\theta = 2\pi \int_{r=0}^{1}(1+r)r\,dr= 2\pi\left(1/2 + 1/3\right).$$

Sol 3: Using spherical coordinates, as desired.

Notation: if I have understood the comments correctly:

• $\phi$ sweeps counter-clockwise in the $x/y$ plane, starting from the $x$-axis,
• $\theta$ sweeps upwards from the $z$-axis, so that $\theta=0$ corresponds to due South;
• $\rho$ is the distance from the origin.

Then the volume element $dV = \rho^2 \sin \theta \, d\theta \, d\phi\, d\rho$.

Walking on a line from the origin (i.e., holding $\theta$ and $\phi$ fixed), we start at $\rho=0$, but eventually encounter the boundary of the region.

• If $\pi/4 \le \theta \le 3\pi/ 4$, the line encounters the exterior of the cylinder ($x^2+y^2 =1$); call this region $R_1$ - here $$\rho_{\rm max} = \csc \theta,$$ as you have it in your edit above.

• If $3\pi/4 \le \theta \le \pi$, the line encounters the top disk, where $z= 1$; call this region $R_2$ - here $$\rho_{\rm max } = -\sec \theta,$$ the negative sign because $\cos \theta$ is negative in this region, with this (unusual?) convention for $\theta$...

Calculate $V = V_1 + V_2$:

• $V_1$: \begin{align} V_1 &= \int \int \int_{R_1} \,dV = \int_{\phi=0}^{2\pi} \int_{\theta = \pi/4}^{3\pi/4}\int_{\rho=0}^{\csc \theta} \rho^2 \,d\rho\, \sin \theta \, d\theta \,d\phi \\ &= 2 \pi \int_{\theta =\pi/4}^{3\pi/4} 1/3 \csc^3\theta \sin \theta \, d\theta \\ & ={2\pi\over 3} \int_{\theta =\pi/4}^{3\pi/4}\csc^2\theta \,d\theta \\ & ={2\pi\over 3}( -\cot \theta )\mid_{\pi/4}^{3\pi/4} \\ &={4 \pi \over 3}.\\ \end{align}

• $V_2$: \begin{align} V_2 &= \int \int \int_{R_2} \,dV = \int_{\phi=0}^{2\pi} \int_{\theta = 3\pi/4}^{\pi}\int_{\rho=0}^{-\sec \theta} \rho^2 \,d\rho\, \sin \theta \, d\theta \,d\phi \\ &= 2 \pi \int_{\theta =3\pi/4}^{\pi} (-1/3) \cos^{-3}\theta \sin \theta \, d\theta \\ & =-{2\pi}\cdot{1/6}\, \cos^{-2}\theta \,\mid_{3\pi/4}^{\pi} \\ &={ \pi \over 3}.\\ \end{align}

So $V= 5\pi/3$.

I hope I didn't mess anything up... In any case, spherical coordinates are perhaps not the best choice for this problem - right?

Note: I'm not sure I got your convention for $\theta$ correctly... In any case, why don't you calculate the volume of the cone using spherical coordinates? - it has to come out to $\pi/3$... If you are still confused, probably you should do the problem 'live' in front of your instructor...

• I can not thank you enough peter. I have decided to stick with a more conventional, like you suggest, way to define $\theta$ So with the bounds of $\theta$ for $R_2$ we obtain. $0 \leq \theta \leq \pi/2$ and so the upper bound on $\rho$ is $sec \theta$. I can not thank you enough. THANKS
– user214138
Dec 2, 2015 at 13:51
• I mean $\pi/4$... sorry.
– user214138
Dec 2, 2015 at 14:01
• I think where you have $\cos^2 \theta$ you should have $\frac{\tan ^2 \theta}{2}$ n the calculations for V_2
– user214138
Dec 2, 2015 at 15:22
• No - "u" substitution: $u= \cos \theta$, $du = - \sin \theta \,d\theta$, so we are basically doing $\int u^{-3}\, du$ Dec 2, 2015 at 15:27
• Oh, I see, your way should work too. Dec 2, 2015 at 15:31

$$\int^1_{-\sqrt{x^2+y^2}} \, dz = 1+\sqrt{x^2+y^2}.$$ Therefore \begin{align} & \int^1_{-1} \int^{ \sqrt {1-x^2}}_{-\sqrt {1-x^2}} \int^1_{-\sqrt{x^2+y^2}} \, dz \, dy \, dx = \int^1_{-1} \int^{ \sqrt {1-x^2}}_{-\sqrt {1-x^2}} \left(1+\sqrt{x^2+y^2}\,\right) \,dy\,dx \\[20pt] & \text{Now switch to polar coordinates:} \\[10pt] = {} & \underbrace{\int_0^{2\pi} \quad \overbrace{\int_0^1 (1+r)\, r\,dr}^\text{No “$\,\theta\,$'' appears here.} \quad d\theta = 2\pi \int_0^1 (1+r)\, r\,dr}_\text{These are equal because “$\,\theta\,$'' does not appear in the inside integral.} = \cdots \cdots \end{align}

• I have never thought of switching to polar coordinates after integrating.
– user214138
Dec 1, 2015 at 17:57