Find the field inside and outside a sphere of radius
$R$, which carries a uniform volume charge density $\rho$.
[![enter image description here][1]][1]
We have $$\frac{dq}{dV}=\rho $$. Then by symmetry, $$d\vec{E}=\frac{1}{4\pi \epsilon_0}\frac{\rho (z-r\cos \theta) dV}{(r^2+z^2-2rz\cos \theta)^{3/2}}\hat{z}$$
$$\vec{E}=\frac{1}{4\pi \epsilon_0}\int_{r=0}^{R}\int_{\theta=0}^{\pi}\int_{\phi=0}^{2\pi}\frac{\rho (z-r\cos \theta) dV}{(r^2+z^2-2rz\cos \theta)^{3/2}}\hat{z}$$
$$\vec{E}=\frac{1}{4\pi \epsilon_0}\int_{r=0}^{R}\int_{\theta=0}^{\pi}\int_{\phi=0}^{2\pi}\frac{\rho (z-r\cos \theta) r…