# Potential inside sphere?

I have a sphere of uniform charge density and I need to find the potential inside and outside. I found it for the outside, but I am wondering if my solution for the inside is correct. I used dV = E*dl,(* being the dot product) For my lower limit I used r, where r < a and "a" being the radius. For the upper limit I used zero because when r is zero, I figured zero potential because you have zero charge. The only problem I get a negative potential? Does this sound right?
Thank You
Philip

Tide
Homework Helper
What exactly did you use for the E field inside the sphere?

E = (p* r) / (3* e)
results
V = - (p r^2) / (6*e)

where p = roe and e = permittivity

Thanks

Tide
Homework Helper

Regarding the potential, since you didn't state it in your problem you are free to set the reference potential anywhere you want. Usually one takes the potential to be zero at infinity when dealing with a charge distribution of finite extent. However, once you choose your reference potential you must use it consistently throughout the analysis.

For example, if you set the potential equal to zero at infinity then the potential everywhere is relative to that. In that case you might perform your integration of the electric field starting at infinity and working inward. The potential at the origin will be relative to that. Similarly, you could set the potential at the origin to be zero in which case the potential at infinity will not be zero!

The sign or value of potential matters little since ultimately it is potential difference or gradient of the potential that matters.

OK I see what you are saying. I placed zero V at infinity when working outside sphere, so therefore I need to stick with the same. Let me make sure I have the concept down, I'm heading in from infinity and reach the out side of the sphere, this is where my V will be the greatest because my E is the greatest here right?
But if I was to intgrate from r to infinity, then infinity will be on the top and does not go to zero, my V does not look right this is what I get using r and infinity as my limits of intgration, p/(6*e) *(r^2-infinity), this doesn't see right?

Thanks again for you help
Philip

Tide
$$\int_{\infty}^{R} \frac {1}{s^2} ds + \int_{R}^{r} s ds$$