# Electric potential due to a solid sphere

Tags:
1. Jul 1, 2017

### Marcus Nielsen

• Member advised to use the homework template for posts in the homework sections of PF.
Hello Guys! This is my first post so bear with me. I am currently studying the basics of electrostatics using the textbook "Introduction to electrodynamics 3 edt. - David J. Griffiths". My problem comes when i try to solve problem 2.21.

Find the potential V inside and outside a uniformly charged solid sphere whose radius is R and whose total charge is q. Use infinity as your reference point. Compute the gradient of V in each region, and check that it yields the correct field. Sketch V(r).

Using the equation $V(r) = \int\limits_O^r \boldsymbol{E} \cdot \mathrm{d} \boldsymbol{l}$ and Gauss law $\oint \boldsymbol{E} \cdot \mathrm{d} \boldsymbol{a} = \frac{Q_{enc}}{\epsilon_0}$, I can solve the problem and get the same answer as in this guide http://www.physicspages.com/2011/10/08/electric-potential-examples/ first example. But my problem appears when I want to use the formular $V(\boldsymbol{r})= \frac{1}{4 \pi \epsilon_0} \int \frac{\rho(\boldsymbol{r'})}{\eta} \mathrm{d}\tau'$ where $\boldsymbol{\eta} = \boldsymbol{r}-\boldsymbol{r}'$ as defined in Griffiths textbook.

This is my calculation using the last formular.

We got a solid sphere with radius R and total charge q, therefore $\rho = \frac{q}{\frac{4}{3} \pi R^3}$

\begin{align*} V &= \frac{1}{4 \pi \epsilon_0} \int \frac{\rho(\boldsymbol{r'})}{\eta} \mathrm{d}\tau' \\ &= \frac{1}{4 \pi \epsilon_0} \int\limits^{2 \pi}_0 \int\limits^{\pi}_{0} \int\limits^{R}_0 \frac{\rho}{\sqrt{r^2+z^2-2rz \cos(\theta)}} \sin(\theta) \ \mathrm{d}r \ \mathrm{d}\theta \ \mathrm{d}\phi \end{align*}
Using substitution $g =r^2+z^2-2rz \cos(\theta) \longrightarrow \mathrm{d}\theta = \frac{1}{2rz \sin(\theta)} \mathrm{d}g$
\begin{align*} V &= \frac{1}{4 \pi \epsilon_0} \int\limits^{2 \pi}_0 \int\limits^{g(\pi)}_{g(0)} \int\limits^{R}_0 \frac{\rho}{2rz\sqrt{g}} \ \mathrm{d}r \ \mathrm{d}g \ \mathrm{d}\phi\\ &= \frac{1}{4 \pi \epsilon_0} 2 \pi \int\limits^R_0 \int\limits^{g(\pi)}_{g(0)} \frac{\rho}{2rz \sqrt{g}} \ \mathrm{d}g \ \mathrm{d}r\\ &= \frac{1}{4 \epsilon_0} \int\limits^R_0 \int\limits^{g(\pi)}_{g(0)} \frac{\rho}{rz \sqrt{g}} \ \mathrm{d}g \ \mathrm{d}r\\ &= \frac{1}{4 \epsilon_0} \int\limits^R_0 \frac{2\rho}{rz} \Big[ \sqrt{g} \Big]^{g(\pi)}_{g(0)} \ \mathrm{d}r\\ &= \frac{1}{4 \epsilon_0} \int\limits^R_0 \frac{2\rho}{rz} \Big( \sqrt{r^2+z^2+2rz} - \sqrt{r^2+z^2-2rz} \Big) \ \mathrm{d}r\\ &= \frac{1}{4 \epsilon_0} \int\limits^R_0 \frac{2\rho}{rz} \Big( \sqrt{(r+z)^2} - \sqrt{(r-z)^2} \Big) \ \mathrm{d}r\\ \end{align*}
At this stage I am a bit confused, the r will cancel out and i will be left with 1/r which will turn out to ln(r) after integration, does any one know what am I doing wrong?

2. Jul 1, 2017

### ehild

Is the volume element really sin(θ) dθ dΦ dr?
What is z?

Last edited: Jul 1, 2017
3. Jul 1, 2017

### Marcus Nielsen

Oh there is actually missing a $r^2$. Due to Griffiths book the volume element is given by the formula $\mathrm{d} \tau = r^2 \sin(\theta) \ \mathrm{d}\theta \ \mathrm{d}\phi \ \mathrm{d}r$.

4. Jul 1, 2017

### ehild

Yes, but you integrate with respect to r'. You have to use different symbols for the position of the point r where you want to determine the potential, and the position of the charge element r' inside the sphere. And what is z?

5. Jul 1, 2017

### Marcus Nielsen

So z is the distance from the origin to the point where I want to know the potential. The shown figure above is made for a shell, so the small rectangle should be a small volume element. And the angle $\theta'$ is what I call $\theta$

6. Jul 1, 2017

### Marcus Nielsen

Aarh I see. I am actually confusing my self by avoiding the ' symbol. Thanks I will try again.