# Delta Function Difficulties

1. Feb 5, 2009

### americanforest

1. The problem statement, all variables and given/known data

This is problem 2.46 from Griffith's Electrodynamics. I've already solved the problem but there is one aspect of the solution which bothers me and I can't think of where it is originating.

I have found that the potential given in the problem produces an electric field

$$\vec{E}=A\frac{e^{- \lambda r}}{r}(\lambda + \frac{1}{r})\vec{\hat{r}}$$

Now, this can obviously be re-written as

$$\vec{E}=A e^{- \lambda r}(\lambda r + 1)\frac{\vec{\hat{r}}}{r^{2}}$$

However, if we want to calculate the charge density $$\rho = \epsilon _{0} \vec{\nabla} \cdot \vec{E}$$, we get different answers for the two above electric fields because of the property that

$$\vec{\nabla} \cdot \frac{\hat{\vec{r}}}{r^{2}} = 4 \pi \delta ^{3}(\vec{r})$$.

Specifically, using the general property that $$\nabla \cdot \phi\vec{F}=\nabla\phi \cdot \vec{F} + \phi (\nabla \cdot \vec{F})$$ with $$\vec{F}=\vec{\hat{r}}$$ in the first case and $$\vec{F}=\frac{\vec{\hat{r}}}{r^{2}}$$ in the second case yield different answers.

If you don't believe me, try it!

FYI: The answer the first expression gives is

$$\rho=A\epsilon _{0}e^{-\lambda r}\frac{-\lambda^{2}}{r}$$

And the answer the second expression gives is

$$\rho=A\epsilon_{0}(4\pi\delta^{3}(\vec{r})-\frac{\lambda^{2}}{r}e^{-\lambda r})$$

What's going on here? Does it have something to do with what occurs at $$\vec{r}=0$$ or am I screwing up some basic math. Why is this happening to me!?

Last edited: Feb 5, 2009
2. Feb 6, 2009

### Hurkyl

Staff Emeritus
Certainly something happens at 0, because E is not differentiable there in the ordinary sense. I'm not entirely sure how to define the distributional gradient of a scalar field in 3-space, which is what you meant to use in your first expression.

3. Feb 6, 2009

Why not?

4. Feb 6, 2009

### americanforest

Well, the two solutions are exactly the same everywhere except at $$\vec{r}=0$$. At this point, the first solution (with no delta function) goes to -infinity and the second solution is undefined.

This may not seem like such a big difference but when you find the charge by doing $$\int \rho d^{3}r$$, you find that

$$Q_{first}=4\pi \epsilon_{0} A$$

while

$$Q_{second}=0$$

Which is certainly a significant difference. A difference that I still need some help coming to grips with.

As for your response above, I don't follow.

5. Feb 6, 2009

### xboy

If you look at the potential, it falls off faster than 1/r at large distances. This means total charge of the distribution has to be zero. Because if there was some charge, from far far away the charge distribution would just look like a point with that amount of charge, and the potential would fall off as 1/r .

So this tells you that the second answer must be right.

From another angle, this can be seen most simply this way: for r nearly equal to zero, the field behaves like $$\frac{\vec{\hat{r}}}{r^{2}}$$. If we take divergence using the formula, that doesn't hold at r=0, because it amounts to a 0/0 term there. Because this field falls at least as fast as 1/r^2, all the arguments that applied for the introduction of the delta function in that case (see Griffiths, ch:1) apply here too.

6. Feb 6, 2009

### xboy

somethings wrong with the latex. It said Q_second = 0 when I meant $$\frac{\vec{\hat{r}}}{r^{2}}$$

7. Feb 6, 2009

### Hurkyl

Staff Emeritus
You go back to the definition of the ordinary derivative, plug in this function, and find that it doesn't have a derivative. One of the obstacles is that phi isn't even defined at 0 -- being defined at 0 is a prerequisite for being differentiable at 0.

The same is true for the divergence of $\vec{\hat{r}} / r^2$; this vector field is not defined at 0, and thus its divergence at 0 doesn't exist in the ordinary sense. If you want to talk about derivatives of such a field at 0, then you have to use some other definition. The identity quoted earlier is the result of using some other divergence operator that is different than the one you learned in your elementary calculus classes. I imagine you were probably not taught anything about other divergence operators -- the hope, I think, is that they are similar enough to the ordinary divergence operator that if you don't think too much about it, you won't notice the differences, and if you don't try to do anything clever, you won't use it wrongly.

Last edited: Feb 6, 2009
8. Feb 6, 2009

### xboy

^ So what happens for a line charge where the field goes as 1/r ? Is the field non-differentiable at 0 there too?

9. Feb 6, 2009

### ice109

of course.

10. Feb 6, 2009

### americanforest

Are you referring to this identity:

$$\nabla \cdot \phi\vec{F}=\nabla\phi \cdot \vec{F} + \phi (\nabla \cdot \vec{F})$$

Are you saying that the divergence operator used in this identity is different from the usual divergence operator simply in that it must differentiate a function which is undefined at a certain location? What kind of magical divergence operator is this? How can there be a "different" divergence operator which can differentiate a non continuous (non differentiable) function?

11. Feb 6, 2009

### turin

Think of the differential operator as being defined in terms of what it does to the things it operates on. For "nice" functions (i.e. ones that are at least defined everywhere), you can use your standard definition from vector calculus. However, 1/r is not a function everywhere in space, so you can't assume that you know what the divergence or gradient operator is going to do to it at the problem points. Basically, you cannot think of the field as a function; you must think of it as a distribution. Then, you consider the action of the distribution on test functions, and then do what basically amounts to the "inverse product" rule (as one of my colleagues used to call it) to determine what the differential operator does to the distribution by how it acts on the test functions.

12. Feb 6, 2009

### Hurkyl

Staff Emeritus
No, I was referring to this identity:
$$\vec{\nabla} \cdot \frac{\hat{\vec{r}}}{r^{2}} = 4 \pi \delta ^{3}(\vec{r})$$
This is clearly not the divergence operator you learned in elementary calculus, because:
(1) The field you're differentiationg isn't defined at 0
(2) The R.H.S. isn't even a function

Are you familiar with distributions? e.g. exactly what sort of mathematical object $\delta(x)$ actually is?