# Electric field outside and inside of a sphere

An insulating sphere of radius a carries a total charge $q$ which is uniformly distributed over the volume of the sphere.

I'm trying to find the electric field distribution both inside and outside the sphere using Gauss Law.

We know that on the closed gaussian surface with spherically symmetric charge distribution Gauss Law states: $\frac{q}{ε_0}= \oint \vec{E} \cdot d\vec{A}$

1. Outside of sphere: Logically, the charge outside of a sphere will be always on the Gaussian surface and it doesn't change, therefore the electric field outside of a sphere: $E=\frac{q}{4πε_0r^{2}}$
2. Inside of sphere: Because the charge is symmetrically distributed on the surface and if I image a little sphere with radius r inside the sphere with radius r, the little sphere will have less charge on its surface. $E=\frac{q \ r}{4πε_0a^{3}}$

Is this explanation sufficient?

What would be the difference if I have a conducting sphere?

When using the Gauss formula the q is not the charge distributed on the surface, it is the charge enclosed by your Gaussian sphere. Inside of the sphere the charges are distributed evenly throughout the volume not the surface. This means when considering the inside of the insulator, you need to consider how much volume you have enclosed with your Gaussian sphere and then how much charge is inside that volume using the charge distribution.

Maybe you have a slight misunderstanding of Gauss Law. It states that the integral of the scalar product of the electric field vectors with the normal vectors of the closed surface, integrated all over the surface is equal to the total charge enclosed inside the surface (times some constant). This is true not only for a spherical surface but for any closed surface. In this case a spherical surface is very convenient since because of the symmetry of the electric field, the field vectors will always be parallel to the normal vectors of the surface. Which means that

$$\oint \vec{E} \cdot d\vec{A}=E*4\pi*r^2 \tag{1}$$

Here, both the left and right side of the equation are a function of the distance from the origin, r and are true for all r. E is the magnitude of the electic field.

Now lets consider the charge enclosed in this surface as a function of r. Inside the charged ball, this function is

$$q_{enc}(r)=\frac{4}{3}\pi r^3 \rho \tag{2}$$

where $\rho$ is the charge density per volume. Outside of the ball, no matter at which distance you are, the charge enclosed is always just q(total charge). Combining this with (1) via gaus law as you stated it we get

$$E(r)=\frac{q}{4 \pi \epsilon r^2} \tag{3}$$

outside of the ball, and

$$E(r)=\frac{\rho r}{3 \epsilon }\tag{4}$$

inside it. ($\rho =\frac{q}{(4/3) \pi a^3}$ so your second formula is correct.)

If you use a conducting ball instead, all charges will distribute on the surface of the ball, since they want to be as far apart from each other as they can. Since this means that there is no charge anymore in any closed surface that you imagine inside the ball, this means that the e-field inside is zero everywhere. Outside of the ball, the gauss surface will contain the whole charge again so from outside the formula for the e-field will be (3) again. So you see that from outside, the homogenously charged ball looks exactly like a ball thats only charged on its surface and also exactly like the field of a point charge at the origin with the same total charge.