# Charge enclosed in a sphere

1. Oct 4, 2011

### warfreak131

1. The problem statement, all variables and given/known data

A solid insulating sphere of radius R is charged so that the charge density is proportional to the distance to the center, p(r)=kr, where k is a constant.

Find Q(r), the charge enclosed by a concentric spherical surface of radius r<= R. What is the total charge of the sphere?

2. Relevant equations

3. The attempt at a solution

I thought that Q=[Int from 0 to r] kr dV, and in spherical coordinates for radius, dV = r^2 dr.

So I have Q=[int from 0 to r] kr^3 dr = k [int, 0, r] r^3 dr = kr^4 / 4

2. Oct 4, 2011

### ehild

The volume element is a shell of radius r and thickness dr, which volume is dV=4pi r2dr

ehild

3. Oct 4, 2011

### warfreak131

then when do I use r^2 sin(theta) dr d(theta) d(phi)?

4. Oct 4, 2011

### ehild

You are right now, the volume element is dV=r^2sin(theta)dr d(theta) d(phi) in spherical coordinates, but not r^2dr as you wrote in your first post. Integrate the charge density for the sphere of radius r.

ehild

5. Oct 4, 2011

### warfreak131

So lets say a question gives you the charge density p=kr where k is a constant, and it wants you to find the electric field inside a solid sphere of radius R.

Id say that [int] E ds = q/e0

and i can pull out E, -> E [int] ds = q/e0

and using what you said, E [int] ds = [int] kr r^2sin(theta)dr d(theta) d(phi) / e0

I would be left with 4piR^2 E = (4piR^3)/3e0 -> E=R / 3e0 ?

6. Oct 4, 2011

### ehild

You have to integrate kr^3 with respect to r.

ehild

7. Oct 5, 2011

### warfreak131

So would the total enclosed charge be [int 0,R] kr * 4pi r^2 dr = k pi R^4 ?

and then I would get (k pi R^4) / (4 pi R^2 e0) = E = kR/4e0

Last edited: Oct 5, 2011
8. Oct 5, 2011

Yes.

ehild

9. Oct 5, 2011

### warfreak131

So if i use [int] E ds = k pi R^4 / e0, would I get E = kR^4 / 4r^2 e0 ?

Last edited: Oct 5, 2011
10. Oct 5, 2011

### ehild

It depends what you mean on R and r and [int] E ds.

ehild

11. Oct 5, 2011

### warfreak131

it'd be the surface integral of E ds = k pi R^4 / e0

and the surface would be 4 pi r^2, divide on both sides leaves you with E = kR^4 / 4r^2 e0

12. Oct 5, 2011

### ehild

Gauss' Law states that the surface integral of the electric field is equal to the enclosed charge divided by ε0. If you want to find the electric field at distance r from the centre of the charged sphere of radius R, you calculate the surface integral of E for a sphere of radius r. If r>R it encloses the whole charge, and your formula is rigth. If r≤R the enclosed charge is the charge inside the sphere of radius r. In this case, E=kr^4/(4r^2 ε0)=kr^2(4 ε0).

ehild