# Homework Help: Electric field charge density question

1. Aug 22, 2010

### vorcil

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

Suppose the electric field in some region is found to be $$\bf{E} = kr^3 \bf{\hat{r}}$$, in spherical coordinates, (k is some constant).

(a) find the charge density $$\rho$$

(b) find the total charged contained in a sphere of radius R, centered at the origin. (do it two different ways)

2. Relevant equations

All of them,

$$\bf{E(r)} = \frac{1}{4\pi \epsilon_o} \int_V \frac{\rho (\bf{r'})}{\varsigma^2} \hat{\varsigma} d\tau' .$$

$$\nabla . \bf{E} = \frac{1}{\epsilon_o} \rho$$ <- Gauss's law

noting that $$\varsigma = \bf{r - r'}$$

3. The attempt at a solution

re aranging the equation above for rho

$$\epsilon_o \nabla . \bf{E} = \rho$$

I know i can use the partial derivative of the vector r for the divergence instead of the traditional partial derivative of x,y,z

$$\epsilon_o \frac{\partial}{\partial r} . \bf{E} = \rho$$
substituting in the given E, kr^3 into E

$$\epsilon_o \frac{\partial}{\partial r} . (k r^3) = \rho$$

computing the derivative d/dr of r I get,

$$\epsilon_0 3kr^2$$

-

NOW THIS IS WHERE I NEED HELP FOR THE FIRST QUESTION

I've been told that the answer is $$5\epsilon_0 kr^2$$
can someone please tell me how they got to that?????????????
i'm missing a factor of 2???

-

(b):
using gauss's law,

$$\oint \bf{E} . d\bf{a} = \frac{1}{\epsilon_o} Qenc$$
where Qenc is the enclosed charge within the surface/shape/sphere

solving for Qenc,
$$\epsilon_o \oint \bf{E} . d\bf{a} = Qenc$$
=

$$\epsilon_o \oint (kr^3) . da = Qenc$$

because the E field is a constant,
taking it outside of the integral, leaves me with having to integrate the integral over a closed surface da,

and because it's a sphere, the area of the sphere is just 4pir^2 (if i remember correctly)

making the equation end up as

$$\epsilon_o (kr^3) . (4\pi r^2) = Qenc$$
leaving the final charge contained in the sphere to be

$$4\pi \epsilon_o k r^5$$

- The question asks me to find this equation in two different ways,
I've found it using the only way I know how, using gauss's law
can someone help me think of a different way to find this equation?

2. Aug 22, 2010

### diazona

How do you know that? Because you can't. Look up the definition of divergence in spherical coordinates.

For the other part, try finding it from the charge density you calculated in part (a). (That would be a good way to check your calculations, if you hadn't been given the answer)

3. Aug 22, 2010

### Petar Mali

$$\vec{r}=rsin\Theta cos\varphi\vec{e}_x+rsin\Theta sin\varphi\vec{e}_y+rcos\Theta\vec{e}_z$$

4. Aug 22, 2010

### Petar Mali

5. Aug 22, 2010