Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Electric field due to a charge density.

  1. Apr 25, 2012 #1
    1. The problem statement, all variables and given/known data
    Consider charge distribution [itex]\rho = \frac{A}{r}[/itex] with spherical symmetry, for [itex] 0 \leq r \leq R[/itex], and [itex]\rho = 0[/itex] for [itex] r > R[/itex], and A is a constant. Find the Electric Field in all of space. Check your answer obtaining [itex]\rho[/itex] from your answer.

    2. Relevant equations

    Gauss's law:

    [tex]\oint \mathbf{E} \cdot \mathbf{dS} = \frac{q_{enc}}{\epsilon_{0}} [/tex]
    [tex]\mathbf{\nabla} \cdot \mathbf{E} = \frac{\rho}{\epsilon_{0}}[/tex]

    3. The attempt at a solution

    So, this should be pretty simple.

    I should get the field using Gauss's law in it's integral form, since there is a spherical symmetry.

    [tex]\mathbf{E} = \frac{q_{enc}}{4 \pi \epsilon_{0} R^{2}}[/tex]

    And then I find the [itex]q[/itex] by integrating the charge density:

    [tex]q_{enc} = \iiint\limits_V \rho r^{2} sin(\theta) dr d\theta d\phi[/tex]

    [tex]V = \left\{ (r, \theta, \phi) | 0 \leq r \leq R, 0 \leq \theta \leq \pi, 0 \leq \phi \leq 2\pi\right\}[/tex]

    [tex]q_{enc} = \iiint\limits_V \frac{A}{r} r^{2} sin(\theta) dr d\theta d\phi[/tex]

    [tex]q_{enc} = 4 \pi A \int r dr[/tex]

    [tex]q_{enc} = 2 \pi A R^{2}[/tex]

    Substituting in the Electric field:

    [tex]E = \frac{A}{2\epsilon_{0}}[/tex]

    But this has to be wrong.
    By doing Gauss's law in the differential form, I got [itex]\mathbf{\nabla} \cdot \mathbf{E} = 0[/itex], instead of finding the charge density [itex]\rho[/itex].

    Where am I going wrong here?
  2. jcsd
  3. Apr 25, 2012 #2
    [itex]\mathbf{E} = \frac{q_{enc}}{4 \pi \epsilon_{0} R^{2}}[/itex]

    Is that really Electric Field in all of space? What're electric field inside and outside sphere?
    Last edited: Apr 25, 2012
  4. Apr 26, 2012 #3
    Taking [itex]r = a ; a < R[/itex], I get:

    [tex]q_{enc} = \iiint\limits_V \rho dV [/tex]
    [tex]q_{enc} = 4 \pi A \int r dr[/tex]
    [tex]q_{enc} = 2 \pi A a^{2}[/tex]

    More generally: [itex]q_{enc} = 2 \pi A r^{2}[/itex]

    And the total charge [itex]Q_{tot}[/itex] is [itex]2 \pi A R^{2}[/itex]


    [tex]q_{enc} = \frac{Q_{tot} r^{2}}{R^{2}}[/tex]


    [tex]\oint \mathbf{E} \cdot \mathbf{dS} = \frac{q_{enc}}{\epsilon_{0}}[/tex]
    [tex]\mathbf{E} = \frac{q_{enc}}{4 \pi \epsilon_{0} r^{2}}[/tex]
    [tex]\mathbf{E} = \frac{Q_{tot} r^{2}}{4 \pi \epsilon_{0} r^{2} R^{2}}[/tex]
    [tex]\mathbf{E} = \frac{Q_{tot}}{4 \pi \epsilon_{0} R^{2}}[/tex]

    Still getting the same result here, and [itex] \mathbf{\nabla} \cdot \mathbf{E}[/itex] here still is zero, since [itex]R[/itex] is a constant.

    For [itex] r > R[/itex]:

    [tex]q_{enc} = Q_{tot} = 2 \pi A R^{2}[/tex]

    [tex]\oint \mathbf{E} \cdot \mathbf{dS} = \frac{Q_{tot}}{\epsilon_{0}}[/tex]
    [tex]E 4 \pi r^{2} = \frac{2 \pi A R^{2}}{\epsilon_{0}}[/tex]
    [tex]E = \frac{A R^{2}}{2 \epsilon_{0} r^{2}}[/tex]

    I believe here I do have [itex]\rho = 0[/itex], because [itex]\mathbf{\nabla} \cdot (\frac{\mathbf{r}}{r^{2}}) = 0[/itex] everywhere, except the origin.

    Shouldn't the EF outside the sphere behave like the EF of a point charge?
    Last edited: Apr 26, 2012
  5. Apr 26, 2012 #4
  6. Apr 26, 2012 #5
    I think A must be zero, because at [itex]r\rightarrow 0, \rho \rightarrow \infty [/itex] :smile:
  7. Apr 26, 2012 #6
    A isn't zero, A=Q/(4pi(R^2/2)

    The outside Efield does look like a point charge, check yourself. Also, div(1/r^2)=4pi delta(r), not 0.

    The field inside is constant, but that doesn't mean it's divergenceless. Are you sure you're using spherical divergence formula?
  8. Apr 26, 2012 #7
    How about this:

    [itex]\rho (\mathbf{r})[/itex] isn't exactly defined at the origin; it explodes at the point [itex]r = 0[/itex].

    So the integral would have to be from a small radius [itex]a[/itex] to a general radius [itex]r \leq R[/itex]

    Using this, I got:

    [tex]q_{enc} = 2 \pi A (r^{2} - a^{2})[/tex]

    The total charge, however, still is [itex]Q_{tot} = 2 \pi A R^{2}[/itex]

    [tex]q_{enc} = \frac{Q_{tot}}{R^{2}} (r^{2} - a^{2})[/tex]

    [tex]\oint \mathbf{E} \cdot \mathbf{dS} = \frac{q_{enc}}{\epsilon_{0}}[/tex]

    [tex]E = \frac{Q_{tot}}{4 \pi \epsilon_{0} R^{2}} (1 - \frac{a^{2}}{r^{2}})[/tex]

    Calculating the divergence os [itex]\mathbf{E}[/itex], I got:

    [tex]\mathbf{\nabla} \cdot \mathbf{E} = \frac{1}{r^{2}}\frac{\partial}{\partial r} (r^{2} \frac{Q_{tot}}{4 \pi \epsilon_{0} R^{2}} - \frac{Q_{tot} a^{2}}{4 \pi \epsilon_{0} R^{2}})[/tex]

    [tex]\mathbf{\nabla} \cdot \mathbf{E} = \frac{Q_{tot}}{2 \pi \epsilon_{0} R^{2} r}[/tex]

    Substituting [itex]Q_{tot} = 2 \pi A R^{2}[/itex]

    [tex]\mathbf{\nabla} \cdot \mathbf{E} = \frac{A}{\epsilon_{0} r} = \frac{\rho (\mathbf{r})}{\epsilon_{0}}[/tex]

    I got one last question: Is it possible to write [itex]\rho (0) = 4 \pi A \delta (\mathbf{r})[/itex]?
    Last edited: Apr 26, 2012
  9. Apr 26, 2012 #8

    Yes, I found out that I was miss calculating the Divergence of the Electric Field.
    Too bad I was writing my other post while you answered it.
    Thanks anyway.

    By the way, about the Divergence of [itex]\frac{\hat{r}}{r^2}[/itex], it is equal to zero everywhere, except the origin. And in general form, it is written as [itex]4 \pi \delta(\mathbf{r})[/itex].
    (Griffiths' "Itr. to Electrodynamics" section 1.5.3 and problem 1.16)
  10. Apr 26, 2012 #9
    Oh, I think electric field inside sphere
    [itex]\mathbf{E}= E\hat{\mathbf{r}}=\frac{Q_{tot}}{4 \pi \epsilon_{0} R^{2}}\frac{\mathbf{r}}{r}
    [/itex], ([itex]\hat{\mathbf{r}}=\frac{\mathbf{r}}{r}[/itex])
    [itex] \mathbf{\nabla}\cdot \mathbf{E}= \frac{Q_{tot}}{4 \pi \epsilon_{0} R^{2}}\mathbf{\nabla}( \frac{\mathbf{r}}{r})
    \mathbf{\nabla}\cdot (\frac{\mathbf{r}}{r})=\frac{2}{r}
    [/itex] and [itex]Q_{tot} = 2 \pi A R^{2}
    So, we have
    \mathbf{\nabla}\cdot \mathbf{E}= \frac{Q_{tot}}{4 \pi \epsilon_{0} R^{2}} \frac{2}{r}=\frac{A}{\epsilon_{0}r}=\frac{\rho}{ \epsilon_{0}}
    Last edited: Apr 26, 2012
  11. Apr 26, 2012 #10
    The electric field for r < R is E =(A/2ε0) ir

    The electric field for r > R isE =(A/2ε0) (R2/r2)ir

    In spherical coordinates, the divergence of E is A/(rε0) for r < R and 0 for r > R.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook