Homework 2 emphasizes the electric field and the principle of superposition that will form the basis of much of your understanding of electrostatics. This homework makes use of what you learned from Secs. 1.1-1.4 in Griffiths and adds to it the concepts from Sec. 2.1, which make up the bulk of the assignment. In addition, we have begun to introduce the idea of finding approximate formulae using Taylor expansions, which is one of the most common practices of theoretical physics. In this assignment, you will use a Jupyter notebook to determine the electric field of a point charge and a dipole as we build up the architecture to solve elecrtic field problems numerically.
Dropbox file request link for Homework 2
When working through some physics, you will typically find yourself in a situation where a strict analytical solution to your problem evades you because the models that you have used have sophisticated algebraic forms that lead to transcendental equations, non-integrable forms, or other problematic situations. In these situations, it is often instructive to step back a moment and consider under what conditions you want to solve your problem. Those conditions might provide you with reasonable limitations and assumptions that lead to approximate forms that get you very close to what you need. In this problem, which has a familiar context from 184, we will give you the assumption to make. But in future problems, you might have to decide for yourself: What assumptions and approximations can I make here and why?
Two charges of identical mass $m$, one with charge $q$ and the other with charge $4q$, hang from strings of length $l$ from a common point. Assume that $q$ is sufficiently small that the electric force on each mass is quite small compared to the gravitational force on each.
Up till now, most of your experience with integration has likely been integrating functions that have anti-derivatives. While this is kind of integration is problematic when you have data that must be integrated (e.g., using measures of position to determine potential energy), we will focus on functions for which there are no anti-derivatives.
Consider a line of charge that lives on the x-axis. It exists from $x=0$ to $x=3$, and distribution of that charge is given by the Gaussian,
\[\lambda(x) = 2e^{-x^2}.\]In this problem, you will work through this Jupyter notebook to determine the total charge one this line by performing the integral,
\[Q = \int_{0}^3 2e^{-x^2} dx.\]You can download the notebook (or view it here). As you work through this problem, you will work through the following activities:
sympy
to compute the integral of the function. What does it return? Discuss the function. Is it analytic?scipy
.scipy
.scipy.integrate
built-in quadrature function, quad.
Use it to compute the same integral and compare its result to what your code produced. What are the two variables that quad
gives you by default?quad
and its cousins in the scipy.integrate
library do, is different from both of them.In working through the first 3 questions, some scaffolded code has been provided for an analytically integrable function. It can be re-used.
Hint: for the summations that require you to distinguish between even and odd terms, review the range
function, which allows you to specify how many steps to take in between each term in a sum.
In this problem, we will lay the ground work for determining the electric field of a distribution of charge numerically. This is a different kind of numerical integration, which uses superposition as the main element. But to get started, we need to learn how to represent vectors using Python. So this problem introduces that and asks you to compute the electric field of a point charge and a dipole.
You will do this work in a jupyter notebook. You can download the notebook (or view it here). As you work through this problem, you will work through the following activities:
numpy
library.numpy
library to compute the electric field of a point charge and plot the electric field vectors.numpy
library to compute the electric field of a dipole and plot the electric field vectors.In this class, you will often produce new formulae that describe some situation for which you might not have developed intuition yet. So, one question you should always be asking yourself is: How do I believe the physics/math that I’ve just done?! In this problem, you will develop some techniques for checking your results against the intuition that you already hold.
Consider a thin disk of radius $R$ with a uniform charge density, $-\sigma$.
A situation: You’ve just spent an hour calculating the magnitude of the electric field of a charged ring of radius $R$ that holds a uniform linear charge density $\lambda$ at a distance $z$ from the center of the ring. You ended up with the result:
$E = \dfrac{1}{4\pi\varepsilon_0}\dfrac{\lambda 2\pi Rz}{(z^2+R^2)^{3/2}}$
Five positive charges of magntiude $q$ are arranged symmetrically around the circumference of a circle of radius $r$.