- #1
hbweb500
- 41
- 1
So I am playing around with the differential form of Gauss's Law:
[tex]\nabla \cdot \vec{E} = \frac{\rho}{\epsilon_0}[/tex]
Starting off simple with a point charge, the electric field is:
[tex]\vec{E} = \frac{1}{4 \pi \epsilon_0} \frac{q}{r^2} \hat{r}[/tex]
And the divergence, in spherical coordinates, is:
[tex]\nabla \cdot \vec{E} = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 E_r) [/tex]
[tex] = \frac{1}{r^2} \frac{\partial}{\partial r} \left( \frac{1}{4 \pi \epsilon_0} \frac{q}{r^2} \right) [/tex]
[tex] = \frac{1}{r^2} \frac{\partial}{\partial r} \left( \frac{q}{4 \pi \epsilon_0}} \right)[/tex]
[tex] = 0 [/tex]
I can handle this much. It makes sense that the divergence is everywhere 0, since the only charge density is a point charge. Griffiths has a discussion about this very thing, where he states that the infinite divergence at the origin causes things to work out as expected.
My problem is in dealing with a cartesian coordinate system. I didn't recall the divergence equation in spherical coordinates when I was first playing around with this, so I tried it in cartesian. Here:
[tex] \vec{E} = \frac{q}{4\pi \epsilon_0} \frac{ x \hat{x} + y \hat{y} }{(x^2+y^2)^{\frac{3}{2}}} [/tex]
But the divergence of this is proportional to:
[tex] \nabla \cdot \vec{E} \propto \frac{-2}{(x^2 + y^2)^3}[/tex]
Which clearly isn't zero everywhere. I've checked my divergence and electric field equation, but I can't find the difference between it and the spherical ones I am using.
So, what gives? Is the divergence in spherical coordinates 0, but nonzero in cartesian?
[tex]\nabla \cdot \vec{E} = \frac{\rho}{\epsilon_0}[/tex]
Starting off simple with a point charge, the electric field is:
[tex]\vec{E} = \frac{1}{4 \pi \epsilon_0} \frac{q}{r^2} \hat{r}[/tex]
And the divergence, in spherical coordinates, is:
[tex]\nabla \cdot \vec{E} = \frac{1}{r^2} \frac{\partial}{\partial r} (r^2 E_r) [/tex]
[tex] = \frac{1}{r^2} \frac{\partial}{\partial r} \left( \frac{1}{4 \pi \epsilon_0} \frac{q}{r^2} \right) [/tex]
[tex] = \frac{1}{r^2} \frac{\partial}{\partial r} \left( \frac{q}{4 \pi \epsilon_0}} \right)[/tex]
[tex] = 0 [/tex]
I can handle this much. It makes sense that the divergence is everywhere 0, since the only charge density is a point charge. Griffiths has a discussion about this very thing, where he states that the infinite divergence at the origin causes things to work out as expected.
My problem is in dealing with a cartesian coordinate system. I didn't recall the divergence equation in spherical coordinates when I was first playing around with this, so I tried it in cartesian. Here:
[tex] \vec{E} = \frac{q}{4\pi \epsilon_0} \frac{ x \hat{x} + y \hat{y} }{(x^2+y^2)^{\frac{3}{2}}} [/tex]
But the divergence of this is proportional to:
[tex] \nabla \cdot \vec{E} \propto \frac{-2}{(x^2 + y^2)^3}[/tex]
Which clearly isn't zero everywhere. I've checked my divergence and electric field equation, but I can't find the difference between it and the spherical ones I am using.
So, what gives? Is the divergence in spherical coordinates 0, but nonzero in cartesian?