# Constant Electric Field

1. Apr 23, 2016

### Kernul

1. The problem statement, all variables and given/known data
A volumetric charge density $\rho = \frac{A}{r}$ is distributed in the spheric region $r_1 < r < r_2$ ($A$ is constant). A point charge $q$ is located in the center of the sphere ($r = 0$). What should be the value of $A$ so that the module of the electric field is constant for $r_1 < r < r_2$?

2. Relevant equations
Gauss Theorem for continuous distribution
$\Phi_s (\vec E_0) = \int_S \vec E_0 \cdot d\vec S = \frac{1}{\epsilon_0} \int_\tau \rho (x, y, z) d\tau$

3. The attempt at a solution
What the problem is asking is to find $A$ so that $E_0 = const$.
I started by finding the electric field for $r_1$ and $r_2$, so, if I'm not wrong:
for $r_1$
$E_0 4 \pi r_1^2 = \frac{1}{\epsilon_0} \int_\tau \rho (x, y, z) d\tau$
We know that $dq = \rho (x, y, z) d\tau$ so we have
$E_0 4 \pi r_1^2 = \frac{Q}{\epsilon_0}$
$E_0 = \frac{Q}{4 \pi \epsilon_0 r_1^2}$ or $E_0 = \frac{1}{4 \pi \epsilon_0} \frac{Q}{r_1^2}$
same thing for $r_2$
$E_0 = \frac{Q}{4 \pi \epsilon_0 r_2^2}$ or $E_0 = \frac{1}{4 \pi \epsilon_0} \frac{Q}{r_2^2}$
Since we know that it's a sphere, $Q = \rho \frac{4}{3} \pi r_1^3$ and $Q = \rho \frac{4}{3} \pi r_2^3$.
So the above expressions become
$E_0 = \frac{1}{4 \pi \epsilon_0} \frac{\rho}{r_1^2} \frac{4}{3} \pi r_1^3 = \frac{\rho r_1}{3 \epsilon_0}$
and
$E_0 = \frac{\rho r_2}{3 \epsilon_0}$

At this point I thought that by simply doing this $\frac{\rho r_1}{3 \epsilon_0} = \frac{\rho r_2}{3 \epsilon_0}$ I would have found $A$ but it's not true because I obviously find myself with $r_1 = r_2$. How should I proceed doing this? Was it good finding the two electric field? Or I went the wrong way?

2. Apr 23, 2016

### SammyS

Staff Emeritus
What is the total charge inside the sphere at radius r1 ?

I should have been more complete with my answer:

The only charge at r < r1 is the charge, q, at the center.

Therefore, the magnitude of the electric field at r = r1 is $\displaystyle \ E=\frac1{4\pi\epsilon_0}\frac{q}{ r_1}\ .$

Last edited: Apr 23, 2016
3. Apr 23, 2016

### Kernul

So this means that $A = \frac{3 r q}{4 \pi r_1 r_2}$? How do I check if it's correct? Do I have to find the electric field in $r_1 < r < r_2$?
Because the electric field there for me is $E_0 = A \frac{(r_2 - r_1)}{r^2}$ and so $\frac{3 q}{4 \pi} \left(\frac{r_2}{r_1} - \frac{r_1}{r_2} \right)$. Is it correct?

4. Apr 23, 2016

### SammyS

Staff Emeritus
A is a constant, so it does not depend on r .

How did you arrive at that value ?

5. Apr 23, 2016

### Kernul

For $r = r_1$ we have $E_0 = \frac{1}{4 \pi \epsilon_0} \frac{q}{r_1}$ while for $r = r_2$ we have $E_0 = \frac{\rho r_2}{3 \epsilon_0} = \frac{A r_2}{3 \epsilon_0 r}$. Then I thought that in order to find $A$ I could do this $\frac{1}{4 \pi \epsilon_0} \frac{q}{r_1} = \frac{A r_2}{3 \epsilon_0 r}$ and so $A = \frac{3 r q}{4 \pi r_1 r_2}$. Is it wrong?

6. Apr 23, 2016

### SammyS

Staff Emeritus
For r = r2 both q and the amount of charge between r1 an r2 contribute to the electric field .

You are leaving out $\displaystyle \ E=\frac1{4\pi\epsilon_0}\frac{q}{ r_2}\ .$

7. Apr 23, 2016

### Kernul

Oh! So for $r = r_2$ we have $E_0 = \left( \frac{1}{4 \pi \epsilon_0} \frac{q}{r_2} \right) + \left( \frac{A r_2}{3 \epsilon_0 r} \right)$?

8. Apr 23, 2016

### SammyS

Staff Emeritus
Not correct.

Over what range of r are you integrating ρ(r) ?

Also, what is r doing in the denominator?

9. Apr 23, 2016

### Kernul

Because $\rho = \frac{A}{r}$ so I simply wrote that instead of $\rho$. The range is from $0$ to $r_2$. Should I do it from $r_1$ to $r_2$?

10. Apr 23, 2016

### SammyS

Staff Emeritus
It's from $\ r_1\$ to $\ r_2\,,\$ so use that.

11. Apr 23, 2016

### Kernul

Okay, so it should be this:
$E_0 4 \pi r^2 = \frac{1}{\epsilon_0} \int_{r_1}^{r_2} \rho(r) d\tau$
$E_0 = \frac{1}{4 \pi r^2} \frac{1}{\epsilon_0} \int_{r_1}^{r_2} \rho(r) d\tau$
$E_0 = \frac{1}{4 \pi \epsilon_0} \frac{1}{r^2} \int_{r_1}^{r_2} \frac{A}{r} \frac{4}{3} \pi r^3 dr$
$E_0 = \frac{1}{\epsilon_0} \frac{A}{3 r^2} \int_{r_1}^{r_2} r^2 dr$
$E_0 = \frac{A}{3 \epsilon_0 r^2} \left[ \frac{r^3}{3} \right]_{r_1}^{r_2}$
$E_0 = \frac{A}{9 \epsilon_0 r^2} \left( r_2^3 - r_1^3 \right)$
Is this correct?

12. Apr 23, 2016

### SammyS

Staff Emeritus
No - not the way to integrate over a volume.

The volume element of integration for a spherical shell is: $\ 4\pi r^2 dr\$.

Use that instead of $\displaystyle \ \frac43 \pi r^3 dr\$

13. Apr 23, 2016

### Kernul

Oh! So it's $E_0 = \frac{A}{2 \epsilon_0 r^2} \left( r_2^2 - r_1^2 \right)$?
And for $r = r_2$ in total we have $E_0 = \frac{1}{4 \pi \epsilon_0} \frac{q}{r_2} + \frac{A}{2 \epsilon_0 r^2} \left( r_2^2 - r_1^2 \right)$
After this I just have to do like this:
$$\frac{1}{4 \pi \epsilon_0} \frac{q}{r_1} = \frac{1}{4 \pi \epsilon_0} \frac{q}{r_2} + \frac{A}{2 \epsilon_0 r^2} \left( r_2^2 - r_1^2 \right)$$
Is it right in order to find $A$?

14. Apr 23, 2016

### SammyS

Staff Emeritus
Too many different E0-s.

The amount of charge for the whole shell (from r1 to r2) is indeed $\displaystyle\ 2\pi A\left( r_2^2 - r_1^2 \right)\,,\$ which you must have gotten judging by you expressions.

Then the electric field at r2 is due that charge plus the charge, q, at the center.

The correct value of E at r = r2 is close to what you have on the second line, except you need r22 in the denominator, not r2.

(You're forgetting to square r in a number of places. Just because I did - that is no excuse. )

15. Apr 24, 2016

### Kernul

$E_0 - s$? What do you mean?

Oh yeah, it becomes $\frac{q + 2 \pi A (r_2^2 - r_1^2)}{4 \pi \epsilon_0 r_2^2}$, right?

You're right, because the $d\vec S$ is of the sphere with $r = r_2$ and not a random $r$, right?

Yeah, I'm sorry...

16. Apr 24, 2016

### SammyS

Staff Emeritus
My poor attempt to pluralize E0 .

17. Apr 24, 2016

### Kernul

Oh okay.
But still, now that I have the electric field between $r_1$ and $r_2$, how do I find $A$ so that the electric field is constant?
Is it something like this:
$E_0 = 2 \pi A (r_2^2 - r_1^2)$
$A = \frac{E_0}{2 \pi (r_2^2 - r_1^2)}$

18. Apr 24, 2016

### SammyS

Staff Emeritus
What does that subscript of 0 mean?

What you need:
The electric field at r1 must be equal to the electric field at r2 .

Set them equal and solve for A.

In other words,
Fix this equation from post #13
$\displaystyle \frac{1}{4 \pi \epsilon_0} \frac{q}{r_1} = \frac{1}{4 \pi \epsilon_0} \frac{q}{r_2} + \frac{A}{2 \epsilon_0 r^2} \left( r_2^2 - r_1^2 \right)\$​

becomes:
$\displaystyle \frac{1}{4 \pi \epsilon_0} \frac{q}{r_1^2} = \frac{1}{4 \pi \epsilon_0} \frac{q}{r_2^2} + \frac{A}{2 \epsilon_0 r_2^2} \left( r_2^2 - r_1^2 \right)\$​

Solve for A.

Last edited: Apr 24, 2016
19. Apr 24, 2016

### Kernul

So this:
$\frac{1}{4 \pi \epsilon_0} \frac{q}{r_1^2} = \frac{1}{4 \pi \epsilon_0} \frac{q}{r_2^2} + \frac{A}{2 \epsilon_0 r_2^2} \left( r_2^2 - r_1^2 \right)$
Because if it's this I have $A = \frac{q}{2 \pi r_1^2}$.

20. Apr 24, 2016

### SammyS

Staff Emeritus
Yes !

Now, does that work for E at r = c, if r1 < c < r2 ?