# Charge Density

1. Oct 9, 2009

### YoGabbaGabba

1. The problem statement, all variables and given/known data
In a sphere of radius R, the charge density varies as $$\rho$$(r) = BrN. There is no charge outside the sphere. B and N are constants.

a.) Find the charge enclosed in a sphere of radius r<R.

2. Relevant equations
$$\rho$$=dq/dv

3. The attempt at a solution
I integrated $$\rho$$(r)(4$$\pi$$r2dr) and got q=(4$$\pi$$BrN+3)/(N+3) + C. Is this right? If so, would it be correct to use the boundary condition; @ r=R, q=0 in order to solve for C? It doesn't sound right because there must be charge at the surface?

2. Oct 9, 2009

### rl.bhat

Hi YoGabbaGabba, welcome to PF,
You are required to find the field at r<R. So you need not the condition r = R. Instead you can take the condition q = 0 at r = 0.

3. Oct 10, 2009

### YoGabbaGabba

Thanks for your time. So if asked to find the charge when r>R, is the charge simply zero or do we consider the boundary conditions r=R? Thanks.

4. Oct 10, 2009

### rl.bhat

Charge density cannot be zero between r = 0 to r = R. And asking to find the charge density when r > R is meaning less.