I'm having trouble with this one because once we change variables to spherical coordinates s.t.
$$(x,y,z)=(\rho \sin \phi \cos \theta, \rho \sin \phi \sin \theta, \rho \cos \phi), \rho \geq 0, 0 \leq \phi \leq 2\pi, 0 \leq \theta \leq \pi$$
we get
$$\rho^2 = 2R\rho \cos \phi$$
which has no solutions for $\pi \leq \phi \leq 2\pi$. I mistakenly computed $\int_0^{2\pi}\int_0^\pi\int_0^{2R\rho\cos\phi}r^2\sin \phi \ d\rho d\theta d\phi$ and got zero volume.
So... what's the strategy to approach this kind of problems? Finding symmetries or what?
There is a simple argument you could make without actually integrating.
Observe that the density function is linear in $z$. Then, you could just take its average value $R$ and multiply it to the sphere volume to get the integral, i.e.
$$I=\frac 43 \pi R^4$$
You could also verify this result by makeing a variable change $w=z- R$, thus moving the sphere’s center to the origin. Then, the integral over $w$ of the density vanishes due to symmetry and only the constant term $R$ in density survives.