Finding electric dipole moment For a ideal electric dipole we have
$$\rho (\mathrm{\mathbf{x}})=-\mathrm{\mathbf{p_0}}\cdot\nabla\delta^{(3)}(\mathrm{\mathbf{x}}-\mathrm{\mathbf{x_0}})$$
The electric dipole moment formula is given as
$$\mathrm{\mathbf{p}}=\int_{\mathcal{V}}\mathrm{\mathbf{x}}\,\rho(\mathrm{\mathbf{x}})\,\mathrm{d^3x}$$
How do I use the above formula to find the electric dipole moment?
I was thinking of using the identity
$$\nabla\cdot(\psi\mathrm{\mathbf{A}})=\psi\nabla\cdot\mathrm{\mathbf{A}}+\mathrm{\mathbf{A}}\cdot\nabla\psi$$
However, I am not sure how to incoporate $\mathrm{\mathbf{p_0}}$, which is constant, into the formula.
 A: I'll show it in one dimension, in case that's easier to understand. In this case,
$$\rho(x) = -p_0 \frac{\text{d}}{\text{d}x}\delta(x).$$
The dipole moment is
\begin{aligned}
p &= \int_{-\infty}^\infty\text{d}x\,\, x \,\rho(x) = -\int_{-\infty}^\infty\text{d}x\,\, p_0 \,x\frac{\text{d}}{\text{d}x}\delta(x)\\
\end{aligned}
Now, we can integrate the above equation by parts, to show that $$p = - p_0 x \delta(x) \Bigg|_{-\infty}^\infty +\int_{-\infty}^\infty \delta(x) \frac{\text{d}}{\text{d}x}(p_0 x)$$
The first term is zero, because of the Dirac Delta, and the second term is just $p_0$, so you have $$p = p_0.$$
It should be straightforward to generalise this to higher dimensions.
Note: Another formula you could use (which we have effectively proved here) is that $$\int_{-\infty}^\infty \text{d}x\,\, f(x) \delta'(x) = -f'(0).$$ Setting $f(x) = -p_0 x$ gives you the same result.
A: You want to show that the first and second equations are consistent (if $\mathbf{x}=\mathbf{0}$).  In particular, you want to show that $\mathbf{p}=\mathbf{p_0}$.
Begin with the second equation, which is the definition of the dipole moment $\mathbf{p}$.
Next use the multipole expansion of the electric potential:
$$V(\mathbf{x}) = \frac{1}{4\pi\epsilon_0}\left(
\frac{q}{|\mathbf{x}|}+\frac{\mathbf{p}\cdot\mathbf{x}}{|\mathbf{x}|^3}+...\right)$$
For a dipole, all the terms are zero except the second.
Using Poisson's equation:
$$\nabla^2 \, V(\mathbf{x}) \left(= \nabla^2  \frac{\mathbf{p} \cdot \mathbf{x}}{4\pi\epsilon_0|\mathbf{x}|^3}\right) = -\frac{\rho(\mathbf{x})}{\epsilon_0}$$
it is possible to calculate the Laplacian and rearrange the resulting equation to show (see, for example, What is the charge density of a pure electric dipole?) that:
$$\rho(\mathbf{x}) = -\mathbf{p} \cdot \nabla\delta^{(3)}(\mathbf{x})$$
So you have that $\mathbf{p} = \mathbf{p_0}$.  This is a trivial result because $\mathbf{p}$ was used to derive the charge density, but the derivation makes it clear that the two expressions you have are consistent.
An alternative approach is to set $\mathbf{p_0} = \mathbf{p}$ and
$\mathbf{x} = \mathbf{0}$ in the first equation, then substitute into the second.  I am quite unsure about the mathematics here, but since nobody else has provided an answer I will try:
$$ \mathbf{p} = \int_\mathcal{V}  \mathbf{x} \left(-\mathbf{p} \cdot \nabla \delta^{(3)} (\mathbf{x})\right) \mathrm{d}^3x
= \int_\mathcal{V}  \left(-\mathbf{p} \cdot \nabla \delta^{(3)} (\mathbf{x})\right) \mathbf{x}  \,\,\mathrm{d}^3x$$
Using the result that $\nabla\delta^{(3)} = -\delta^{(3)}\nabla$:
$$ \mathbf{p} = \int_\mathcal{V}  \left( \mathbf{p} \cdot \delta^{(3)} (\mathbf{x}) \nabla \right) \mathbf{x}  \,\,\mathrm{d}^3x \\ =
\int_\mathcal{V}  \mathbf{p} \cdot \delta^{(3)}(\mathbf{x})\nabla x \,\hat{\mathbf{i}} \, +   \mathbf{p} \cdot \delta^{(3)}(\mathbf{x}) \nabla y \,\hat{\mathbf{j}} \, + \mathbf{p} \cdot \delta^{(3)}(\mathbf{x}) \nabla z \,\hat{\mathbf{k}} \, \,\,\mathrm{d}^3x
\\= \int_\mathcal{V}  \left(\mathbf{p} \cdot \delta^{(3)}(\mathbf{x}) \, \hat{\mathbf{i}}\right)\hat{\mathbf{i}} \, +  \left( \mathbf{p} \cdot \delta^{(3)}(\mathbf{x}) \, \hat{\mathbf{j}} \right) \hat{\mathbf{j}} \, + \left( \mathbf{p} \cdot \delta^{(3)}(\mathbf{x})  \,\hat{\mathbf{k}} \right)\hat{\mathbf{k}} \, \,\,\mathrm{d}^3x \\
\\ = \int_\mathcal{V}\delta^{(3)}(\mathbf{x}) \left(p_x \hat{\mathbf{i}} + p_y \hat{\mathbf{j}}+ p_z\hat{\mathbf{k}}\right) \mathrm{d}^3x = 
\mathbf{p}$$.
