Integrating center of mass coordinates for two radial functions I have what is probably a trivial question but I am too embarrassed to ask my colleagues.
I have a function which only depends on the radial coordinate, $\rho(\vec{r})=\rho(r)$, which I know the functional form. One example is,
$$\rho(r)=\frac{\alpha}{1+e^{\beta(r-R)}},$$
where $\alpha,\beta,R$ are real, positive constants. Another example is $$\rho(r)=\frac{1}{r}\left(e^{-\alpha r}+e^{-\beta r}\right).$$
The quantity I want to calculate is defined as:
$$P(\vec{r})=\int \,\mathrm d^3\vec{R}~\rho\left(\vec{R}+\frac{\vec{r}}{2}\right)\rho\left(\vec{R}-\frac{\vec{r}}{2}\right)$$
but in reality I just want $P(r)$. 
Going through the motions how I would think to do this, I would want to evaluate something like
$$P(r)=\int \text{sin}(\theta_R) R^2 \,\mathrm dR \,\mathrm d\theta_R \,\mathrm d\phi_R~\rho\left(\vert\vec{R}+\frac{\vec{r}}{2}\vert\right)\rho\left(\vert\vec{R}-\frac{\vec{r}}{2}\vert\right)$$
but
$$\vert\vec{R}\pm \frac{\vec{r}}{2}\vert=\sqrt{R^2+r^2 \pm 2rR(\text{sin}(\theta_r)\text{sin}(\theta_R)\text{cos}(\phi_r-\phi_R)+\text{cos}(\theta_r)\text{cos}(\theta_R))}$$
which is terribly complicated.
What am I missing, I think this should be very simple?
 A: So, you've basically got two "charges" which each produce some kind of "field", $\rho$. You're placing them in space with separation $r$, and you want to calculate the integral over all of space of the product between the two fields? This sounds like a good problem for cylindrical coordinates. We'll use $s$ as the radial cylindrical coordinate, since $r$ is already being used.
So, let's place the charges on the $z$ axis, with one at $z=\frac{r}{2}$ and the other at $z=-\frac{r}{2}$. Since $\rho$ only takes positive arguments, let's replace it with $\gamma$ so that $\rho(r)=\gamma(r^2)$. Then:
$$
P(r) = 2\pi\int_{-\infty}^\infty \int_0^\infty \gamma(x_1)\gamma(x_2)s ds dz
$$
Where $x_1=s^2+(z-\frac{r}{2})^2$ and $x_2=s^2+(z+\frac{r}{2})^2$.
Using reflectional symmetry ($z\to-z$), we can get:
$$
P(r) = 4\pi\int_0^\infty \int_0^\infty \gamma(x_1)\gamma(x_2)s ds dz
$$
The direction you go from here will depend on the exact nature of you function, $\rho(r)$. Where integrals are concerned, unfortunately, very few things are simple.
