# Total charge from charge density (spherical coordinates)

• bfusco
Please tell me if im incorrect on this or if there is a different way to do this.In summary, the electric field is k r^2 in spherical coordinates, where k is a constant. The charge density is found to be \rho = \epsilon( \vec{r}) and the total charge is found to be Q_e = \epsilon_0 k r^2 4\pi R^2.f

## Homework Statement

In some region of space, the electric field is $\vec{E} =k r^2 \hat{r}$, in spherical coordinates, where k is a constant.
(a) Use Gauss' law (differential form) to find the charge density $\rho (\vec{r})$.

(b) Use Gauss' law (integral form) to find the total charge containted in a sphere of radius R, centered at r=0

(c) Find the total charge contained in a sphere of radius R, centered at r=0 by direct integration of your result for $\rho (\vec{r})$ in (a). Does the answer agree with that in (b)?

## The Attempt at a Solution

NOTE: IM USING $\Delta$ as the del operator

Im pretty sure my problems only arise on part (c), but if any error is noticed in the other parts please tell me. Thank you

(a)using $$\vec{ \Delta} \bullet \vec{E} = \frac{\rho}{\epsilon_0}$$
rearranging it to solve for $\rho$ i get $$\rho = \epsilon( \vec{\Delta} \bullet \vec{E})$$ where $$\epsilon( \vec{\Delta} \bullet \vec{E}) = \frac{\epsilon_0}{r^2} \frac{d(r^2 k r^2)}{dr}$$ which reduces to $$\frac{r}{\pi}$$

(b) using $$\oint \Delta \bullet d\vec{a} = \frac{Q_e}{\epsilon_0}$$ and rearranging to solve for Q_e i get $$Q_e=\epsilon_0 \oint \vec{E} \bullet d\vec{a}$$, which since the sphere is symmetric about the origin i can do $$\epsilon_0 \oint |\vec{E}| d\vec{a}$$, which equals $$\epsilon_0 k r^2 4\pi R^2$$ which reduces to $$R^4$$ (note: i replaced $r^2$ with $R^2$)

(c) knowing $\rho = \frac{dq}{dV}$ and reorganizing to solve for dq i get $\int dq = \int \rho(\vec{r}) dV$ at this point I am a little confused on how to take the integral with respect to dV in spherical coordinates. I am pretty sure i have to add an $r^2$ in the integrand but I am not sure.

$dV = r^2 \sin(\theta) dr d\theta d\phi$

1
NOTE: IM USING $\Delta$ as the del operator

Don't! To most people,
$$\Delta = \nabla^2$$

Since you're using tex, just use \nabla for the del operator.

Don't! To most people,
$$\Delta = \nabla^2$$

Since you're using tex, just use \nabla for the del operator.

lol ok, i didnt know that

test $\nabla$

$dV = r^2 \sin(\theta) dr d\theta d\phi$

alright so since non of these variables have any unit vector other than $\hat{r}$ the $r^2 sin\theta =0$ ?? at which point the integral will be $$\oint \frac{r}{\pi} dr$$
which is $$\frac{r^2}{2\pi}$$ which doesn't match part (b), and therefore i am incorrect somewhere.