# Find the mass of a sphere with density given by $\rho(r,\theta,\phi)$

The density is given by $$\rho=\rho_0e^{-r/R}(1-\cos\theta)$$ Where $R$ is the radius of the sphere.

I integrate as follows:

So, first integration is $$\int_0^R \rho_0 e^{-\frac{r}{R}} (1-\cos \theta ) r^2 (\sin \theta ) \, dr=-\frac{(2 e-5) R^3 (\theta \sin ) (\theta \cos -1)}{e}$$ Second integration: $$\rho_0\cdot\int_0^{2 \pi } \frac{(2 e-5) R^3 (\sin \theta ) (\cos \theta -1)}{e} \, d\theta$$ which is equal to zero, because I get in the indefenite integral the term $\cos\theta -\frac{1}{4} (2 \theta )$, and when calculating it sums to $0$.

So, what is the mass of my sphere?

$$\int_\phi \int_\theta \int_r \mathrm{e}^{-r/R} (1-\cos \theta) r^2\sin \theta dr d\theta d\phi$$
lets clean up a few things $$\dfrac{d^2}{d\alpha^2}\mathrm{e}^{-\alpha r} = r^2\mathrm{e}^{-\alpha r}\\ \dfrac{d}{d\theta}\left(-\cos \theta -\frac{1}{2}\cos^2 \theta \right) = (1-\cos \theta )\sin \theta$$ where $\alpha = 1/R$ thus we can $$\int_0^{\pi/2} \int_0^{\pi/2}\int_0^R \left(R^2\dfrac{d^2}{dr^2}\mathrm{e}^{-r/R} \right)\left(\dfrac{d}{d\theta}\left(-\cos \theta -\frac{1}{2}\cos^2 \theta \right) \right)dr d\theta d\phi =\\ \int_0^{\pi/2} \int_0^R \left(R^2\dfrac{d^2}{dr^2}\mathrm{e}^{-r/R} \right)\int_0^{\pi/2}\left(\dfrac{d}{d\theta}\left(-\cos \theta -\frac{1}{2}\cos^2 \theta \right) \right)dr d\theta d\phi$$ i.e. over the first quadrant. The $\theta$ integral is $$\left[-\cos \theta -\frac{1}{2}\cos^2 \theta \right]_{0}^{\pi/2} = 0 -(-1-1/2) = \frac{3}{2}$$ then over $r$ it is $$\dfrac{d^2}{d\alpha^2}\left[-\frac{1}{\alpha}\mathrm{e}^{-\alpha r}\right]_0^R\\ =\dfrac{d^2}{d\alpha^2}\frac{1}{\alpha}\left(1-\mathrm{e}^{-1}\right)\\ = \frac{2}{\alpha^3}\left(1-\mathrm{e}^{-1}\right) = 2R^3\left(1-\mathrm{e}^{-1}\right)$$ all together with the $\phi$ integral we obtain $$V_{1/8} = \frac{\pi}{2}2R^3\left(1-\mathrm{e}^{-1}\right)\frac{3}{2} = \frac{3\pi R^3}{2}\left(1-\mathrm{e}^{-1}\right)$$ so I get for your mass $$m = \frac{12\pi R^3\left(\mathrm{e}-1\right)}{\mathrm{e}}\rho_0$$ ?