A triple integral in cylindrical coordinates I'm trying to evaluate the following integral:
$\int\int\int_A z\ dxdydz$, where $A:=\{(x,y,z)\in\mathbb{R}^3:0\leq z\leq 1-\sqrt{x^2+y^2}, z\geq 1-4\sqrt{x^2+y^2}\}$ using cylindrical coordinates; I get $\int_{0}^{2\pi}\int_{1/4}^{1}\int_{1-4\rho}^{1-\rho}z\rho\ dzd\rho d\theta$ but when I evaluate it I get a negative result. What am I getting wrong in setting up this integral?
Best regards,
lorenzo.
 A: I think this integral has to be done in two parts: for the first one we get
$$0\le\theta\le2\pi\;,\;\;\frac14\le\rho\le1\;,\;\;0\le z\le1-\rho$$
and for the second part we have
$$0\le\theta\le2\pi\;,\;\;0\le\rho\le\frac14\;,\;\;1-4\rho\le z\le1-\rho$$
and we get:
$$\int_0^{2\pi}\int_{1/4}^1\int_0^{1-\rho}z\rho \,dz\, d\rho\, d\theta=\pi\int_{1/4}^1\rho(1-\rho)^2\,d\rho=\pi\int_{1/4}^1\left(\rho-2\rho^2+\rho^3\right)\,d\rho=$$
$$=\left.\pi\left(\frac12\rho^2-\frac23\rho^3+\frac14\rho^4\right)\right|_{1/4}^1=\pi\left(\frac12\left(1-\frac1{16}\right)-\frac23\left(1-\frac1{64}\right)+\frac14\left(1-\frac1{256}\right)\right)=$$
$$=\pi\left(\frac{15}{32}-\frac{21}{32}+\frac{255}{1,024}\right)=\frac{-192+255}{1,024}\pi=\frac{63}{1,024}\pi$$
and for the second integral:
$$\int_0^{2\pi}\int_0^{1/4}\int_{1-4\rho}^{1-\rho} \rho\,z\,dz\,d\rho\,d\theta=\pi\int_0^{1/4}\left(\rho(1-\rho)^2-\rho(1-4\rho)^2\right)\,d\rho=$$
$$=\pi\int_0^{1/4}\left(6\rho^2-15\rho^3\right)\,d\rho=\left.\pi\left(2\rho^3-\frac{15}4\rho^4\right)\right|_0^{1/4}=\pi\left(\frac1{32}-\frac{15}{1,024}\right)=\frac{17}{1,024}\pi$$
Adding both integrals,  the final result I get is: $\cfrac5{64}\pi\;$
