# Find charge density rho of a uniform shpere with radius R

1. Feb 21, 2015

### Andrew11

1. The problem statement, all variables and given/known data
Find the potential V(r) inside and outside of a uniformly charged sphere with radius R and total charge q.
A) Fix first the charge density ρ(r) in the two regions 1: r>R and 2: 0<r<R the results should only be in terms of q and R

2. Relevant equations
ρ= qtot/Vtot
dq= ρ*Venc

3. The attempt at a solution
ρ= qtot/(4/3)piR^3
dq = [(qtot/(4/3)piR^3)*(4/3)pir^3]dr⇒(q*r^3/R^3)
∫dq = ∫q*(r^3/R^3)dr⇒ q*(¼r^4/R^3)

not sure if this is the correct approach to the problem

2. Feb 22, 2015

### Staff: Mentor

Don't forget brackets: ρ= qtot/((4/3)piR^3) or $\rho = \frac{3q}{4\pi R^3}$. Also, is this the charge density everywhere?
I don't understand what you are trying to do in the two lines below. You found the charge density, what does the integral mean and why do you integrate over a charge?