- #1

µ³

- 68

- 0

I was bored yesterday and started messing around with Maxwell equations to try to solve for electric field for spherically symmetric cases (as opposed to just using the integral formulation).

For example, a simple case of a solid sphere with uniform charge distribution [itex]\rho[/itex]. Using Gauss's Law an equation can be simply derived for the electric field inside the sphere.

[tex]\oint_S \mathbf{E} \cdot d\mathbf{A} = \frac{1}{\epsilon_0} \int_S \rho dV[/tex]

(Edit - whoops)

[tex]E4\pi r^2 = \frac{4/3 \pi r^3 \rho_0}{\epsilon_0}[/tex]

[tex]E = \frac{r\rho_0}{3\epsilon_0}[/tex]

However, when I try plugging this back into Maxwell Equation:

[tex]\nabla \cdot E = \frac{\rho}{\epsilon_0}[/tex]

...using Mathematica and spherical coordinates I take:

[tex]E = <\frac{r\rho_0}{3\epsilon_0},\phi, \theta>[/tex]

and it becomes

[tex]\nabla \cdot E = \frac{\rho_0}{\epsilon_0} + \frac{1 + \phi cot(\phi) + csc(\phi)}{r} [/tex]

I then tried a simpler case such as the Electric field from a static charge.

[tex] E = \frac{q}{4\pi\epsilon_0 r^2} [/tex]

When I plugin

[tex] E = <\frac{q}{4\pi\epsilon_0 r^2}, \phi, \theta> [/tex]

into Mathematica I get.

[tex] \nabla \cdot E = \frac{1 + \phi cot(\phi) + csc(\phi)}{r}[/tex]

I'm confused as to where this

[tex] \frac{1 + \phi cot(\phi) + csc(\phi)}{r}[/tex]

is coming from or what am I doing wrong in the application of the equation. I originally had trouble when I tried to solve the differential equation

[tex] \nabla \cdot E(r,\phi,\theta) = \frac{\rho(r) }{\epsilon_0} [/tex]

using

[tex] E(r,\phi,\theta) = <E(r), \phi, \theta>[/tex]

to get a general solution for any spherically symmetric charge distribution [itex]\rho(r)[/itex]

Please help. Thanks in advance. (I'm probably doing something really stupid and don't even realize it, but I can't figure it out)

For example, a simple case of a solid sphere with uniform charge distribution [itex]\rho[/itex]. Using Gauss's Law an equation can be simply derived for the electric field inside the sphere.

[tex]\oint_S \mathbf{E} \cdot d\mathbf{A} = \frac{1}{\epsilon_0} \int_S \rho dV[/tex]

(Edit - whoops)

[tex]E4\pi r^2 = \frac{4/3 \pi r^3 \rho_0}{\epsilon_0}[/tex]

[tex]E = \frac{r\rho_0}{3\epsilon_0}[/tex]

However, when I try plugging this back into Maxwell Equation:

[tex]\nabla \cdot E = \frac{\rho}{\epsilon_0}[/tex]

...using Mathematica and spherical coordinates I take:

[tex]E = <\frac{r\rho_0}{3\epsilon_0},\phi, \theta>[/tex]

and it becomes

[tex]\nabla \cdot E = \frac{\rho_0}{\epsilon_0} + \frac{1 + \phi cot(\phi) + csc(\phi)}{r} [/tex]

I then tried a simpler case such as the Electric field from a static charge.

[tex] E = \frac{q}{4\pi\epsilon_0 r^2} [/tex]

When I plugin

[tex] E = <\frac{q}{4\pi\epsilon_0 r^2}, \phi, \theta> [/tex]

into Mathematica I get.

[tex] \nabla \cdot E = \frac{1 + \phi cot(\phi) + csc(\phi)}{r}[/tex]

I'm confused as to where this

[tex] \frac{1 + \phi cot(\phi) + csc(\phi)}{r}[/tex]

is coming from or what am I doing wrong in the application of the equation. I originally had trouble when I tried to solve the differential equation

[tex] \nabla \cdot E(r,\phi,\theta) = \frac{\rho(r) }{\epsilon_0} [/tex]

using

[tex] E(r,\phi,\theta) = <E(r), \phi, \theta>[/tex]

to get a general solution for any spherically symmetric charge distribution [itex]\rho(r)[/itex]

Please help. Thanks in advance. (I'm probably doing something really stupid and don't even realize it, but I can't figure it out)

Last edited: