I have a question on whether I can do this with an integral:
When I tried solving this, I got (1/2)(M^2)(R^2) instead of (1/2)MR^2

Problem: https://i.stack.imgur.com/wZNbY.jpg
*Sorry for lack of TeX. Currently on iPad.
I have a question on whether I can do this with an integral:
When I tried solving this, I got (1/2)(M^2)(R^2) instead of (1/2)MR^2

Problem: https://i.stack.imgur.com/wZNbY.jpg
*Sorry for lack of TeX. Currently on iPad.
Copyright © 2021 JogjaFile Inc.
$p(x,y,z)$ doesn't pull out of the integral and turn into an $M$. It depends on $x,y,z$, you need to actually integrate it. What you wrote says that $\int fg=\int f \int g$ which is not true in general.