Gauss's Law (Differential Form)

Click For Summary
SUMMARY

The discussion focuses on applying Gauss's Law in its differential form to find the electric field and electrostatic potential inside and outside a sphere with a varying charge density described by ##\rho(r) = \alpha r^2## for ##r < R## and ##\rho(r) = 0## elsewhere. The electric field inside the sphere is derived as ##E_r = \frac{\alpha r^3}{3 \epsilon_0}##, while outside the sphere, it is expressed as ##E_{out} = \frac{C_1}{r^2}##. The potential is calculated using Poisson's equation, leading to ##\phi = -\frac{\alpha r^4}{20 \epsilon_0} - \frac{C_0}{r}## for ##r < R##, with constants determined by boundary conditions.

PREREQUISITES
  • Understanding of Gauss's Law and its differential form, ##\nabla \cdot \vec{E} = \frac{\rho}{\epsilon_0}##.
  • Familiarity with Poisson's equation, ##\nabla^2 \phi = -\frac{\rho}{\epsilon_0}##.
  • Knowledge of spherical coordinates and their application in electromagnetism.
  • Ability to solve differential equations, particularly in the context of electric fields and potentials.
NEXT STEPS
  • Study the derivation and applications of Gauss's Law in both integral and differential forms.
  • Learn how to solve Poisson's equation in spherical coordinates for various charge distributions.
  • Explore boundary conditions in electrostatics and their impact on electric fields and potentials.
  • Investigate the physical significance of constants in electrostatic equations and how to determine them.
USEFUL FOR

Students and professionals in physics, particularly those focusing on electromagnetism, electrical engineers, and anyone involved in solving electrostatic problems involving varying charge densities.

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: 769
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
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 13 ·
Replies
13
Views
5K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
8
Views
2K
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K