# Electrostatic Potential over all space

1. Aug 20, 2012

### Demon117

If I have a sphere with radius R which has a charge distribution given by

$\rho(r)=\frac{5Q}{\pi R^{5}}r(r-R)$

and $\rho = 0$ at r bigger or equal to R, how do I find the electrostatic potential of this overall space? There is a charge Q, in addition, at the origin.

My original thought was to just do the usual and use

$V(r)=\frac{1}{4\pi\epsilon_{0}}\int \frac{\rho(r')}{r}dt'$,

which if I am correct the integration goes from 0 to R, correct. Or does it extend from infinity in to R? This has never made much sense to me. Somebody help me out with this idea. Thanks!

2. Aug 20, 2012

### Demon117

Or do I integrate from 0 to R, plus integrate from R to r? That seems a lot more in line with "over all-space". . . let me know your thoughts.

3. Aug 21, 2012

### Staff: Mentor

For the potential at a given radius r, you can neglect all charges outside (r'>r) and assume that all charges inside are at r'=0. This is similar to gravity, and follows from the spherical symmetry.

Therefore, for radius r, $\frac{dV(r)}{dr}=\frac{Q(r)}{r^2}$ with prefactors depending on your units. Q(r) is the total charge up to radius r: $Q(r)=Q_0 + \int_0^r 4 \pi r'^2 \rho(r') dr'$.
You can find an analytic expression for Q(r), this can be used in the first equation, and another integration will give you the potential.

4. Aug 21, 2012

### vanhees71

I'd rather solve the differential equation (written in Heaviside-Lorentz units)
$$\Delta \Phi=-\rho.$$
Since the charge distribution is radially symmetric, you can make the ansatz in spherical coordinates,
$$\Phi(\vec{x})=\Phi(r).$$
Then from the Laplacian in spherical coordinates you get
$$\Delta \Phi=\frac{1}{r^2} [r^2 \Phi'(r)]',$$
and the equation becomes an ordinary differential equation, which you have to solve with the appropriate boundary conditions. This leads to mfb's solution (modulo a sign and prefactors depending on the system of units used).