Students solve numerically for the potential due to a spherical shell of charge. Although this potential is straightforward to compute using Gauss's Law, it serves as a nice example for numerically integrating in spherical coordinates because the correct answer is easy to recognize.
The integral needs to be done in spherical coordinates. The point where the potential is evaluated can be given in either rectangular or shperical coordinates. Life is easier if it's given in rectangular, but most students use spherical.
The hard things here are to find the distance between the two points, and to remember how to find the small chunk of area.
Also remembering to specify where they are finding the potential. i.e. we frequently see things like: \begin{align} V &= \int_0^{\pi}\int_{0}^{2\pi} \frac{k\sigma}{\sqrt{R^2+r^2-2rR(\cos\theta\cos\theta' +\sin\theta\sin\theta'\cos(\phi-\phi'))}} R^2\sin\theta d\phi d\theta \end{align} where it's not clear or consistent which thing has the primes. We try to emphasize to the class that it is essential to write \(V(r,\phi,\theta)\) (or whatever) on the left hand side of the equations. It's also common to have no equals sign at all, which is of course even worse.
It is very common at this point is to use negative \(r\) values when plotting the potential e.g. as a function of \(x\). This does give correct plots, but is also a bit weird. At this stage, we should probably let it pass.
You will probably also find students expecting the potential to be zero inside the sphere, because they know the electric field is zero inside a solid sphere. I think it's worth engaging with students who think this, asking if the potential is continuous at the surface (if not, then the electric field must be infinite), and bringing them towards remembering that the potential is the integral of the electric field.
It is common at this stage for students to still believe that where there is charge the potential should be infinite. Looking at their numerical results can sometimes help, but it is also helpful to ask students why they think the potential should be infinite. One can then bring in Gauss's Law (if it has been covered) to help clear up why the electric field is infinite for a point charge, and not for a planar charge distribution.
Creating a 2D plot (acontourf
or apcolor
is a bit challenging if their \(V\) takes spherical coordinates. The simplest approach in this case is to define anX, Y = np.meshgrid(x,y)
and then compute the spherical coordinates from those using arc-trig. To do this correctly almost requiresarctan2
.
This is a great way to discover that there were bugs in the visualization, e.g. usingarctan
rather thanarctan2
. I'd rather enable students to discover that they have bugs using symmetry if at all possible.
group Small Group Activity
120 min.
assignment Homework
The gravitational field due to a spherical shell of matter (or equivalently, the electric field due to a spherical shell of charge) is given by: \begin{equation} \vec g = \begin{cases} 0&\textrm{for } r<a\\ -G \,\frac{M}{b^3-a^3}\, \left( r-\frac{a^3}{r^2}\right)\, \hat r & \textrm{for } a<r<b\\ -G\,\frac{M}{r^2}\, \hat r & \textrm{for } r>b \\ \end{cases} \end{equation}
This problem explores the consequences of the divergence theorem for this shell.
group Small Group Activity
30 min.
charge charge density multiple integral scalar field coordinate systems differential elements curvilinear coordinates
In this small group activity, students integrate over non-uniform charge densities in cylindrical and spherical coordinates to calculate total charge.assignment Homework
keyboard Computational Activity
120 min.
electrostatic potential python
Students write python programs to compute and visualize the potential due to four point charges. For students with minimal programming ability and no python experience, this activity can be a good introduction to writing code in python usingnumpy
and matplotlib
.
assignment Homework
One way to write volume charge densities without using piecewise functions is to use step \((\Theta)\) or \(\delta\) functions. If you need to review this, see the following link in the math-physics book: https://paradigms.oregonstate.eduhttps://books.physics.oregonstate.edu/GMM/step.html
Consider a spherical shell with charge density \(\rho (\vec{r})=\alpha3e^{(k r)^3}\) between the inner radius \(a\) and the outer radius \(b\). The charge density is zero everywhere else. Use step functions to write this charge density as a single function valid everywhere in space.
keyboard Computational Activity
120 min.
group Small Group Activity
60 min.
Mechanics Gravitational Potential Energy Zero of Potential Introductory Physics
Students examine a plastic “surface” graph of the gravitational potential energy of an Earth-satellite system to explore the properties of gravitational potential energy for a spherically symmetric system.assignment Homework
For each case below, find the total charge.