# Homework Help: Electric field inside a sphere

Tags:
1. Oct 6, 2015

### shinobi20

1. The problem statement, all variables and given/known data
A sphere with radius R has a spherically symmetric charge density that varies as 1/r. What is the electric field outside and inside the sphere?

2. Relevant equations
E=kQ/r^2, ε=permitivity of free space, Q=total charge, ρ=charge density, dτ=infinitesimal volume

3. The attempt at a solution
For the case (outside), due to the concept that we can treat the sphere as a point charge, E = (1/4*pi*e)(Q/r^2).

For the case (inside), by using a Gaussian surface, we have E (4πr^2) = Q/ε. By evaluating Q = ∫ ρ dτ. I got E = (R^2)/(2εr^2).

Is this correct? Or am I missing something?

Last edited: Oct 6, 2015
2. Oct 6, 2015

### BvU

I don't see them matching up at r = R

Your inside case solution description isn't detailed enough for me to tell you where you derail.
And your problem description has holes in it. Is Q the total charge on the sphere? Is it a given ? What does that mean for the enclosed charge when r < R ?

3. Oct 6, 2015

### shinobi20

Sorry, there was a typo, it should be E(4πr^2) = Q/ε and Q is the total charge. What I've done for the inside is, given ∫E⋅da = Q/ε, we have E(4πr^2) = Q/ε. But Q=∫ρ dτ and ρ=1/r. So Q=∫ dτ/r. Also, dτ= r^2 sinθ dr dθ d∅ is the change of the volume in spherical coordinates. So, Q=∫ r sinθ dr dθ d∅. 0≤r≤R, 0≤θ≤π, 0≤∅≤ 2π. By integration, I got Q = (4πR^2)/2. Thus, I got E = (R^2)/ 2εr^2.

4. Oct 6, 2015

### BvU

Aha! Check your integration bounds for the contained charge when r < R ! Contained charge as a function of r is not a constant ! You confuse yourself by using the symbol Q both for the total charge and also for contained charge as a function of r...

5. Oct 6, 2015

### shinobi20

Oh! So to rephrase, E(4 π r'^2) = Qenc/ε with Qenc as the enclosed charge in the gaussian surface. Qenc= ∫ r sinθ dr dθ d∅. 0≤r≤r', 0≤θ≤π, 0≤∅≤ 2π. Qenc = (4 π r'^2)/2. But this will cancel the r'. E(4 π r'^2) = (4 π r'^2)/2ε.

6. Oct 6, 2015

### BvU

So nice it doesn't diverge for r to 0, and that now it matches at r = R !

7. Oct 6, 2015

### shinobi20

I've done everything over and over, If I integrate, the two r' really cancel, is there something wrong here? I'm confused.

8. Oct 6, 2015

### BvU

I think it's the right answer.

9. Oct 6, 2015

### shinobi20

What do you mean right? But that will mean the electric field is not varying as we go from r=0 to r=r'. How is that?

10. Oct 6, 2015

### BvU

It means area and charge contained grow with the same power of r . In another example (number 4 here) charge grows with r3 and area with r2, so E grows with r1

11. Oct 6, 2015

### shinobi20

Thank you so much!!! That is kinda subtle.