Originally Posted by

**heathrowjohnny** Find the electric field inside a sphere which carries a charge density proportional to the distance from the origin, $\displaystyle \rho = kr $, for some constant $\displaystyle k $.

So $\displaystyle \oint \bold{E} \cdot d \bold{a} = \frac{Q_{\text{enc}}}{\epsilon_{0}} $.

And $\displaystyle E \cdot 4 \pi r^{2} = \frac{1}{\epsilon_{0}} \int \rho \ d \tau $.

So $\displaystyle E \cdot 4 \pi r^{2} = \frac{k}{\epsilon_{0}} \int_{0}^{2 \pi} \int_{-\pi/2}^{\pi/2} \int_{0}^{r} r'^{3} \sin \theta \ d r' d \theta \ d \phi $. Then solve for $\displaystyle \bold{E} $.

Is this correct?