# Integrating charge density

## Homework Statement

Find the electric charge centred in a sphere of radius a, centered at the origin where the electric potential is found to be (in spherical coordinates) $V(r)=kr^-2$ where k is some constant.

## The Attempt at a Solution

We have $E=-\nabla V = -2kr^{-3} \hat{r}$
So applying Guass's law to the sphere of radius a, we get
$\oint_s E \cdot da = \frac{Q}{\epsilon_0}$
And thus $Q= \frac{-8\pi k \epsilon_0}{a}$

My problem is, surely the same result should be obtained by taking the triple integral of the charge density with respect to volume, but pursuing this path...
$$\rho=-\epsilon_0 \nabla^2 V(r) = -\epsilon_0 2kr^{-4}$$
Attempting to integrate this in spherical coordinates results in,
$$Q= \iiint_V \rho dV = -8\pi \epsilon_0 k \int_0^a r^{-2} dr$$
but due to the singularity this tends to infinity. Where did I take a wrong step?

Related Introductory Physics Homework Help News on Phys.org
tiny-tim
Homework Helper
Hi T-chef! We have $E=-\nabla V = -2kr^{-3} \hat{r}$
Nooo … ∂/∂x 1/(x2 + y2 + z2) = … ? Hello Tiny Tim!
I was hoping by working in spherical coordinates I could make my life easier. My book assures me here grad is given by
$$\nabla t = \frac{\partial t}{\partial r}\hat{r} + \frac{1}{r}\frac{\partial t}{\partial \theta}\hat{\theta}+\frac{1}{rsin(\theta)}\frac{\partial t}{\partial\phi}\hat{\phi}$$
So since V is independent of the angles, their partial derivatives vanish leaving me with just the first term. Have I misinterpreted working with grad in other coordinates systems?

i think the potential for V is only the potential outside the sphere. inside the sphere the potential is affected by the charge distributions themselves
also the laplacian of the potential is NOT equivalent to taking the gradient twice, check the math and i think u will see something that looks like a dirac delta function

I used the Laplacian as expressed in spherical coordinates, which i certainly agree, is not taking grad twice That said, I suppose I could have used:
$$E=-2kr^{-3} \hat{r}$$
so:
$$\nabla \cdot E = \frac{\rho}{\epsilon_0}$$
$$\rho = \epsilon_0 \nabla \cdot (-2kr^{-3} \hat{r})$$
Now in my (very limited!) knowledge of delta functions, don't I need to be applying divergence to a $\frac{\bf{\hat{r}}}{r^2}$ term to introduce a delta function, rather than the -3 power I've found myself with?