Calculating the electric field inside a non conducting sphere without the Gauss Law It is easy to calculate the electric field of a non conducting sphere using the Gauss Law, just by discovering the amount of charge that's inside the surface you chose. But I haven't been able to figure out how to calculate it without using the Gauss Law. I tried to divide the sphere into tiny shells to get the electric field caused by each and then integrate the radius from 0 to the radius of the sphere itself, but it didn't work. Does anyone has any idea of how to approach this problem? Thank you!
 A: So, you want to calculate an electric field of the sphere using straightforward integration instead of a Gauss law. Let's assume that a charged sphere has radius $R$ and we want to compute the electric field at $\vec{r}_0$. Assuming that the charge density inside the sphere is constant equal to $\rho$, the electric field is (forgetting about $\frac{1}{4\pi\epsilon_0 \epsilon}$ factor in SGS or $\frac{1}{\epsilon}$ in SI)
$$
\vec{E} = \int \frac{(\vec{r}_0 - \vec{r}) \rho d^3r}{|\vec{r}_0 - \vec{r}|^3}
$$
For convenience one can choose coordinate system such that the point $\vec{r}_0$, where you compute the field, is on the z-axis. Then
$$
\vec{E} = \int \frac{(\vec{r}_0 - \vec{r}) \rho r^2 \sin\theta \, dr d\theta d\varphi}{|\vec{r}_0 - \vec{r}|^3}
$$
and $E_x \sim \int \cos\varphi \, d\varphi = 0$, $E_y \sim \int \sin\varphi \, d\varphi = 0$ (which was clear from the symmetry anyways) and you only have to compute $E_z$:
$$
E_z = 2 \pi \rho \int_0^R r^2 dr \int_0^{\pi} \frac{\sin\theta (r_0 - r \cos\theta)d\theta}{((r_0 - r \cos\theta)^2 + (r \sin\theta)^2)^{3/2}}
$$
Substituting $t=\cos\theta$, pulling out r from integral over $\theta$, and introducing a(r) = $r_0/r$, it simplifies to
$$
E_z = 2 \pi \rho \int_0^R dr \int_{-1}^{1} \frac{(a - t)dt}{((a - t)^2 + 1 - t^2)^{3/2}} = 2 \pi \rho \int_0^R dr \int_{-1}^{1} \frac{(a - t)dt}{((a - t)^2 + 1 - t^2)^{3/2}} = \\
2 \pi \rho \int_0^R dr \int_{-1}^{1} \frac{(a - t)dt}{(1 + a^2 - 2at)^{3/2}}
$$
The integral over $t$ is straightforward: substituting $x = 1 + a^2 - 2at$ I get
$$
\int_{-1}^{1} \frac{(a - t)dt}{(1 + a^2 - 2at)^{3/2}} = \frac{1}{4a^2}\int_{(a-1)^2}^{(a+1)^2}\left[(a^2-1)x^{-3/2} + x^{-1/2} \right] dx  = \frac{1}{2a^2} \left[(a^2-1)(|a-1|^{-1} - (a+1)^{-1}) + (a+1) - |a-1| \right] =\\
\begin{cases}\frac{2}{a^2}, &a > 1\\
0, & a <= 1
\end{cases}
$$
The zero case corresponds to the fact that the field inside the empty charged sphere is zero. You get it for free from Gauss theorem, and here you had to do some work. Finally,
$$
E_z = 4 \pi \rho \int_0^R \frac{dr}{a^2} \Theta(a - 1) = 4 \pi \rho \int_{0}^{min(R, r_0)} \frac{r^2 dr}{r_0^2} = \frac{4\pi \rho}{3} \frac{min(R,r_0)^3}{r_0^2}
$$
This is what Gauss theorem gives, if one restores the factor corresponding to your favorite system of units.
