# Electric dipole, error in calculation

Currently I am calculating the dipole moment of a metal sphere in a uniform electric field $E_0$ in z-direction. From here I know that the charge density look at page 15

is given by $3 \epsilon_0 E_0 cos(\theta)$

Now I wanted to calculate the resulting dipole moment by $\int_0^R \int_0^{2\pi} \int_0^{\pi} r^3 sin(\theta) cos(\theta) 3 \epsilon_0 E_0 d\phi d\theta dr$

but in this case the integral over $\theta$ is zero and therefore this whole term will be zero which is somewhat strange, since there should be a dipole moment. So what am I doing wrong?

-

You should use $3 \epsilon_0 E_0 \cos(\theta)\delta (r-R)$ instead of $3 \epsilon_0 E_0 \cos(\theta)$ for charge density.

Also, the distance $r$ in the formula for dipole moment is a vector ($\mathbf{r}=r\hat{r}$):

$$\mathbf{p}=\int \mathbf{x'}\rho (\mathbf{x'})dx'$$

And the reason for the delta function in your charge density is that you have a surface charge density. Instead of that you can integrate over the surface.

-
but the integral over $\theta$ is still zero? –  Xin Wang Jul 24 '13 at 10:14
I mean vector $\mathbf{r}$ in the integral. I just modified charge density in my answer. –  Mostafa Jul 24 '13 at 10:18
could you please explain the physics behind it? why is this necessary? –  Xin Wang Jul 24 '13 at 10:19
and what do you mean by writing r bold? a vector? but R is not a vector, so this is not actually clear to me –  Xin Wang Jul 24 '13 at 10:21
I do not see your point. the integral over $\theta$ will be zero. –  Xin Wang Jul 24 '13 at 10:22