Gauss's Law (Differential Form)

Click For Summary

Homework Help Overview

The problem involves finding the electric field inside and outside a sphere of radius R using the differential form of Gauss's law, as well as determining the electrostatic potential using Poisson's equation. The charge density of the sphere varies as ρ(r) = αr² for r < R and is zero elsewhere.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning, Problem interpretation

Approaches and Questions Raised

  • Participants discuss the redundancy of using the differential form of Gauss's law when the integral form might be more straightforward. There is confusion regarding the correct application of charge density in calculating the enclosed charge.
  • Some participants question the use of the formula Q = ρV for varying charge density, suggesting that integration is necessary to find the charge enclosed.
  • There are attempts to derive the electric field and potential using both Gauss's law and Poisson's equation, with some participants expressing uncertainty about the constants of integration and boundary conditions.
  • One participant raises a question about the implications of the electric field and potential being zero outside the sphere.

Discussion Status

The discussion is ongoing, with participants providing insights and corrections to each other's reasoning. Some guidance has been offered regarding the correct application of the differential form of Gauss's law and the need for integration due to the variable charge density. Multiple interpretations of the problem are being explored, particularly concerning the boundary conditions and the implications of the results.

Contextual Notes

Participants note the complexity introduced by the varying charge density and the necessity of integrating to find the total charge enclosed. There is also mention of the need to clarify the constants of integration and the conditions for the electric field and potential outside the sphere.

roam
Messages
1,265
Reaction score
12

Homework Statement



Find the electric field inside and outside a sphere of radius R using the differential form of Gauss's law. Then find the electrostatic potential using Poisson's equation.

Charge density of the sphere varies as ##\rho (r) = \alpha r^2 \ (r<R)## and ##\rho(r)=0 \ elsewhere##.

Homework Equations



##\nabla . E = \frac{\rho}{\epsilon_0}##

##\nabla^2 \phi = - \frac{\rho}{\epsilon_0}## (Poisson)

The Attempt at a Solution



I'm confused since using the differential form seems redundant, because you must first find the electric field using the integral form (unless I'm mistaken). Here's my attempt:

For inside the sphere (##r<R##) the charge enclosed is:

##Q=\rho V = \alpha r^2 . \frac{4}{3} \pi r^3 = \frac{4\alpha r^5 \pi}{3}##​

Divergence of the field in spherical coordinates is:

##\nabla . \vec{E} = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 E_r) + \frac{1}{r sin \theta} \frac{\partial}{\partial \theta} (sin \theta E_\theta) + \frac{1}{r sin \phi} \frac{\partial}{\partial \phi} ##​

Since no change in ##\theta## and ##\phi## we can just take the first term:

##\nabla . \vec{E} = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 E_r)##

Now finding ##E_r##

##|E_r| \oint da = |E_r| 4 \pi r^2 = \frac{4 \alpha r^5 \pi}{3 \epsilon_0} ##

##E_r = \frac{\alpha r^3}{3 \epsilon_0}##

So substituting back:

##\nabla . \vec{E} = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 \frac{\alpha r^3}{3 \epsilon_0})##

##=\frac{\alpha}{3 \epsilon_0} \frac{\partial}{\partial r} r^3 = \frac{\alpha r^2}{\epsilon_0}= \frac{\rho(r)}{\epsilon_0}##​

Now integrating we get:

##\int(\nabla. E) dr=\int \frac{\alpha r^2}{\epsilon_0} dr = \frac{\alpha r^3}{3 \epsilon_0} + C##

So it's the same answer as using the integral form of Gauss's law. So what is the point of using the differential form?

Now using Poisson's equation:

##\nabla^2 \phi = - \frac{\rho}{\epsilon_0} = - \frac{\alpha r^2}{\epsilon_0}##​

I think I must take a double integral:

##\int \int - \frac{\alpha r^2}{\epsilon_0} dr dr##

##\frac{-\alpha}{\epsilon_0} \int (\frac{r^3}{3} + C) dr##

##\phi = \frac{-\alpha}{\epsilon_0} (\frac{r^4}{12}+Cr+B)##​

Is this right? And what I should I do about the constants? :confused:

And when we are outside the sphere (r>R), with ##\rho=0## we will have ##Q=(0)V=0##. Therefore both the electric field and ##\phi## will be zero?

Any help would be greatly appreciated.
 

Attachments

  • density.jpg
    density.jpg
    9.3 KB · Views: 776
Physics news on Phys.org
roam said:

Homework Statement



Find the electric field inside and outside a sphere of radius R using the differential form of Gauss's law. Then find the electrostatic potential using Poisson's equation.

Charge density of the sphere varies as ##\rho (r) = \alpha r^2 \ (r<R)## and ##\rho(r)=0 \ elsewhere##.

Homework Equations



##\nabla . E = \frac{\rho}{\epsilon_0}##

##\nabla^2 \phi = - \frac{\rho}{\epsilon_0}## (Poisson)

The Attempt at a Solution



I'm confused since using the differential form seems redundant, because you must first find the electric field using the integral form (unless I'm mistaken). Here's my attempt:

For inside the sphere (##r<R##) the charge enclosed is:

##Q=\rho V = \alpha r^2 . \frac{4}{3} \pi r^3 = \frac{4\alpha r^5 \pi}{3}##​
This isn't correct. ##Q=\rho V## only works if you have a constant charge density. Because the density varies in this problem, you have to integrate to find the charge enclosed. But you don't need that here.

Divergence of the field in spherical coordinates is:

##\nabla . \vec{E} = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 E_r) + \frac{1}{r sin \theta} \frac{\partial}{\partial \theta} (sin \theta E_\theta) + \frac{1}{r sin \phi} \frac{\partial}{\partial \phi} ##​

Since no change in ##\theta## and ##\phi## we can just take the first term:

##\nabla . \vec{E} = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 E_r)##
The differential form of Gauss's Law is ##\nabla \cdot \vec{E} = \rho##. You have expressions for both sides. Just substitute them into get a differential equation you have to solve. You're going to integrate, but you're not using the integral form of Gauss's law.

Now finding ##E_r##

##|E_r| \oint da = |E_r| 4 \pi r^2 = \frac{4 \alpha r^5 \pi}{3 \epsilon_0} ##

##E_r = \frac{\alpha r^3}{3 \epsilon_0}##

So substituting back:

##\nabla . \vec{E} = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 \frac{\alpha r^3}{3 \epsilon_0})##

##=\frac{\alpha}{3 \epsilon_0} \frac{\partial}{\partial r} r^3 = \frac{\alpha r^2}{\epsilon_0}= \frac{\rho(r)}{\epsilon_0}##​

Now integrating we get:

##\int(\nabla. E) dr=\int \frac{\alpha r^2}{\epsilon_0} dr = \frac{\alpha r^3}{3 \epsilon_0} + C##

So it's the same answer as using the integral form of Gauss's law. So what is the point of using the differential form?

Now using Poisson's equation:

##\nabla^2 \phi = - \frac{\rho}{\epsilon_0} = - \frac{\alpha r^2}{\epsilon_0}##​

I think I must take a double integral:

##\int \int - \frac{\alpha r^2}{\epsilon_0} dr dr##

##\frac{-\alpha}{\epsilon_0} \int (\frac{r^3}{3} + C) dr##

##\phi = \frac{-\alpha}{\epsilon_0} (\frac{r^4}{12}+Cr+B)##​

Is this right? And what I should I do about the constants? :confused:

And when we are outside the sphere (r>R), with ##\rho=0## we will have ##Q=(0)V=0##. Therefore both the electric field and ##\phi## will be zero?

Any help would be greatly appreciated.
 
vela said:
The differential form of Gauss's Law is ##\nabla \cdot \vec{E} = \rho##. You have expressions for both sides. Just substitute them into get a differential equation you have to solve. You're going to integrate, but you're not using the integral form of Gauss's law.

Thank you for the reply. But should it not be ##\nabla \cdot \vec{E} = \rho / \epsilon_0## (divided by the permittivity of free space)? This is what I did:

##\nabla \cdot \vec{E} = \frac{\rho}{\epsilon_0} = \frac{\alpha r^2}{\epsilon_0}##

##\int \nabla \cdot \vec{E} = \int \frac{\alpha r^2}{\epsilon_0} \implies \vec{E} = \frac{\alpha r^3}{3\epsilon_0}##​

Is this right? For the potential I used Poisson's equation:

##\nabla^2 \phi = - \frac{\rho}{\epsilon_0} \implies \phi= \int \int \frac{- \alpha r^2}{\epsilon_0} dr dr = -\frac{\alpha}{\epsilon_0} (\frac{r^4}{12} + Cr + B)##

I tried to check if the answer is correct by taking the gradient of the potential (since ##- \nabla \phi = \vec{E}##), but it seems it is not. What was the mistake?

Q=ρV only works if you have a constant charge density. Because the density varies in this problem, you have to integrate to find the charge enclosed. But you don't need that here.

So for the case ##r>R## do I need to integrate to find ##Q_{enc}##?

##dQ= \rho dV = \rho 4 \pi r^2 dr = 4 \pi \alpha \int^R_0 r^4 dr##

##= \frac{4 \pi \alpha}{5} [r^5]^R_0 \implies Q= \frac{4 \pi \alpha R^5}{5}##​

The new density (a distance r away) would be:

##\rho'=Q.V'= \frac{4 \pi \alpha R^5}{5}. \frac{4\pi r^3}{3} = \frac{16 \pi^2 r^3 \alpha R^5}{15}##​

Hence the electric field is:

##\int \nabla \cdot \vec{E} dr = \int \frac{16 \pi^2 r^3 \alpha R^5}{15 \epsilon_0} dr##

##\therefore \vec{E} = \frac{16 \pi^2 r^4 \alpha R^5}{60 \epsilon_0} + C##

Is that right? And what sort of boundary conditions do we need to make the constant equal zero?
 
Last edited:
roam said:
Thank you for the reply. But should it not be ##\nabla \cdot \vec{E} = \rho / \epsilon_0## (divided by the permittivity of free space)?
Yes, sorry. I'm used to using units where you don't have to include the constant.

This is what I did:
\begin{align*}
\nabla \cdot \vec{E} &= \frac{\rho}{\epsilon_0} = \frac{\alpha r^2}{\epsilon_0} \\
\int \nabla \cdot \vec{E} &= \int \frac{\alpha r^2}{\epsilon_0} \implies \vec{E} = \frac{\alpha r^3}{3\epsilon_0}
\end{align*}
Is this right?
No. You've implied the electric field is radial, so you can write ##\vec{E} = E_r \hat{r}##. As you said in your first post, ##\nabla\cdot\vec E = \frac{1}{r^2}\frac{\partial}{\partial r}(r^2E_r)##, so you get, for r<R,
$$\frac{1}{r^2}\frac{\partial}{\partial r}(r^2E_r) = \frac{\alpha r^2}{\epsilon_0}.$$ Solve that differential equation. You'll also have to treat the case where r>R.

For the potential I used Poisson's equation:

##\nabla^2 \phi = - \frac{\rho}{\epsilon_0} \implies \phi= \int \int \frac{- \alpha r^2}{\epsilon_0} dr dr = -\frac{\alpha}{\epsilon_0} (\frac{r^4}{12} + Cr + B)##

I tried to check if the answer is correct by taking the gradient of the potential (since ##- \nabla \phi = \vec{E}##), but it seems it is not. What was the mistake?
So for the case ##r>R## do I need to integrate to find ##Q_{enc}##?

##dQ= \rho dV = \rho 4 \pi r^2 dr = 4 \pi \alpha \int^R_0 r^4 dr##

##= \frac{4 \pi \alpha}{5} [r^5]^R_0 \implies Q= \frac{4 \pi \alpha R^5}{5}##​

The new density (a distance r away) would be:

##\rho'=Q.V'= \frac{4 \pi \alpha R^5}{5}. \frac{4\pi r^3}{3} = \frac{16 \pi^2 r^3 \alpha R^5}{15}##​

Hence the electric field is:

##\int \nabla \cdot \vec{E} dr = \int \frac{16 \pi^2 r^3 \alpha R^5}{15 \epsilon_0} dr##

##\therefore \vec{E} = \frac{16 \pi^2 r^4 \alpha R^5}{60 \epsilon_0} + C##

Is that right? And what sort of boundary conditions do we need to make the constant equal zero?
 
  • Like
Likes   Reactions: roam
vela said:
No. You've implied the electric field is radial, so you can write ##\vec{E} = E_r \hat{r}##. As you said in your first post, ##\nabla\cdot\vec E = \frac{1}{r^2}\frac{\partial}{\partial r}(r^2E_r)##, so you get, for r<R,
$$\frac{1}{r^2}\frac{\partial}{\partial r}(r^2E_r) = \frac{\alpha r^2}{\epsilon_0}.$$ Solve that differential equation. You'll also have to treat the case where r>R.

Thank you. I'm not very familiar with differential equations. So this is what I've done:

##\frac{1}{r^2}\frac{\partial}{\partial r}(r^2E_r) = \frac{\rho}{\epsilon_0}## or

##\frac{\partial}{\partial r}(r^2E_r) = \frac{\rho r^2}{\epsilon_0}##​

Integrating both sides:

##r^2 |E_r| = \frac{\rho r^3}{3 \epsilon_0} + C_0##

##|E_r| = \frac{\rho r}{3 \epsilon_0} + \frac{C_0}{r^2}##​

Therefore:

##E_{inside} = \frac{\alpha r^3}{3 \epsilon_0} + \frac{C_0}{r^2}##

##E_{outside} = \frac{C_0}{r^2}##

Is this correct? :confused:

What should I do with the constant C0? Do I just need to say it is zero since ##E (r \to \infty) =0##?

Also for the potential do I need to solve for ##\phi## in ##\frac{1}{r^2} \frac{\partial}{\partial r} (r^2 \frac{\partial \phi}{\partial r}) = \frac{- \rho}{\epsilon_0}##?
 
You didn't integrate correctly. Remember ##\rho## is a function of ##r##.
 
vela said:
You didn't integrate correctly. Remember ##\rho## is a function of ##r##.

My mistake, sorry. Thank you. This time before integrating I've substituted ##\rho(r) = \alpha r^2## and ##0## for r<R and r>R respectively.

##\frac{\partial}{\partial r} (r^2 E_r) = \frac{\alpha r^4}{\epsilon_0} \implies E_{in} = \frac{\alpha r^3}{5 \epsilon_0} + \frac{C_0}{r^2}##​

And:

##\frac{\partial}{\partial r} (r^2 E_r) = 0 \implies E_{out} = \frac{C_1}{r^2}##
Is this alright now? The second expression was obtained by the fact that he integral of zero is a constant. I think it makes sense since the field outside a charged sphere is NOT zero (as I've seen from other problems).

Now since the solution of Poisson's equation in spherical coordinates is:

##\nabla^2 \phi = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 \frac{\partial \phi}{\partial r})##​

I calculated the potentials by writting ##\nabla^2 \phi = \rho(r) / \epsilon_0## (for instance for r<R I got ##\phi = - \frac{\alpha r^4}{20 \epsilon_0} - \frac{C_0}{r}##). Then I took their gradients and got back the electric field, so I believe the solutions are correct.

But what do we typically do with the constants?
 
Last edited:
Looks good so far. To figure out what ##C_0## is, take the limit of ##E_\text{in}## as ##r \to 0##. There's no point charge at the origin, so we require that the electric field remain finite. This can only happen if ##C_0 = 0##. To determine ##C_1##, require that ##E_\text{in} = E_\text{out}## at ##r=R## because there's no surface charge density to cause a discontinuity in the electric field.

Another way to deal with the constants is to use definite integrals to avoid them in the first place. So for the electric field inside the sphere, you'd have
$$\int_0^r \frac{\partial}{\partial r}(r^2 E_r)\,dr = \int_0^r \frac{\alpha r^4}{\epsilon_0}.$$ Similarly, for outside the sphere, you'd have
$$\int_R^r \frac{\partial}{\partial r}(r^2 E_r)\,dr = \int_R^r 0\,dr = 0.$$ Again, use the fact that ##E_\text{in}(R) = E_\text{out}(R)## at the boundary.
 
  • Like
Likes   Reactions: roam
Thank you so much for the help. It makes perfect sense now. :)
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 13 ·
Replies
13
Views
6K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 8 ·
Replies
8
Views
1K
Replies
8
Views
2K
Replies
6
Views
3K