Calculate moment of inertia of body $T$ around $z$-axis
I have the homogeneous body $T$, which is bounded by surfaces $x+z=1$, $y-x=1$, $y=0$ and $z=1$. Calculate moment of inertia of body $T$ around $z$-axis.
I know that density of homogeneous body is $\rho(x,y,z)=1$ and formula of moment of inertia around $z$-axis is $$J_{z}=\int\int_{T}\int(x^2+y^2)\rho(x,y,z)dxdydz$$
So I calculated like this $$J_{z}=\int_{-1}^{0}dx\int_{1-x}^{1+x}dy\int_{1}^{1-x}(x^2+y^2)dz$$ and my result is $$J_{z}=\frac{1}{15}$$
I do not know if this is correct.
Yes the answer is $ \displaystyle \frac{1}{15}$ but the lower bound of $y$ cannot be $(1-x)$. It should be $0$. In fact the integral you have written does not give the correct result. The correct integral is,
$ \displaystyle \int_{-1}^0 \int_0^{1+x} \int_1^{1-x} (x^2 + y^2) ~ dz ~ dy ~dx = \frac{1}{15}$