The strange function $1/r^2$
We will shortly see that the electric field of a point charge at the origin is proportional to: $$\begineq \myv v (r,\theta, \phi)&= \frac{1}{r^2}\uv{r}=\frac{\myv r}{r^3}\\ &=\frac{1}{(x^2+y^2+z^2)^{3/2}}\left(x\,\uv x +y\,\uv y+z\,\uv z \right)\endeq$$
Problem 1.16
Sketch $\myv v (\myv r)=\frac{\uv r}{r^2}$ in the $x$-$y$-plane. (In 2-d) and compute its divergence.
Your sketch of $\myv v$:
- Arrows always point away from origin.
- Spherically symmetric.
- Length of arrows is smaller as $1/r^2$.
Note that $\myv v \neq d\myv r/dt$!
Divergence in 3-d, in Cartesian coordinates
$$\myv v(\myv r)=\frac{\uv r}{r^2}=\frac{\myv r}{r^3}=\frac{x\,\uv x+y\,\uv y+z\,\uv z}{[x^2+y^2+z^2]^{3/2}}.$$
$$\myv \grad \cdot \myv v= \frac{\partial v_x}{\partial x} +\frac{\partial v_y}{\partial y}+\frac{\partial v_z}{\partial z}.$$
Calculating just the first term in the sum: $$\begineq \frac{\partial v_x}{\partial x}&= \frac{\partial}{\partial x}\left(\frac{x}{(x^2+y^2+z^2)^{3/2}} \right)\\ &= \frac{1}{(x^2+y^2+z^2)^{3/2}}-\frac 32 \frac{x}{(x^2+y^2+z^2)^{5/2}}2x\\ &= \frac{x^2+y^2+z^2-3x^2}{(x^2+y^2+z^2)^{5/2}}\\ \endeq $$
When I carry this through for the $y$-component and the $z$-component, and add them together, apparently I'll get: $$\myv \grad \cdot \myv v=\frac{3(x^2+y^2+z^2)-3x^2-3y^2-3z^2}{(x^2+y^2+z^2)^{5/2}}=0.$$
Where (from the sketch) is it obvious that there *has* to be some divergence?
Divergence in spherical-polar coordinates
...it's much easier to calculate. Expressing the vector field as $\myv v(\myv r)=\frac{\uv r}{r^2} = v_r \uv r=v_r\uv r+0\uv \theta +0\uv \phi$, we can write the three components of $\myv v$ as: $$ v_r = \frac 1{r^2};\ \ v_\theta=0;\ \ v_\phi=0.$$ Now, look up the expression for the gradient in spherical coordinates to continue the problem. show / hide
We look up the expression for $\myv \grad\cdot\myv v$ in spherical-polar coordinates, and apparently there's only one term we have to calculate: $$\begineq\myv \grad \cdot \myv v &= \frac{1}{r^2}\frac{\del}{\del r}(r^2 v_r)\\ &=\frac{1}{r^2}\frac{\del}{\del r}\left(r^2 \frac{1}{r^2}\right)=\frac{1}{r^2}\frac{\del}{\del r}(1) = 0\endeq.$$
The divergence vanishes, except perhaps at $r=0$. (The function $1/r^2$ is, after all, blowing up right there...).
Hmmm!
Use the fundamental theorem for divergences...
$$\int_{\cal V} \myv \grad \cdot \myv v\, d \tau = \oint_{\cal S} \myv v \cdot d \myv a.$$
So, let's calculate the surface integral of the flux of $\myv v = (1/r^2)\uv{r}$.
Taking advantage of spherical symmetry, let's use, for our surface of integration, the surface of a sphere of radius $R$ centered on the origin. Luckily, $d \myv a$ myv a or uv a?? points radially outward everywhere on the sphere, parallel to $\myv v$.
To figure our infinitesimal surface area: $r=R$ will be constant. So let's take $da = dl_{\theta}dl_{\phi}=R\,d \theta\, R\sin \theta \,d \phi$, so the integral over the surface of the sphere becomes $$\begineq\oint \myv v \cdot d\myv{a} &= \int \int \frac{1}{R^2}\uv{r} \cdot R^2\sin \theta\, d \theta\, d \phi\,\uv{r} \\ &=\int_0^{\pi} \sin \theta \,d \theta \int_0^{2\pi} d \phi = 4 \pi.\endeq$$
So, if we believe the fundamental theorem for divergences, all the "divergence" must be due to a singularity at the origin.
The divergence is acting like there's something that "diverges" only at the origin.
Is it possible for a function to be zero everywhere (except at the origin) but still to have an integral which is finite? There is a kind of mathematical object that behaves this way, called a...
When a Dirac delta function meets another function
When we integrate the product of a Dirac delta function with any other function, since $\delta(x)$ is 0 everywhere except at the origin: $$\int_{-\infty}^{+\infty} f(x)\delta(x) dx = f(0)\int_{-\infty}^{+\infty}\delta(x) dx = f(0).$$
Now, $\delta(x-a)$ will be zero everywhere except at $a$, so we say this function "picks out" a particular value of another function when integrated together... $$\int_{-\infty}^{+\infty} f(x)\delta(x-a) dx = f(a).$$
For example (Problem 1.43 (c)): $$\int_{-\infty}^{+\infty} x^3\delta(x+1) dx = (-1)^3 = -1.$$
[How sensitive is this integral to its limits??]
How should we interpret... $\delta(kx)$?
Let's see how this behaves when integrated with another function. We'll need to change the variable of integration to $y=kx \rightarrow dy=k\,dx$: $$\begineq\int_{-\infty}^{+\infty} f(x) \delta(kx) dx&=\int_{-\infty/k}^{+\infty/k} f(y/k) \delta(y) \frac{dy}{k}\\ &= f(0)\int_{-\infty/k}^{+\infty/k} \delta(y) \frac{1}{k}dy\\ &=\frac{f(0)}{|k|}.\endeq$$
In three dimensions
In 3-d, Cartesian coordinates, we'll write the three-dimensional Dirac delta function $\delta^3(\myv r)$ as a product of three deltas, such that... $$\int_\text{universe} \delta^3(\myv r)\, d \tau = \int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} \delta(x) \delta(y) \delta(z) \,dx\, dy\, dz = 1.$$
Also, $$\int_\text{universe} f(\myv r)\delta^3(\myv r-\myv a)\, d \tau = f(\myv a).$$
And so, we can finally return to our original puzzle about the function $1/r^2$. The divergence of this function obeys ... $$\myv \grad \cdot \frac{\uv r}{r^2} = 4\pi\delta^3(\myv r).$$
The surprising conclusion of this last expression is that...
- $\myv \grad \cdot\frac{\uv r}{4\pi r^2}= 0$ everywhere (except at the origin).
- $\iiint_\text{all space} \myv \grad \cdot\frac{\uv r}{4\pi r^2}\,d\tau = 1$.
Woot!!
And generally, we'll be interested in that function of relative positions... $\myv \rr$ $$\myv \grad\cdot\frac{\uv \rr}{\rr^2} = 4\pi \delta^3(\myv \rr).$$
Example Write an expression for the volume charge "density" $\rho(\myv r)$ of a point charge $q$ at $\myv r '$. Make sure that the volume integral of $\rho$ equals $q$.
Check this for r vs r' correctiness...
We'd like to use the way that the delta function concentrates things at one place. We'll have ($k$ is just a constant): $$\rho(\myv r) = k\delta^3(\myv r-\myv r')$$
Now, the integral of this charge "density" ought to be equal to $q$: $$q = \int_\text{universe} k \delta^3(\myv r')\, d \tau = k\int_\text{universe} \delta^3(\myv r')\, d \tau= k,$$
So, the desired charge density is precisely
$$\rho(\myv r) = q\delta^3(\myv r')={\color{blue}q\frac{\uv r}{4\pi r^2}}.$$
Explore the gaussian approximation to $\delta(x)$
Consider the gaussian function graphed here, where $A$ is some constant: $$f(x)=e^{-(Ax)^2}$$
- Look up the integral $\int_{-\infty}^{+\infty}e^{-(Ax)^2}\,dx$ (where $A$ is some constant).
- Find the value of the constant $C$ (well, it is a constant, but it depends on the value of the constant $A$...) that makes this integral =1:
$$\int_{-\infty}^{+\infty} C(A) e^{-(Ax)^2}
dx = 1.$$
Factor $C$ out, and here is the integral on WA. Here is A past student's Desmos graph.
You'll need to solve an integral. If you haven't used Mathematica that much, you can use the 'free-form input' option to type up the integral in some way. This is supposed to translate free-form input and then show you the results as well as showing you the precise Mathematica syntax that would give you those results.
- Now, that you've got $C(A)$... Modify the Desmos plot above, to make a plot of the function $g(x)=C(A) e^{-(Ax)^2} $, where you have a slider that lets you vary the value of $A$.
Check that your function visually appears as if the area underneath the curve is always the same, as you slide $A$ up and down.
$$\lim_{A\to \infty}\frac{A}{\sqrt\pi}e^{-(Ax)^2} \equiv \delta(x).$$