# Electric potential convention

by Shinobii
Tags: electric potenial, electrostatcs
 P: 34 Hello, The electric potential is defined as: $$\phi(\vec{r}) = \int d^3r' \frac{\rho(\vec{r}')}{|\vec{r} - \vec{r}'|}.$$ My question is, for solving for the potential inside of a charged solid sphere (constant charge density) by using the above equation I get, $$\frac{Q}{2R} \bigg( \frac{r^2}{R^2} - 3 \bigg).$$ When the result is actually the above multiplied by a minus sign. Is this because when we take the reference point to be infinity, that we apply a minus sign by convention? I just want to be sure exactly why the minus sign is introduced.
 P: 34 Well this is the equation I get for inside the sphere, $$3q \bigg( \int_{\infty}^R \frac{1}{r^2} dr + \int_R^r r \,\, dr \bigg)$$ Which leaves me with the result stated. . .
 Sci Advisor Thanks P: 2,440 Electric potential convention I don't understand your equation. You have to evaluate the integral as given in your first posting: $$\phi(\vec{x})=\int_{\mathbb{R}^3} \frac{\rho(\vec{x}')}{|\vec{x}'-\vec{x}|}.$$ For your example of a homgeneously charged sphere you have $$\rho(\vec{x}')=\frac{3 Q}{4 \pi R^3} \Theta(R-|\vec{x}'|).$$ The integral is most easily performed in spherical coordinates with the polar axis in direction of $\vec{x}$, which gives $$(\vec{x}'-\vec{x})^2=r'^2+r^2-2r r' \cos \vartheta'.$$ Here $r=|\vec{x}|$ and $=r'=|\vec{x}'| and [itex]\vartheta'$ is the polar angle. Then you have $$\phi(\vec{x})=\frac{3Q}{4 \pi R^3} \int_0^{2 \pi} \mathrm{d} \varphi' \int_0^{\pi} \mathrm{d} \vartheta' \int_0^R \mathrm{d} r' \; \frac{r'^2 \sin \vartheta'}{\sqrt{r^2+r'^2-2r r' \cos \vartheta'}}.$$ Now you can do the angular integrations first. The one over $\varphi'$ is trivial, just giving a factor $2 \pi$. The one over $\vartheta'$ is done by substitution $u=\sin \vartheta'$: $$\phi(\vec{x})=\frac{3Q}{2 R^3} \int_0^R \mathrm{d} r' \int_{-1}^1 \mathrm{d} u \frac{r'^2}{\sqrt{r^2+r'^2-2 r r' u}}=\frac{3Q}{2 R^3} \int_0^R \mathrm{d}r' \frac{r'}{r} (r+r'-|r-r'|).$$ The remaining integral must be evaluated separately for the cases $rR$. For $rR$ the integral is easy, because then always $r'  P: 34 Ah I see now, I was going about it the wrong way it seems! Thank you very much @vanhees71 for the detailed solution, this clears up a lot of questions I had. Also, (just in case you want to edit your post) you should have [itex] u = \cos(\theta')$. And you missed a / on your itex command (or an itex command altogether).