How do I perform this integral? (Feynman Lecture on Physics) I was reading through Feynman Lecture on Physics (Volume II) when I encountered this integral:
$$
\begin{equation}
\label{Eq:II:8:27}
U=\frac{1}{2}\underset{\substack{\text{all}\\\text{space}}}{\int}
\frac{\rho(1)\rho(2)}{4\pi\epsilon r_{12}}\,dV_1dV_2.
\end{equation}
$$
Two questions about this:


*

*How do I solve this integral? Both dV1 and dV2 are not independent of each other and they are volumes, so I don't think this is a simple double integral.

*Dr. Feynman then said that the 1/2 factor is necessary because in the integral, we are actually adding up the pairs of charges ($\rho(1)dV_1\cdot\rho(2)dV_2$) twice. What is the intuition for this?


This integral is equation (8.27) in the 8th lecture of volume II:
http://www.feynmanlectures.caltech.edu/II_08.html
I will appreciate any help. Thank you!
 A: The two integration are actually 'independent', since the domain of integration is a cartesian product, i.e. $\mathbb R^3\times\mathbb R^3$. However, I think that the notation is a bit confusing. Probably the following is clearer
$$
U=\frac{1}{2}\int_{\mathbb R^3\times \mathbb R^3}\frac{\rho_1(x)\rho_2(y)} {4\pi\epsilon |x-y|}d^3x\; d^3y=\frac{1}{2}\int_{\mathbb R^3}d^3x \;\rho_1(x)\left(\int_{\mathbb R^3}\frac{\rho_2(y)} {4\pi\epsilon |x-y|}d^3y\right)
$$
It is infact a double integral (or 6-uple integral, if you prefer).
As for the $1/2$ factor, this has to do with the definition of energy. In fact, if you agree with its definition in the case of two point-like charges, which is
$$
U_{12}=\frac{1}{2}\cdot \frac{q_1 q_2} {4\pi\epsilon |x-y|},
$$
you will agree with the given expression also in the case of continuous distributions.
Observe that the energy $U_{12}$ of a system of two point charges is defined differently with respect to the energy of the particle $q_1$ in presence of $q_2$  held fixed, which is
$$
U_{1}= \frac{q_1 q_2} {4\pi\epsilon |x-y|}
$$
See https://en.wikipedia.org/wiki/Electric_potential_energy.
