A solid spherical ball of radius $\displaystyle R$ is created in a way such that the density at the point $\displaystyle (x,y,z)$ is proportional to the point's distance from the origin.
What is the mass of the ball?
I hope you didn't see my first solution. This time I have actually done some thinking.
The density $\displaystyle \delta(r) = kr $ for some $\displaystyle 0 < k $
The surface of a sphere with radius $\displaystyle r $ is $\displaystyle r = 4\pi r^2$
A sphercial shell $\displaystyle dV = 4\pi r^2\,dr $
$\displaystyle dm = \delta\,dV $
$\displaystyle dm = 4k\pi r^3\,dr $
Thus,
$\displaystyle m = 4k\pi\int_0^R r^3\,dr = \pi kR^4 $
The rule is,
$\displaystyle m=\int \int_S \int \rho(x,y,z) dV$
In this case,
$\displaystyle \rho(x,y,z)=\kappa \sqrt{x^2+y^2+z^2}=\kappa \rho$
Use spherical coordinates,
$\displaystyle \int_0^{2\pi} \int_0^{\pi} \int_0^R \kappa \rho^3 \sin \phi d\rho\, d\phi\, d\theta$