# Finding E field and charge density due to a potential given

1. Nov 8, 2015

1. The problem statement, all variables and given/known data
There is an electrostatic potential, given by $\phi(r)=\phi_0 e^{-\alpha r}$ where $\phi_0$ and $\alpha$ are some constants.

A: Find the electric charge denisty $\rho(r)$ which produces this aforementioned potential.

A: What is the electric field $\vec{E}(\vec{r})$ due to this charge denisty?

2. Relevant equations
$\nabla^2 \phi = \frac{- \rho(\vec{r})}{\epsilon_0}$
$\vec{E}(\vec{r}) = - \nabla \phi(\vec{r})$

3. The attempt at a solution
Very new to this material so still am a bit confused and when I can use certain equations and relations etc.
I have used the two equations in the section above, but am not sure if I can. For example the first equation the charge density is a function of the vector r whilst in my question it is just r; although I assume/hope that that just means that is is a constant charge density and the relation still holds in that case.

Also not sure if this is the most suitable section of the forum, so move if needed.

Anyway for A I have done
$$\nabla^2 \phi = \frac{- \rho(r)}{\epsilon_0} \\ \nabla \cdot \nabla \phi = \frac{-\rho(r)}{\epsilon_0} \\$$

Then $\nabla \phi$ is ..
$$\nabla \phi(r) = (\phi(r))' \frac{\vec{r}}{r} \\ \nabla \phi(r) = -\alpha \phi_0 e^{-\alpha r}\frac{\vec{r}}{r} \\$$

Then for $\nabla^2 \phi =$...

$$\nabla \cdot (-\alpha \phi_0 e^{-\alpha r}\frac{\vec{r}}{r})$$

Let $a=-\alpha \phi_0 e^{-\alpha r}$ and $\vec{B}= \frac{\vec{r}}{r}$

Then $\nabla \cdot a \vec{B} = \vec{B} \cdot \nabla a + a \nabla \cdot \vec{B}$

Then just $\vec{B} \cdot \nabla a$

$$\vec{B} \cdot \nabla a = \frac{\vec{r}}{r} \cdot - \alpha^2 \phi_0 e^{-\alpha r} \frac{\vec{r}}{r} = -\alpha^2 \phi_0 e^{-\alpha r} \frac{r^2}{r^2} = -\alpha^2 e^{-\alpha r}$$

Then for $a \nabla \cdot \vec{B}$

$$\nabla \cdot \vec{B} = \nabla \cdot r^{-1} \vec{r} = \vec{r} \cdot \nabla r^{-1} + r^{-1} \nabla \cdot \vec{r} \\ \nabla \cdot \vec{B} = \vec{r} \cdot - r^{-2} \frac{\vec{r}}{r} + 3 r^{-1} = - \frac{r^2}{r^3} + r^{-1} = \frac{2}{r}$$

So that $a \nabla \cdot \vec{B} = \frac{- 2 \alpha \phi_0 e^{-\alpha r}}{r}$

So then $\nabla^2 \phi = \vec{B} \cdot \nabla a + a \nabla \cdot \vec{B}$

$$\nabla^2 \phi = - \alpha^2 \phi_0 e^{- \alpha r} - \frac{- 2 \alpha \phi_0 e^{-\alpha r}}{r} \\ \nabla^2 \phi = \phi_0 e^{-\alpha r}(- \alpha^2 - \frac{2 \alpha}{r}) = \frac{- \rho(r) }{\epsilon_0} \\ \rho(r) =- \epsilon_0 \phi_0 e^{-\alpha r}(\alpha^2 + \frac{2 \alpha}{r})$$

And then for B I dont know if this is correct as it seemed to easy but...
$$\vec{E} ( \vec{r} ) = - \nabla \phi ( \vec{r} ) \\ \vec{E} ( \vec{r} ) = \alpha^2 e^{-\alpha r} \frac{\vec{r}}{r}$$

Any help or advice is very much appreciated! Thank you :)

2. Nov 8, 2015

### TSny

It would be much easier if you used the known expressions for the divergence and/or Laplacian in spherical coordinates. See https://en.wikipedia.org/wiki/Del_in_cylindrical_and_spherical_coordinates

However, your method will work. But it looks like you might have made a couple of minor errors.

Did you make a sign error on the right?

Another sign error going from the first to second equation shown above?

Check whether the factor of $\alpha^2$ is correct in the last equation.

3. Nov 8, 2015

Ah, yes it looks like I did, thanks! Also kept forgetting to type the phi zero factor before all the exp's.

Yes, so that and with the above error corrected aswell the last part shold be..

$$\nabla^2 \phi = \alpha^2 \phi_0 e^{- \alpha r} - \frac{- 2 \alpha \phi_0 e^{-\alpha r}}{r} \\ \nabla^2 \phi = \phi_0 e^{-\alpha r}( \alpha^2 - \frac{2 \alpha}{r}) = \frac{- \rho(r) }{\epsilon_0} \\ \rho(r) =- \epsilon_0 \phi_0 e^{\alpha r}(\alpha^2 - \frac{2 \alpha}{r})$$

Oops yeah should only be alpha, and again I forgot the phi zero,

So that should be
$$\vec{E} ( \vec{r} ) = - \nabla \phi ( \vec{r} ) \\ \vec{E} ( \vec{r} ) = \alpha \phi_0 e^{-\alpha r} \frac{\vec{r}}{r}$$

4. Nov 8, 2015

### TSny

I believe that's the correct expression for the electric field.

5. Nov 8, 2015

Thank you. I just edited my reply, when I first posted it half of my reply got caught in the quote tags.

6. Nov 8, 2015

### TSny

Looks good except for a sign error in the exponent of $e$.

7. Nov 8, 2015