# Triple integral in spherical / cylindrical coordinates - where's the error? Exercise check

I have done an exercise in two different ways but I have obtained two different results and I can't understand what's wrong. Please, help me.

Given: $V=\{(x,y,z)\in R^3: x^2+y^2+z^2\leq 1, \frac{1}{3}\leq z \leq \frac{1}2\}$

Calculate $\iiint_V z \sqrt {x^2+y^2} dxdydz$

My FIRST attempt at solution: In spherical coordinates we have:

$x= r \cos \psi \cos \phi$

$y=r \cos \psi \sin \phi$

$z=r \sin \psi$

so, $\sqrt {x^2+y^2}$ becomes $r \, |\cos \psi |$

from the condition on $z$ I obtain $\displaystyle \frac{1}{3 \sin \psi}<r<\frac{1}{2\sin \psi}$

and the integral I have to calculate begins:

$\iiint r \sin \psi \cdot r |\cos \psi| \cdot r^2 \cos \psi \, d\phi d\psi dr= \\ \iiint r^4 \cos^2 \psi \sin \psi \, d\phi d\psi dr= \\ 2 \pi \int (\int_a ^b r^4dr) \cos^2 \psi \sin \psi d\psi$

and I have obtained

$=\displaystyle \frac{2}{5}\pi \int_{\arcsin 1/3}^{\pi/2} \left(\frac1{2^5 sin^5 \psi}-\frac{1}{3^5 \sin ^5 \psi}\right)\cos^2 \psi \sin \psi \, d\psi$

WolframAlpha says:

................................................

My SECOND attempt at solution was in cylindrical coords:

$\int_{1/3}^{1/2} \int_{0}^{2\pi} \int_{0}^{\sqrt{1-z^2}} z \rho \cdot \rho \, d\rho d\theta dz=$

Wolfam says:

I probably made a mistake somewhere and I can't find it! Please, check it out!

• I don't see where the line after "and I have obtained" comes from. – joriki Jun 18 '16 at 13:00
• @joriki i integrate $r^4$ between 1/2sin(psi) and 1/3sin(psi)... I have to compute the value of (r^5)/5 between r extrema.. isn't it? – sunrise Jun 18 '16 at 13:05

## 1 Answer

This is a horrible mess in spherical coordinates; the cylindrical coordinates are clearly more suitable. But if you insist on doing it, here's your mistake: The upper bound for $r$ is $1/(2\sin\psi)$ only in part of the range; for $\psi\lt\arcsin\frac12$ the upper bound for $r$ is $1$; so you have to split the integral over $\psi$ into two parts. Think of rays piercing the slab of the sphere from the origin; some emerge from the slab on the surface of the sphere, and some on the upper flat surface of the slab.