Let $C$ be the solid cone with boundary $x^2+y^2=(1-z)^2,0\leq z \leq 1$. If the density of $C$ at any point $(x,y,z)$ is $z$, find the mass of $C.$ I know from the solutions that the integral required for this is $$\text{Mass}=\iiint_{C}z\,dV=\int_{0}^{2\pi}\int_{0}^{1}\int_{0}^{1-r}z\,\,dz\,r\,dr\,d\theta.$$
The difficulty I'm having with this problem is the constraint $0\leq z \leq 1$. Normally $z$ is fixed, so I'm able to find the equation of the level curve for the intersection quite easily. From the solution I believe the intersection or the projection on the $xy$ plane must be $x^2+y^2=1$. This is easily obtained if $z=0$ and $x^2+y^2=(1-z)^2$, say, but for $0\leq z\leq 1$, how do I know this is true? Because if $z=0.5$, then $x^2+y^2=(1-z)^2$ and $z=0.5$ doesn't have intersection $x^2+y^2=1$.
I also notice that unusually there are $3$ constraints for $z$, so am I right in thinking that $0\leq z \leq 1-r$ because at, say, $(0,0)$ in the projection on the $xy$ plane of $x^2+y^2=1$, we have that $z\geq 0$, $z\leq 1$ still and $x^2+y^2=(1-z)^2 \implies z=1$ which is bigger than $z\leq 1,$ hence the reason for the inequality on $z$ being as such?
 A: I'll venture a guess as to what your confusion might be about: how the solid is defined and how you're going to set up the triple integral are NOT necessarily the same thing. While the solid can be originally defined by certain constraints, you may choose a different description for it via different constraints that are more amenable to integration.
Say, in this example, the equation $x^2+y^2=(1-z)^2$ defines a cone that extends infinitely far up and down. So that we have a reasonable (for this question) solid — one that doesn't extend forever — we need to describe what finite part of this cone we're actually dealing with. That's what $0\le z\le1$ tells you — that you have the portion of this cone that's vertically contained between the planes $z=0$ and $z=1$. See the (quickly generated, so not so great) pictures below.
 
You need to understand that to visualize the given solid. But you do NOT have to use the same constraints to set up the corresponding triple, or rather iterated, integral. Heck, you don't even have to use cartesian coordinates, right? For this one, cylindrical would be more convenient. The base in the $xy$-plane can be obtained by plugging in $z=0$, which gives us the unit circle $x^2+y^2=1$ or $r=1$. And then, for any point in the base, $z$ ranges from $z=0$ to $z=1-r$. So the way you set up your integral is perfectly correct. Note, however, that the solid as a whole does go up to $z=1$ at the vertex.
A: I think that the constrains are as follows: $0\le z \le 1$, $0 \le r \le 1-z$, $0 \le \theta \le 2 \pi$
$\int_0^{2\pi}(\int_0^1(\int_0^{1-z}z r dr)dz)d\theta=
\int_0^{2\pi}(\int_0^1z(\int_0^{1-z} r dr)dz)d\theta$ 
$= 2\pi(\int_0^1z\frac{(1-z)^2}{2}dz)=\pi(\int_0^1zdz-\int_0^12z^2dz+\int_0^1z^3dz)$  
$=\pi(\frac{1}{2}-2 \times \frac{1}{3}+\frac{1}{4})=\pi/12$.
The Jacobian  $r$ was missed.
