# Homework Help: Charge density as a function of r

1. Sep 21, 2010

### JJfortherear

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

Find the volume charge density (ρr) as a function of r

2. Relevant equations

Gauss's law

3. The attempt at a solution

I get that dQ=4πr2ρrdr, but have no idea how to solve for ρ

2. Sep 21, 2010

### kuruman

Have you seen the following form of Gauss's Law?

$$\nabla\cdot E = \rho/\epsilon_0$$

3. Sep 21, 2010

### fizzynoob

like kuruman said, its application of gauss's law

Flux = $$\oint$$E (dot) dA = q/e

you found q to be 4πr2ρ, but p = Charge / Volume

but 4πr^2 isnt the volume of a sphere